Class AbstractSignerAttr
java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.cades.attributes.signed.AbstractSignerAttr
- All Implemented Interfaces:
SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
- Direct Known Subclasses:
IdAaEtsSignerAttr,SignerAttributeV2
public class AbstractSignerAttr extends Object implements SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
-
Field Summary
Fields Modifier and Type Field Description protected booleanhasOtherAttrCertsprotected booleanhasSignedAssertionprotected Stringidentifierprotected SignatureAttributeExceptiontoBeThrown -
Constructor Summary
Constructors Constructor Description AbstractSignerAttr(String identifier, boolean hasOtherAttrCerts, boolean hasSignedAssertion, AbstractVerifier signatureVerifier, Integer index)AbstractSignerAttr(String identifier, boolean hasOtherAttrCerts, boolean hasSignedAssertion, org.bouncycastle.asn1.cms.Attribute genericEncoding)AbstractSignerAttr(String identifier, Map<org.bouncycastle.asn1.ASN1ObjectIdentifier,List<org.bouncycastle.asn1.ASN1Encodable>> claimedAttributes, List<org.bouncycastle.asn1.x509.AttributeCertificate> attributeCertificates)AbstractSignerAttr(String identifier, Map<org.bouncycastle.asn1.ASN1ObjectIdentifier,List<org.bouncycastle.asn1.ASN1Encodable>> claimedAttributes, List<org.bouncycastle.asn1.x509.AttributeCertificate> attributeCertificates, List<org.bouncycastle.asn1.ASN1Encodable> signerAssertions) -
Method Summary
Modifier and Type Method Description protected voiddecode(org.bouncycastle.asn1.cms.Attribute genericEncoding)protected voiddecodeAttributeCertificates(org.bouncycastle.asn1.ASN1Object object)protected voiddecodeAttributeCertificatesV2(org.bouncycastle.asn1.ASN1Object object)List<org.bouncycastle.asn1.x509.AttributeCertificate>getAttributeCertificates()Map<org.bouncycastle.asn1.ASN1ObjectIdentifier,List<org.bouncycastle.asn1.ASN1Encodable>>getClaimedAttributes()org.bouncycastle.asn1.cms.AttributegetEncoded()Retorna o atributo codificadoprotected org.bouncycastle.asn1.DERTaggedObjectgetEncodedAttributeCertificates()StringgetIdentifier()Retorna o identificador do atributoList<org.bouncycastle.asn1.ASN1Encodable>getSignedAssertions()AttributeValueReportgetValue()booleanisSigned()Informa se o atributo é assinado.booleanisUnique()Verifica se o atributo deve ter apenas uma instância na assinaturavoidvalidate()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
-
hasOtherAttrCerts
protected final boolean hasOtherAttrCerts -
hasSignedAssertion
protected final boolean hasSignedAssertion -
toBeThrown
-
-
Constructor Details
-
AbstractSignerAttr
-
AbstractSignerAttr
-
AbstractSignerAttr
public AbstractSignerAttr(String identifier, boolean hasOtherAttrCerts, boolean hasSignedAssertion, org.bouncycastle.asn1.cms.Attribute genericEncoding) throws SignatureAttributeException- Throws:
SignatureAttributeException
-
AbstractSignerAttr
public AbstractSignerAttr(String identifier, boolean hasOtherAttrCerts, boolean hasSignedAssertion, AbstractVerifier signatureVerifier, Integer index) throws SignatureAttributeException- Throws:
SignatureAttributeException
-
-
Method Details
-
getIdentifier
Description copied from interface:SignatureAttributeRetorna o identificador do atributo- Specified by:
getIdentifierin interfaceSignatureAttribute<org.bouncycastle.asn1.cms.Attribute>- Returns:
- O identificador do atributo
-
validate
Description copied from interface:SignatureAttributeValida 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:
validatein interfaceSignatureAttribute<org.bouncycastle.asn1.cms.Attribute>- Throws:
SignatureAttributeException
-
isSigned
public boolean isSigned()Description copied from interface:SignatureAttributeInforma se o atributo é assinado.- Specified by:
isSignedin interfaceSignatureAttribute<org.bouncycastle.asn1.cms.Attribute>- Returns:
- Indica se o atributo é assinado
-
isUnique
public boolean isUnique()Description copied from interface:SignatureAttributeVerifica se o atributo deve ter apenas uma instância na assinatura- Specified by:
isUniquein interfaceSignatureAttribute<org.bouncycastle.asn1.cms.Attribute>- Returns:
- Indica se o atributo deve ter apenas uma instância na assinatura
-
decode
protected void decode(org.bouncycastle.asn1.cms.Attribute genericEncoding) throws SignatureAttributeException- Throws:
SignatureAttributeException
-
decodeAttributeCertificates
protected void decodeAttributeCertificates(org.bouncycastle.asn1.ASN1Object object) throws SignatureAttributeException- Throws:
SignatureAttributeException
-
decodeAttributeCertificatesV2
protected void decodeAttributeCertificatesV2(org.bouncycastle.asn1.ASN1Object object) throws SignatureAttributeException- Throws:
SignatureAttributeException
-
getClaimedAttributes
-
getAttributeCertificates
-
getSignedAssertions
public List<org.bouncycastle.asn1.ASN1Encodable> getSignedAssertions() throws SignatureAttributeException- Throws:
SignatureAttributeException
-
getEncoded
public org.bouncycastle.asn1.cms.Attribute getEncoded()Description copied from interface:SignatureAttributeRetorna o atributo codificado- Specified by:
getEncodedin interfaceSignatureAttribute<org.bouncycastle.asn1.cms.Attribute>- Returns:
- O atributo no formato em que foi parametrizado a classe
-
getEncodedAttributeCertificates
protected org.bouncycastle.asn1.DERTaggedObject getEncodedAttributeCertificates() -
getValue
- Specified by:
getValuein interfaceSignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
-