Skip to content

Commit 6f0ecfd

Browse files
committed
Revert "CBL-7107: Identity/Cert expiration date should not be too old (#3474)"
This reverts commit 0578692.
1 parent 23bd9ec commit 6f0ecfd

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

Objective-C/Tests/TLSIdentityTest.m

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -522,20 +522,6 @@ - (void) testCreateIdentityWithNoAttributes {
522522
Assert([error.localizedDescription containsString: @"-67655"]);
523523
}
524524

525-
- (void) testCertificateExpirationAlreadyPast {
526-
XCTSkipUnless(self.keyChainAccessAllowed);
527-
NSDate* expired = [NSDate distantPast];
528-
529-
[self expectException: @"NSInvalidArgumentException" in:^{
530-
NSError* error;
531-
[CBLTLSIdentity createIdentityForKeyUsages: kCBLKeyUsagesServerAuth
532-
attributes: kServerCertAttrs
533-
expiration: expired
534-
label: kServerCertLabel
535-
error: &error];
536-
}];
537-
}
538-
539525
- (void) testCertificateExpiration {
540526
XCTSkipUnless(self.keyChainAccessAllowed);
541527

Swift/Tests/TLSIdentityTest.swift

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -412,21 +412,6 @@ class TLSIdentityTest: CBLTestCase {
412412
}
413413
}
414414

415-
func testCertificateExpirationAlreadyPast() throws {
416-
try XCTSkipUnless(keyChainAccessAllowed)
417-
418-
// A date definitely in the past
419-
let expired = Date.distantPast
420-
421-
expectException(exception: .invalidArgumentException) {
422-
_ = try? TLSIdentity.createIdentity(
423-
for: .serverAuth,
424-
attributes: [certAttrCommonName: "CBL-Server"],
425-
expiration: expired,
426-
label: self.serverCertLabel)
427-
}
428-
}
429-
430415
func testCertificateExpiration() throws {
431416
try XCTSkipUnless(keyChainAccessAllowed)
432417

0 commit comments

Comments
 (0)