Skip to content

Commit

Permalink
Fix bool marshalling
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrozsival committed Jun 19, 2024
1 parent d93c08e commit a62afea
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,12 @@ jobject /*X509Certificate*/ AndroidCryptoNative_X509GetCertificateForPrivateKeyE
return ToGRef(env, cert);
}

bool AndroidCryptoNative_X509IsKeyStorePrivateKeyEntry(jobject entry)
int32_t AndroidCryptoNative_X509IsKeyStorePrivateKeyEntry(jobject entry)
{
if (!entry)
return false;
return 0;

JNIEnv* env = GetJNIEnv();

return (*env)->IsInstanceOf(env, entry, g_PrivateKeyEntryClass);
return (*env)->IsInstanceOf(env, entry, g_PrivateKeyEntryClass) ? 1 : 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ PALEXPORT jobject /*X509Certificate*/ AndroidCryptoNative_X509GetCertificateForP
/*
Checks if the given entry is a private key entry
*/
PALEXPORT bool AndroidCryptoNative_X509IsKeyStorePrivateKeyEntry(jobject entry);
PALEXPORT int32_t AndroidCryptoNative_X509IsKeyStorePrivateKeyEntry(jobject entry);
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ jobject AndroidCryptoNative_X509StoreGetPrivateKeyEntry(jobject /*KeyStore*/ sto
return privateKeyEntry;
}

bool AndroidCryptoNative_X509StoreDeleteEntry(jobject /*KeyStore*/ store, const char* hashString)
int32_t AndroidCryptoNative_X509StoreDeleteEntry(jobject /*KeyStore*/ store, const char* hashString)
{
int32_t ret = FAIL;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ PALEXPORT jobject AndroidCryptoNative_X509StoreGetPrivateKeyEntry(jobject /*KeyS
/*
Removes an entry from the keystore for the given alias
*/
PALEXPORT bool AndroidCryptoNative_X509StoreDeleteEntry(jobject /*KeyStore*/ store, const char* hashString);
PALEXPORT int32_t AndroidCryptoNative_X509StoreDeleteEntry(jobject /*KeyStore*/ store, const char* hashString);

0 comments on commit a62afea

Please sign in to comment.