Class SigningCertificateV2
java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.signed.SigningCertificateV2
- All Implemented Interfaces:
SignatureAttribute<Element>
,SigningCertificateInterface
,Cloneable
,CertSelector
,org.bouncycastle.util.Selector<Certificate>
public class SigningCertificateV2 extends Object implements SigningCertificateInterface
O esquema do atributo retirado do ETSI EN 319 132-1 V1.2.1
<xsd:element name="SigningCertificateV2" type="CertIDListV2Type"/>
<xsd:complexType name="CertIDListV2Type">
<xsd:sequence>
<xsd:element name="Cert" type="CertIDTypeV2" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CertIDTypeV2">
<xsd:sequence>
<xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
<xsd:element name="IssuerSerialV2" type="xsd:base64Binary" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
</xsd:complexType>
<xsd:complexType name="DigestAlgAndValueType">
<xsd:sequence>
<xsd:element ref="ds:DigestMethod"/>
<xsd:element ref="ds:DigestValue"/>
</xsd:sequence>
</xsd:complexType>
-
Field Summary
Fields Modifier and Type Field Description static String
IDENTIFIER
protected SignatureVerifier
signatureVerifier
protected Element
signingCertificateV2Element
-
Constructor Summary
Constructors Constructor Description SigningCertificateV2(AbstractVerifier signatureVerifier, Integer index)
SigningCertificateV2(List<Certificate> certs, String digestAlgorithm)
SigningCertificateV2(List<Certificate> certs, org.bouncycastle.asn1.ASN1ObjectIdentifier digestIdentifier)
SigningCertificateV2(List<Certificate> certs, org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithm)
SigningCertificateV2(Element genericEncoding)
-
Method Summary
Modifier and Type Method Description CertSelector
clone()
Element
getEncoded()
Retorna o atributo codificadoString
getIdentifier()
Retorna o identificador do atributoboolean
isSigned()
Informa se o atributo é assinado.boolean
isUnique()
Verifica se o atributo deve ter apenas uma instância na assinaturaboolean
match(Certificate certificate)
void
validate()
Valida o atributo de acordo com suas regras específicas (ver normas da RFC e do ETSI do respectivo tipo de assinatura para cada atributo).
-
Field Details
-
IDENTIFIER
- See Also:
- Constant Field Values
-
signingCertificateV2Element
-
signatureVerifier
-
-
Constructor Details
-
SigningCertificateV2
public SigningCertificateV2(AbstractVerifier signatureVerifier, Integer index) throws SignatureAttributeException- Throws:
SignatureAttributeException
-
SigningCertificateV2
-
SigningCertificateV2
public SigningCertificateV2(List<Certificate> certs, org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithm) throws SignatureAttributeException- Throws:
SignatureAttributeException
-
SigningCertificateV2
public SigningCertificateV2(List<Certificate> certs, org.bouncycastle.asn1.ASN1ObjectIdentifier digestIdentifier) throws SignatureAttributeException- Throws:
SignatureAttributeException
-
SigningCertificateV2
public SigningCertificateV2(List<Certificate> certs, String digestAlgorithm) throws SignatureAttributeException- Throws:
SignatureAttributeException
-
-
Method Details
-
getIdentifier
Description copied from interface:SignatureAttribute
Retorna o identificador do atributo- Specified by:
getIdentifier
in interfaceSignatureAttribute<Element>
- Returns:
- O identificador do atributo
-
validate
Description copied from interface:SignatureAttribute
Valida o atributo de acordo com suas regras específicas (ver normas da RFC e do ETSI do respectivo tipo de assinatura para cada atributo).- Specified by:
validate
in interfaceSignatureAttribute<Element>
- Throws:
SignatureAttributeException
PbadException
IOException
-
getEncoded
Description copied from interface:SignatureAttribute
Retorna o atributo codificado- Specified by:
getEncoded
in interfaceSignatureAttribute<Element>
- Returns:
- O atributo no formato em que foi parametrizado a classe
- Throws:
SignatureAttributeException
-
isSigned
public boolean isSigned()Description copied from interface:SignatureAttribute
Informa se o atributo é assinado.- Specified by:
isSigned
in interfaceSignatureAttribute<Element>
- Returns:
- Indica se o atributo é assinado
-
isUnique
public boolean isUnique()Description copied from interface:SignatureAttribute
Verifica se o atributo deve ter apenas uma instância na assinatura- Specified by:
isUnique
in interfaceSignatureAttribute<Element>
- Returns:
- Indica se o atributo deve ter apenas uma instância na assinatura
-
match
- Specified by:
match
in interfaceCertSelector
- Specified by:
match
in interfaceorg.bouncycastle.util.Selector<Certificate>
-
clone
- Specified by:
clone
in interfaceCertSelector
- Specified by:
clone
in interfaceorg.bouncycastle.util.Selector<Certificate>
- Overrides:
clone
in classObject
-