Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,13 @@ <T extends KeySpec> T implGetPublicKeySpec(P11Key key, Class<T> keySpec,
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);
Expand Down
2 changes: 0 additions & 2 deletions jdk/test/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down