diff options
| author | Alex Klyubin <klyubin@google.com> | 2015-03-31 19:50:13 -0700 |
|---|---|---|
| committer | Alex Klyubin <klyubin@google.com> | 2015-03-31 19:50:13 -0700 |
| commit | c8e557470fc94733c9340c4c67ee69c225bbaa70 (patch) | |
| tree | 42658c56aa30ae20ec8a828745008f74587eb991 /keystore/java/android/security/KeyStoreHmacSpi.java | |
| parent | b7a34e4955beae2cee81a27e7c240316078bbf2f (diff) | |
| download | frameworks_base-c8e557470fc94733c9340c4c67ee69c225bbaa70.zip frameworks_base-c8e557470fc94733c9340c4c67ee69c225bbaa70.tar.gz frameworks_base-c8e557470fc94733c9340c4c67ee69c225bbaa70.tar.bz2 | |
Hook in user authenticators and their exceptions.
Bug: 18088752
Change-Id: I2835dbe51d09587a3081597c6aaf536aa1427e24
Diffstat (limited to 'keystore/java/android/security/KeyStoreHmacSpi.java')
| -rw-r--r-- | keystore/java/android/security/KeyStoreHmacSpi.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/keystore/java/android/security/KeyStoreHmacSpi.java b/keystore/java/android/security/KeyStoreHmacSpi.java index 939b41c..8972611 100644 --- a/keystore/java/android/security/KeyStoreHmacSpi.java +++ b/keystore/java/android/security/KeyStoreHmacSpi.java @@ -101,8 +101,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi { if (opResult == null) { throw new KeyStoreConnectException(); } else if (opResult.resultCode != KeyStore.NO_ERROR) { - throw new CryptoOperationException("Failed to start keystore operation", - KeymasterUtils.getExceptionForKeymasterError(opResult.resultCode)); + throw KeymasterUtils.getCryptoOperationException(opResult.resultCode); } mOperationToken = opResult.token; if (mOperationToken == null) { @@ -128,7 +127,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi { try { output = mChunkedStreamer.update(input, offset, len); } catch (KeymasterException e) { - throw new CryptoOperationException("Keystore operation failed", e); + throw KeymasterUtils.getCryptoOperationException(e); } if ((output != null) && (output.length != 0)) { throw new CryptoOperationException("Update operation unexpectedly produced output"); @@ -145,7 +144,7 @@ public abstract class KeyStoreHmacSpi extends MacSpi { try { result = mChunkedStreamer.doFinal(null, 0, 0); } catch (KeymasterException e) { - throw new CryptoOperationException("Keystore operation failed", e); + throw KeymasterUtils.getCryptoOperationException(e); } engineReset(); |
