forked from I2P_Developers/i2p.i2p
Crypto: Fix equality checking of ECParameterSpecs for private keys too
see earlier checkin for public keys
This commit is contained in:
@@ -196,13 +196,13 @@ public final class SigUtil {
|
||||
}
|
||||
if (pk instanceof ECPrivateKey) {
|
||||
ECPrivateKey k = (ECPrivateKey) pk;
|
||||
AlgorithmParameterSpec spec = k.getParams();
|
||||
ECParameterSpec spec = k.getParams();
|
||||
SigType type;
|
||||
if (spec.equals(SigType.ECDSA_SHA256_P256.getParams()))
|
||||
if (ECConstants.equals(spec, ECConstants.P256_SPEC))
|
||||
type = SigType.ECDSA_SHA256_P256;
|
||||
else if (spec.equals(SigType.ECDSA_SHA384_P384.getParams()))
|
||||
else if (ECConstants.equals(spec, ECConstants.P384_SPEC))
|
||||
type = SigType.ECDSA_SHA384_P384;
|
||||
else if (spec.equals(SigType.ECDSA_SHA512_P521.getParams()))
|
||||
else if (ECConstants.equals(spec, ECConstants.P521_SPEC))
|
||||
type = SigType.ECDSA_SHA512_P521;
|
||||
else {
|
||||
// failing on Android (ticket #2296)
|
||||
|
||||
Reference in New Issue
Block a user