Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests for Themis iOS wrapper for new SecureMessage API #394

Merged
merged 7 commits into from
Feb 28, 2019

Conversation

vixentael
Copy link
Contributor

This is a second PR for updating Themis iOS wrapper for new SecureMessage API (#389).

It contains updating Secure Message test project to include new checks.

It must be merged after merging PR #393 – then I'll relink example podspec to use code from master.

@vixentael vixentael added O-iOS 📱 Operating system: iOS tests Themis test suite labels Feb 28, 2019
@vixentael vixentael self-assigned this Feb 28, 2019
@@ -37,55 +37,105 @@ - (void)testGeneratingKeys {
}

- (void)testSecureMessageEC256 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

real code changes in this file

@@ -10,7 +10,6 @@ import XCTest
class SecureMessageTestsSwift: XCTestCase {

func testExampleGeneratingKeys() {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

real code changes in this file

#pod 'themis', :git => "https://github.com/cossacklabs/themis.git"

# updated secure message API
pod 'themis', :git => "https://github.com/cossacklabs/themis.git", :branch => "vxtl/SM-ios"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be changed to master on merge #393

@@ -5,31 +5,31 @@ PODS:
- BoringSSL/Implementation (10.0.6):
- BoringSSL/Interface (= 10.0.6)
- BoringSSL/Interface (10.0.6)
- GRKOpenSSLFramework (1.0.2.14.1)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skip

Copy link
Collaborator

@ilammy ilammy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noice 👍

tests/objcthemis/objthemis/SecureMessageTests.m Outdated Show resolved Hide resolved
tests/objcthemis/objthemis/SecureMessageTests.m Outdated Show resolved Hide resolved
tests/objcthemis/objthemis/SecureMessageTests.m Outdated Show resolved Hide resolved
return [self wrapUnwrapWithPrivateKey:privateKeyData publicKey:publicKeyData];
}

- (void)wrapUnwrapWithPrivateKey:(NSData *)privateKeyData publicKey:(NSData *)publicKeyData {
TSMessage *encrypter = [[TSMessage alloc] initInEncryptModeWithPrivateKey:privateKeyData peerPublicKey:publicKeyData];

NSString *message = @"- Knock, knock.\n- Who’s there?\n*very long pause...*\n- Java.";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤣 😂 ☕️

@vixentael vixentael marked this pull request as ready for review February 28, 2019 13:47
Copy link
Collaborator

@ilammy ilammy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but there are some minor duplication mistakes in the new-new tests.

tests/objcthemis/objthemis/SecureMessageTests.m Outdated Show resolved Hide resolved
tests/objcthemis/objthemis/SecureMessageTests.m Outdated Show resolved Hide resolved
@vixentael vixentael changed the title Update Themis iOS wrapper for new SecureMessage API (2 Part) Update tests for Themis iOS wrapper for new SecureMessage API Feb 28, 2019
@vixentael
Copy link
Contributor Author

@ilammy thank you for pointing out copy-paste issues, fixed

@vixentael vixentael merged commit 0700866 into master Feb 28, 2019
@vixentael vixentael deleted the vxtl/SM-ios-tests branch February 28, 2019 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-iOS 📱 Operating system: iOS tests Themis test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants