diff --git a/identity-android/src/main/java/com/android/identity/android/securearea/AndroidKeystoreSecureArea.java b/identity-android/src/main/java/com/android/identity/android/securearea/AndroidKeystoreSecureArea.java index cd24f54b0..e8a9c383a 100644 --- a/identity-android/src/main/java/com/android/identity/android/securearea/AndroidKeystoreSecureArea.java +++ b/identity-android/src/main/java/com/android/identity/android/securearea/AndroidKeystoreSecureArea.java @@ -444,7 +444,7 @@ static String getSignatureAlgorithmName(@Algorithm int signatureAlgorithm) { } throw new IllegalStateException(e.getMessage(), e); } catch (InvalidKeyException e) { - throw new IllegalArgumentException("Key does not have purpose KEY_PURPOSE_SIGN", e); + throw new IllegalArgumentException(e); } } @@ -484,7 +484,7 @@ static String getSignatureAlgorithmName(@Algorithm int signatureAlgorithm) { } throw new IllegalStateException(e.getMessage(), e); } catch (InvalidKeyException e) { - throw new IllegalArgumentException("Key does not have purpose KEY_PURPOSE_AGREE_KEY", e); + throw new IllegalArgumentException(e); } }