8223053: [xmldsig] Add KeyValue::EC_TYPE
Reviewed-by: mullan
This commit is contained in:
parent
88cef8d961
commit
71825293eb
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -28,7 +28,6 @@
|
||||
package javax.xml.crypto.dsig.keyinfo;
|
||||
|
||||
import java.security.KeyException;
|
||||
import java.security.KeyStore;
|
||||
import java.security.PublicKey;
|
||||
import java.security.interfaces.DSAPublicKey;
|
||||
import java.security.interfaces.RSAPublicKey;
|
||||
@ -47,6 +46,8 @@ import javax.xml.crypto.XMLStructure;
|
||||
* <choice>
|
||||
* <element ref="ds:DSAKeyValue"/>
|
||||
* <element ref="ds:RSAKeyValue"/>
|
||||
* <!-- <element ref="dsig11:ECKeyValue"/> -->
|
||||
* <!-- ECC keys (XMLDsig 1.1) will use the any element -->
|
||||
* <any namespace="##other" processContents="lax"/>
|
||||
* </choice>
|
||||
* </complexType>
|
||||
@ -75,8 +76,30 @@ import javax.xml.crypto.XMLStructure;
|
||||
* <element name="Exponent" type="ds:CryptoBinary"/>
|
||||
* </sequence>
|
||||
* </complexType>
|
||||
*
|
||||
* <complexType name="ECKeyValueType">
|
||||
* <sequence>
|
||||
* <choice>
|
||||
* <element name="ECParameters" type="dsig11:ECParametersType" />
|
||||
* <element name="NamedCurve" type="dsig11:NamedCurveType" />
|
||||
* </choice>
|
||||
* <element name="PublicKey" type="dsig11:ECPointType" />
|
||||
* </sequence>
|
||||
* <attribute name="Id" type="ID" use="optional" />
|
||||
* </complexType>
|
||||
*
|
||||
* <complexType name="NamedCurveType">
|
||||
* <attribute name="URI" type="anyURI" use="required" />
|
||||
* </complexType>
|
||||
*
|
||||
* <simpleType name="ECPointType">
|
||||
* <restriction base="ds:CryptoBinary" />
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
* A <code>KeyValue</code> instance may be created by invoking the
|
||||
* See section 4.5.2.3.1 of the W3C Recommendation for the definition
|
||||
* of ECParametersType.
|
||||
*
|
||||
* <p>A <code>KeyValue</code> instance may be created by invoking the
|
||||
* {@link KeyInfoFactory#newKeyValue newKeyValue} method of the
|
||||
* {@link KeyInfoFactory} class, and passing it a {@link
|
||||
* java.security.PublicKey} representing the value of the public key. Here is
|
||||
@ -123,6 +146,16 @@ public interface KeyValue extends XMLStructure {
|
||||
final static String RSA_TYPE =
|
||||
"http://www.w3.org/2000/09/xmldsig#RSAKeyValue";
|
||||
|
||||
/**
|
||||
* URI identifying the EC KeyValue KeyInfo type:
|
||||
* http://www.w3.org/2009/xmldsig11#ECKeyValue. This can be specified as
|
||||
* the value of the <code>type</code> parameter of the
|
||||
* {@link RetrievalMethod} class to describe a remote
|
||||
* <code>ECKeyValue</code> structure.
|
||||
*/
|
||||
final static String EC_TYPE =
|
||||
"http://www.w3.org/2009/xmldsig11#ECKeyValue";
|
||||
|
||||
/**
|
||||
* Returns the public key of this <code>KeyValue</code>.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user