Skip to content

Commit b7a0a75

Browse files
committed
Test changes
1 parent 3b322ba commit b7a0a75

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

IdentityCore/tests/MSIDWorkPlaceJoinUtilTests.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ - (void)testGetWPJKeysWithTenantId_whenEccRegistrationWithMissingTransportKey_sh
540540
privateKeyRef:keyRef
541541
privateKeyTag:tag
542542
accessGroup:keychainGroup];
543-
XCTAssertEqual(status, errSecSuccess);
543+
XCTAssertTrue(status == errSecSuccess || status == errSecDuplicateItem);
544544

545545
// Don't insert transport key - simulate missing STK scenario
546546

@@ -759,7 +759,9 @@ - (OSStatus)insertDummyEccRegistrationForTenantIdentifier:(NSString *)tenantIden
759759
NSString *stkTag = [NSString stringWithFormat:@"%@#%@%@", kMSIDPrivateTransportKeyIdentifier, tenantIdentifier, @"-EC"];
760760
SecKeyRef transportKeyRef = [self createAndGetdummyEccPrivateKey:useEncSecureEnclave privateKeyTag:stkTag];
761761
XCTAssertTrue(transportKeyRef != NULL);
762-
762+
[self insertKeyIntoKeychain:transportKeyRef
763+
privateKeyTag:stkTag
764+
accessGroup:keychainGroup];
763765
#endif
764766
return status;
765767
}

0 commit comments

Comments
 (0)