public interface CertID extends XMLStructure
CertID
type as defined in ETSI TS 101
933 v1.3.2.
The XML Schema Definition is defined as:
<xsd:complexType name="CertIDType"> <xsd:sequence> <xsd:element name="CertDigest" type="DigestAlgAndValueType"/> <xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/> </xsd:sequence> <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/> </xsd:complexType>
A CertID
may be created by invoking one of the
newCertID
methods of the
QualifyingPropertiesFactory
class; for example
XMLSignatureFactory sfac = XMLSignatureFactory.getInstance("DOM"); QualifyingPropertiesFactory qfac = QualifyingPropertiesFactory.getInstance("DOM"); CertificateFactory cfac = CertificateFactory.getInstance("X509"); X509Certificate cert = (X509Certificate) cfac.generateCertificate(certIS); CertID certId = qfac.newCertID(null, cert, sfac.newDigestMethod(DigestMethod.SHA1, null));
Modifier and Type | Method and Description |
---|---|
DigestAlgAndValue |
getCertDigest()
Returns the
CertDigest . |
IssuerSerial |
getIssuerSerial()
Returns the
IssuerSerial . |
String |
getURI()
Returns the URI reference.
|
boolean |
validate(XMLCryptoContext context,
Data digestInput)
Validates the digest value.
|
isFeatureSupported
String getURI()
IssuerSerial getIssuerSerial()
IssuerSerial
.IssuerSerial
DigestAlgAndValue getCertDigest()
CertDigest
.CertDigest
boolean validate(XMLCryptoContext context, Data digestInput) throws XMLSignatureException
The input for the digest computation is obtained from the given
digestInput
if present, or alternatively from the dereferenced
URI reference of the CertID
. If no digestInput
is
given or no URI reference is present or could be dereferenced successfully
an XMLSignatureException
is thrown. If no digestInput
is given the method only validates the reference the first time it is
invoked. On subsequent invocations, it returns a cached result unless a
digestinput is provided.
context
- the validation contextdigestInput
- the input for the digest computationtrue
if the digest value validated successfully;
false
otherwiseNullPointerException
- if context
is null
XMLSignatureException
- if an unexpected exception occurs while validating the digest value© 2002-2005 IAIK, © 2004, 2006 - 2017 Stiftung SIC