We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e4e7240 + 2f2879e commit fb86349Copy full SHA for fb86349
Applet/src/com/android/javacard/keymaster/KMKeymasterApplet.java
@@ -3551,7 +3551,7 @@ private void importRSAKey(byte[] scratchPad) {
3551
// check the keysize tag if present in key parameters.
3552
short keysize =
3553
KMIntegerTag.getShortValue(KMType.UINT_TAG, KMType.KEYSIZE, data[KEY_PARAMETERS]);
3554
- short kSize = (short) (KMByteBlob.length(data[SECRET]) * 8);
+ short kSize = (short) (KMByteBlob.length(data[PUB_KEY]) * 8);
3555
if (keysize != KMType.INVALID_VALUE) {
3556
if (keysize != 2048 || (keysize != kSize)) {
3557
KMException.throwIt(KMError.IMPORT_PARAMETER_MISMATCH);
0 commit comments