diff options
| author | J08nY | 2016-12-11 14:20:00 +0100 |
|---|---|---|
| committer | J08nY | 2016-12-11 14:20:00 +0100 |
| commit | da1ee8381f2f7eaf1cfcd4941ec9f95287435625 (patch) | |
| tree | 823084e2c74015f38afca4ce8e0807a9548fa84a /src/applets/ECKeyGenerator.java | |
| parent | 5f0ec2706a9dbb6aa72ea3c7eb798cd83045e867 (diff) | |
| download | ECTester-da1ee8381f2f7eaf1cfcd4941ec9f95287435625.tar.gz ECTester-da1ee8381f2f7eaf1cfcd4941ec9f95287435625.tar.zst ECTester-da1ee8381f2f7eaf1cfcd4941ec9f95287435625.zip | |
Fixed some issues with errors in key generation, and their propagation
Diffstat (limited to 'src/applets/ECKeyGenerator.java')
| -rw-r--r-- | src/applets/ECKeyGenerator.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/applets/ECKeyGenerator.java b/src/applets/ECKeyGenerator.java index 491cd86..2eb5679 100644 --- a/src/applets/ECKeyGenerator.java +++ b/src/applets/ECKeyGenerator.java @@ -215,8 +215,8 @@ public class ECKeyGenerator { public short exportParameter(byte key, short param, byte[] outputBuffer, short outputOffset) { if (key == KEY_BOTH) { - return -1; - }//TODO: change error handling. + ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED); + } short length = 0; try { switch (param) { @@ -255,9 +255,9 @@ public class ECKeyGenerator { ISOException.throwIt(ISO7816.SW_FUNC_NOT_SUPPORTED); } } catch (CryptoException ce) { - length = -1; + ISOException.throwIt(ce.getReason()); } catch (Exception e) { - length = -1; + ISOException.throwIt(ISO7816.SW_UNKNOWN); } return length; } |
