From 1d4420973d61f5110aa39de297537b3abac765b5 Mon Sep 17 00:00:00 2001 From: Philip Wendland Date: Fri, 31 Oct 2014 11:17:20 +0100 Subject: [PATCH] ECC key gen: initialize the private key as well. On some Java Cards, the key generation process will fail if only one key is being initialized. --- src/net/pwendland/javacard/pki/IsoApplet.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/net/pwendland/javacard/pki/IsoApplet.java b/src/net/pwendland/javacard/pki/IsoApplet.java index 6de899e6..c106e59b 100644 --- a/src/net/pwendland/javacard/pki/IsoApplet.java +++ b/src/net/pwendland/javacard/pki/IsoApplet.java @@ -724,6 +724,7 @@ public void processGenerateAsymmetricKeypair(APDU apdu) throws ISOException { ISOException.throwIt(ISO7816.SW_UNKNOWN); } initEcParams(ram_buf, (short) 0, lc, pubKey); + initEcParams(ram_buf, (short) 0, lc, privKey); kp.genKeyPair(); keys[privKeyRef] = privKey;