Class DOMX509Data
java.lang.Object
org.apache.jcp.xml.dsig.internal.dom.DOMStructure
org.apache.jcp.xml.dsig.internal.dom.DOMX509Data
- All Implemented Interfaces:
X509Data
,XMLStructure
DOM-based implementation of X509Data.
-
Field Summary
FieldsFields inherited from interface javax.xml.crypto.dsig.keyinfo.X509Data
RAW_X509_CERTIFICATE_TYPE, TYPE
-
Constructor Summary
ConstructorsConstructorDescriptionDOMX509Data
(List<?> content) Creates a DOMX509Data.DOMX509Data
(Element xdElem) Creates aDOMX509Data
from an element. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
void
marshal
(Node parent, String dsPrefix, DOMCryptoContext context) private void
marshalCert
(X509Certificate cert, Node parent, Document doc, String dsPrefix) private void
marshalCRL
(X509CRL crl, Node parent, Document doc, String dsPrefix) private void
marshalSKI
(byte[] skid, Node parent, Document doc, String dsPrefix) private void
marshalSubjectName
(String name, Node parent, Document doc, String dsPrefix) private ByteArrayInputStream
unmarshalBase64Binary
(Element elem) private X509Certificate
private X509CRL
unmarshalX509CRL
(Element elem) Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.DOMStructure
isFeatureSupported
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.xml.crypto.XMLStructure
isFeatureSupported
-
Field Details
-
-
cf
-
-
Constructor Details
-
DOMX509Data
Creates a DOMX509Data.- Parameters:
content
- a list of one or more X.509 data types. Valid types areString
(subject names),byte[]
(subject key ids),X509Certificate
,X509CRL
, orjavax.xml.dsig.XMLStructure
objects or elements from an external namespace). The list is defensively copied to protect against subsequent modification.- Throws:
NullPointerException
- ifcontent
isnull
IllegalArgumentException
- ifcontent
is emptyClassCastException
- ifcontent
contains any entries that are not of one of the valid types mentioned above
-
DOMX509Data
Creates aDOMX509Data
from an element.- Parameters:
xdElem
- an X509Data element- Throws:
MarshalException
- if there is an error while unmarshalling
-
-
Method Details
-
getContent
- Specified by:
getContent
in interfaceX509Data
-
marshal
- Specified by:
marshal
in classDOMStructure
- Throws:
MarshalException
-
marshalSKI
-
marshalSubjectName
-
marshalCert
private void marshalCert(X509Certificate cert, Node parent, Document doc, String dsPrefix) throws MarshalException - Throws:
MarshalException
-
marshalCRL
private void marshalCRL(X509CRL crl, Node parent, Document doc, String dsPrefix) throws MarshalException - Throws:
MarshalException
-
unmarshalX509Certificate
- Throws:
MarshalException
-
unmarshalX509CRL
- Throws:
MarshalException
-
unmarshalBase64Binary
- Throws:
MarshalException
-
equals
-
hashCode
public int hashCode()
-