JCE: zero privKeyBytes buffer before leaking wolfCryptInitPrivateKey
parent
aef00fa251
commit
ae161c7a1c
|
|
@ -345,7 +345,11 @@ public class WolfCryptSignature extends SignatureSpi {
|
|||
privKeyBytes = ecPriv.getS().toByteArray();
|
||||
}
|
||||
|
||||
this.ecc.importPrivate(privKeyBytes, null);
|
||||
try {
|
||||
this.ecc.importPrivate(privKeyBytes, null);
|
||||
} finally {
|
||||
zeroArray(privKeyBytes);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue