mirror of
https://github.com/openjdk/jdk8u.git
synced 2025-12-10 21:05:56 -06:00
8026976: ECParameters, Point does not match field size
Reviewed-by: phh, mbalao Backport-of: 55f5542ca2104df91e14693534cc7b3c36e81953
This commit is contained in:
parent
55273f7267
commit
5e59411bd3
@ -294,7 +294,13 @@ final class P11ECKeyFactory extends P11KeyFactory {
|
||||
try {
|
||||
token.p11.C_GetAttributeValue(session[0].id(), keyID, attributes);
|
||||
ECParameterSpec params = decodeParameters(attributes[1].getByteArray());
|
||||
ECPoint point = decodePoint(attributes[0].getByteArray(), params.getCurve());
|
||||
ECPoint point;
|
||||
|
||||
if (!token.config.getUseEcX963Encoding()) {
|
||||
point = decodePoint(new DerValue(attributes[0].getByteArray()).getOctetString(), params.getCurve());
|
||||
} else {
|
||||
point = decodePoint(attributes[0].getByteArray(), params.getCurve());
|
||||
}
|
||||
return keySpec.cast(new ECPublicKeySpec(point, params));
|
||||
} catch (IOException e) {
|
||||
throw new InvalidKeySpecException("Could not parse key", e);
|
||||
|
||||
@ -277,8 +277,6 @@ sun/rmi/transport/tcp/DisableRMIOverHttp/DisableRMIOverHTTPTest.java windows-
|
||||
|
||||
# jdk_security
|
||||
|
||||
# 8026976
|
||||
sun/security/pkcs11/ec/TestKeyFactory.java generic-all
|
||||
# 8180837
|
||||
sun/security/pkcs11/Secmod/AddTrustedCert.java generic-all
|
||||
sun/security/pkcs11/tls/TestKeyMaterial.java generic-all
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user