OLMKit: Update obj-c wrapper to 2.0.0
This commit is contained in:
parent
5d1b66c350
commit
27a8c28da4
6 changed files with 17 additions and 15 deletions
|
@ -1,8 +1,8 @@
|
|||
Pod::Spec.new do |s|
|
||||
|
||||
# The libolm version
|
||||
MAJOR = 1
|
||||
MINOR = 3
|
||||
MAJOR = 2
|
||||
MINOR = 0
|
||||
PATCH = 0
|
||||
|
||||
s.name = "OLMKit"
|
||||
|
|
|
@ -273,7 +273,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run \'pod install\' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
793D0533290528B7C0E17CAD /* [CP] Copy Pods Resources */ = {
|
||||
|
@ -303,7 +303,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run \'pod install\' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
- (NSString*)sessionIdentifier;
|
||||
|
||||
/** base64 ciphertext -> UTF-8 plaintext */
|
||||
- (NSString*)decryptMessage:(NSString*)message;
|
||||
- (NSString*)decryptMessage:(NSString*)message messageIndex:(NSUInteger*)messageIndex;
|
||||
|
||||
@end
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
return idString;
|
||||
}
|
||||
|
||||
- (NSString *)decryptMessage:(NSString *)message
|
||||
- (NSString *)decryptMessage:(NSString *)message messageIndex:(NSUInteger*)messageIndex
|
||||
{
|
||||
NSParameterAssert(message != nil);
|
||||
NSData *messageData = [message dataUsingEncoding:NSUTF8StringEncoding];
|
||||
|
@ -96,7 +96,7 @@
|
|||
// message buffer is destroyed by olm_group_decrypt_max_plaintext_length
|
||||
mutMessage = messageData.mutableCopy;
|
||||
NSMutableData *plaintextData = [NSMutableData dataWithLength:maxPlaintextLength];
|
||||
size_t plaintextLength = olm_group_decrypt(session, mutMessage.mutableBytes, mutMessage.length, plaintextData.mutableBytes, plaintextData.length);
|
||||
size_t plaintextLength = olm_group_decrypt(session, mutMessage.mutableBytes, mutMessage.length, plaintextData.mutableBytes, plaintextData.length, messageIndex);
|
||||
if (plaintextLength == olm_error()) {
|
||||
const char *error = olm_inbound_group_session_last_error(session);
|
||||
NSAssert(NO, @"olm_group_decrypt error: %s", error);
|
||||
|
|
|
@ -55,8 +55,10 @@
|
|||
OLMInboundGroupSession *bobSession = [[OLMInboundGroupSession alloc] initInboundGroupSessionWithSessionKey:sessionKey];
|
||||
XCTAssertEqualObjects(aliceSession.sessionIdentifier, bobSession.sessionIdentifier);
|
||||
|
||||
NSString *plaintext = [bobSession decryptMessage:aliceToBobMsg];
|
||||
NSUInteger messageIndex;
|
||||
NSString *plaintext = [bobSession decryptMessage:aliceToBobMsg messageIndex:&messageIndex];
|
||||
XCTAssertEqualObjects(message, plaintext);
|
||||
XCTAssertEqual(messageIndex, 0);
|
||||
}
|
||||
|
||||
- (void)testOutboundGroupSessionSerialization {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
PODS:
|
||||
- OLMKit (1.3.0):
|
||||
- OLMKit/olmc (= 1.3.0)
|
||||
- OLMKit/olmcpp (= 1.3.0)
|
||||
- OLMKit/olmc (1.3.0)
|
||||
- OLMKit/olmcpp (1.3.0)
|
||||
- OLMKit (2.0.0):
|
||||
- OLMKit/olmc (= 2.0.0)
|
||||
- OLMKit/olmcpp (= 2.0.0)
|
||||
- OLMKit/olmc (2.0.0)
|
||||
- OLMKit/olmcpp (2.0.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- OLMKit (from `../OLMKit.podspec`)
|
||||
|
@ -13,8 +13,8 @@ EXTERNAL SOURCES:
|
|||
:path: ../OLMKit.podspec
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
OLMKit: 49b73677a77988cc25e51d023f39a8a3e451cb23
|
||||
OLMKit: ed17cdf7695bc0de1e2bf98243eb65f5b9ddebc1
|
||||
|
||||
PODFILE CHECKSUM: 4e261dae61d833ec5585ced2473023b98909fd35
|
||||
|
||||
COCOAPODS: 1.0.1
|
||||
COCOAPODS: 1.1.1
|
||||
|
|
Loading…
Reference in a new issue