Skip to content

Commit

Permalink
Backport a7e308ab6e5dba7df790840d29fc7edbf3af2e24
Browse files Browse the repository at this point in the history
  • Loading branch information
duke committed Mar 16, 2023
1 parent 4baaa11 commit ca193c2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,14 @@ static void addIdentitiesToKeystore(JNIEnv *env, jobject keyStore)
OSErr searchResult = noErr;

jclass jc_KeychainStore = (*env)->FindClass(env, "apple/security/KeychainStore");
CHECK_NULL(jc_KeychainStore);
if (jc_KeychainStore == NULL) {
goto errOut;
}
jmethodID jm_createKeyEntry = (*env)->GetMethodID(env, jc_KeychainStore, "createKeyEntry", "(Ljava/lang/String;JJ[J[[B)V");
CHECK_NULL(jm_createKeyEntry);
if (jm_createKeyEntry == NULL) {
goto errOut;
}

do {
searchResult = SecIdentitySearchCopyNext(identitySearch, &theIdentity);

Expand Down

0 comments on commit ca193c2

Please sign in to comment.