Skip to content

Commit

Permalink
MQTT-Client-Framework 0.6.8
Browse files Browse the repository at this point in the history
> Release date 2016-02-11

[FIX] Client-side certificate validations issues closes #96
  • Loading branch information
Christoph Krey committed Feb 11, 2016
1 parent 0339526 commit 8d24458
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 22 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
MQTT-Client-Framework iOS/OSX/tvOS Release Notes
================================================

## MQTT-Client-Framework 0.6.8
> Release date 2016-02-11
[FIX] Client-side certificate validations issues closes #96

## MQTT-Client-Framework 0.6.7
> Release date 2016-02-10
Expand Down
4 changes: 2 additions & 2 deletions MQTTClient.podspec
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Pod::Spec.new do |mqttc|
mqttc.name = "MQTTClient"
mqttc.version = "0.6.7"
mqttc.version = "0.6.8"
mqttc.summary = "iOS, OSX and tvOS native ObjectiveC MQTT Client Framework"
mqttc.homepage = "https://github.com/ckrey/MQTT-Client-Framework"
mqttc.license = { :type => "EPLv1", :file => "LICENSE" }
mqttc.author = { "Christoph Krey" => "krey.christoph@gmail.com" }
mqttc.source = {
:git => "https://github.com/ckrey/MQTT-Client-Framework.git",
:tag => "0.6.7",
:tag => "0.6.8",
:submodules => true
}

Expand Down
4 changes: 4 additions & 0 deletions MQTTClient/MQTTClient/MQTTSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,17 @@ typedef void (^MQTTPublishHandler)(NSError *error);
*/
@property (strong, nonatomic) id <MQTTTransport> transport;

/** certificates an NSArray holding client certificates or nil */
@property (strong, nonatomic) NSArray *certificates;

/** connect to the given host through the given transport with the given
* MQTT session parameters asynchronously
*
* @exception NSInternalInconsistencyException if the parameters are invalid
*
*/


- (void)connect;

/** connects to the specified MQTT server
Expand Down
19 changes: 19 additions & 0 deletions MQTTClient/MQTTClient/MQTTSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,25 @@ @interface MQTTSession() <MQTTDecoderDelegate, MQTTTransportDelegate>
#define DUPLOOP 1.0

@implementation MQTTSession
@synthesize certificates;

- (void)setCertificates:(NSArray *)newCertificates {
certificates = newCertificates;
if (self.transport) {
if ([self.transport respondsToSelector:@selector(setCertificates:)]) {
[self.transport performSelector:@selector(setCertificates:) withObject:certificates];
}
}
}

- (NSArray *)certificates {
if (self.transport) {
if ([self.transport respondsToSelector:@selector(certificates)]) {
self.certificates = [self.transport performSelector:@selector(certificates) withObject:nil];
}
}
return self.certificates;
}

- (instancetype)init {
DDLogVerbose(@"[MQTTSession] init");
Expand Down
3 changes: 0 additions & 3 deletions MQTTClient/MQTTClient/MQTTSessionLegacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@

@interface MQTTSession(Create)

/** certificates an NSArray holding client certificates or nil */
@property (strong, nonatomic) NSArray *certificates;

/** convenience initializer
@param clientId see clientId for description.
@param userName see username for description.
Expand Down
17 changes: 0 additions & 17 deletions MQTTClient/MQTTClient/MQTTSessionLegacy.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,6 @@

@implementation MQTTSession(Legacy)

- (void)setCertificates:(NSArray *)certificates {
if (self.transport) {
if ([self.transport respondsToSelector:@selector(setCertificates:)]) {
[self.transport performSelector:@selector(setCertificates:) withObject:certificates];
}
}
}

- (NSArray *)certificates {
if (self.transport) {
if ([self.transport respondsToSelector:@selector(certificates)]) {
return [self.transport performSelector:@selector(certificates)];
}
}
return nil;
}

- (MQTTSession *)initWithClientId:(NSString *)clientId
userName:(NSString *)userName
password:(NSString *)password
Expand Down

0 comments on commit 8d24458

Please sign in to comment.