Skip to content
This repository was archived by the owner on Apr 9, 2021. It is now read-only.

Commit ffc922b

Browse files
Upgrading dependencies and passing infer tests.
1 parent 9c646e4 commit ffc922b

File tree

5 files changed

+26
-18
lines changed

5 files changed

+26
-18
lines changed

AxolotlKit.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "AxolotlKit"
3-
s.version = "0.6.3"
3+
s.version = "0.7"
44
s.summary = "AxolotlKit is a Free implementation of the Axolotl protocol in Objective-C"
55
s.homepage = "https://github.com/WhisperSystems/AxolotlKit"
66
s.license = "GPLv2"
@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
1313
s.ios.deployment_target = "6.0"
1414
s.osx.deployment_target = "10.8"
1515
s.requires_arc = true
16-
s.dependency '25519', '~> 1.9'
16+
s.dependency '25519', '~> 2.0.1'
1717
s.dependency 'HKDFKit', '~> 0.0.3'
18-
s.dependency 'ProtocolBuffers', '~> 1.9.7'
18+
s.dependency 'ProtocolBuffers', '~> 1.9.8'
1919
end

AxolotlKit/Classes/Crypto/AES-CBC.m

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ +(NSData*)encryptCBCMode:(NSData*)data withKey:(NSData*)key withIV:(NSData*)iv{
3434
&bytesEncrypted);
3535

3636
if (cryptStatus == kCCSuccess){
37-
return [NSData dataWithBytesNoCopy:buffer length:bytesEncrypted];
37+
NSData *data = [NSData dataWithBytes:buffer length:bytesEncrypted];
38+
free(buffer);
39+
40+
return data;
3841
} else{
3942
free(buffer);
4043
@throw [NSException exceptionWithName:CipherException reason:@"We encountered an issue while encrypting." userInfo:nil];
@@ -55,7 +58,10 @@ +(NSData*) decryptCBCMode:(NSData*)data withKey:(NSData*)key withIV:(NSData*)iv
5558
&bytesDecrypted);
5659

5760
if (cryptStatus == kCCSuccess) {
58-
return [NSData dataWithBytesNoCopy:buffer length:bytesDecrypted];
61+
NSData *plaintext = [NSData dataWithBytes:buffer length:bytesDecrypted];
62+
free(buffer);
63+
64+
return plaintext;
5965
} else{
6066
free(buffer);
6167
@throw [NSException exceptionWithName:CipherException reason:@"We encountered an issue while decrypting." userInfo:nil];

AxolotlKit/Classes/Sessions/SessionBuilder.m

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ - (instancetype)initWithSessionStore:(id<SessionStore>)sessionStore
5959
deviceId:(int)deviceId{
6060
self = [super init];
6161

62-
_sessionStore = sessionStore;
63-
_prekeyStore = preKeyStore;
64-
_signedPreKeyStore = signedPreKeyStore;
65-
_identityStore = identityKeyStore;
66-
_recipientId = recipientId;
67-
_deviceId = deviceId;
62+
if (self) {
63+
_sessionStore = sessionStore;
64+
_prekeyStore = preKeyStore;
65+
_signedPreKeyStore = signedPreKeyStore;
66+
_identityStore = identityKeyStore;
67+
_recipientId = recipientId;
68+
_deviceId = deviceId;
69+
}
6870

6971
return self;
7072
}

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ platform :ios, '6.0'
22

33
link_with ["AxolotlKit", "AxolotlKitTests"]
44

5-
pod '25519', '~> 1.9', :inhibit_warnings => true
5+
pod '25519', '~> 2.0.1', :inhibit_warnings => true
66
pod 'HKDFKit', '~> 0.0.3'
77
pod 'ProtocolBuffers', '~> 1.9.7'

Podfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
PODS:
2-
- 25519 (1.8)
2+
- 25519 (2.0.1)
33
- HKDFKit (0.0.3)
44
- ProtocolBuffers (1.9.7)
55

66
DEPENDENCIES:
7-
- 25519 (~> 1.8)
7+
- 25519 (~> 2.0.1)
88
- HKDFKit (~> 0.0.3)
99
- ProtocolBuffers (~> 1.9.7)
1010

1111
SPEC CHECKSUMS:
12-
25519: 601ffb5d258aa33d642062d6fa4096db210e02e7
13-
HKDFKit: 5998cf1bbb611e7ecc6bd3eaaef8c7a7da7be949
14-
ProtocolBuffers: 37fdd327d36856f965ea9029b5ec0c7120e3a452
12+
'25519': cd3f6f0658ac9dd4f95d7fb906378e1d0649c46c
13+
HKDFKit: c058305d6f64b84f28c50bd7aa89574625bcb62a
14+
ProtocolBuffers: 0682a66dec85e5a45bd53a2f44b8b987a0ba845f
1515

16-
COCOAPODS: 0.35.0
16+
COCOAPODS: 0.37.2

0 commit comments

Comments
 (0)