Skip to content

Commit

Permalink
Stop using hardcoded cert fingerprint in test_08_Puller_SSL_Pinned
Browse files Browse the repository at this point in the history
A different cert needs to be substituted when testing on a device
since the SG will not be on 'localhost', and this cert will have a
different digest of course. So compute the digest at runtime.
Fixes #882

# Conflicts:
#	Unit-Tests/ReplicatorInternal_Tests.m
  • Loading branch information
snej authored and pasin committed Sep 2, 2015
1 parent e75d407 commit 284f280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Unit-Tests/ReplicatorInternal_Tests.m
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ - (void) test_08_Puller_SSL_Pinned {
userInfo: nil]);

Log(@"Now replicating with correct pinned cert...");
digest = @"29adb68f518347bfa2770723642414f89a4d352a";
digest = CBLHexSHA1Digest([self contentsOfTestFile: @"SelfSigned.cer"]);
id lastSeq = replic8Continuous(db, remoteURL, NO, nil,
@{kCBLReplicatorOption_PinnedCert: digest},
nil);
Expand Down

0 comments on commit 284f280

Please sign in to comment.