Skip to content

Commit

Permalink
ECC key gen: initialize the private key as well.
Browse files Browse the repository at this point in the history
On some Java Cards, the key generation process will fail if only one key is being initialized.
  • Loading branch information
philipWendland committed Oct 31, 2014
1 parent a6f9121 commit 1d44209
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/net/pwendland/javacard/pki/IsoApplet.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1d44209

Please sign in to comment.