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 Details

    • identifier

      protected final String identifier
    • hasOtherAttrCerts

      protected final boolean hasOtherAttrCerts
    • hasSignedAssertion

      protected final boolean hasSignedAssertion
    • toBeThrown

      protected SignatureAttributeException toBeThrown
  • Constructor Details

    • AbstractSignerAttr

      public 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)
    • AbstractSignerAttr

      public AbstractSignerAttr​(String identifier, Map<org.bouncycastle.asn1.ASN1ObjectIdentifier,​List<org.bouncycastle.asn1.ASN1Encodable>> claimedAttributes, List<org.bouncycastle.asn1.x509.AttributeCertificate> attributeCertificates)
    • 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

      public String getIdentifier()
      Description copied from interface: SignatureAttribute
      Retorna o identificador do atributo
      Specified by:
      getIdentifier in interface SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
      Returns:
      O identificador do atributo
    • validate

      public void validate() throws SignatureAttributeException
      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 interface SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
      Throws:
      SignatureAttributeException
    • isSigned

      public boolean isSigned()
      Description copied from interface: SignatureAttribute
      Informa se o atributo é assinado.
      Specified by:
      isSigned in interface SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
      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 interface SignatureAttribute<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

      public Map<org.bouncycastle.asn1.ASN1ObjectIdentifier,​List<org.bouncycastle.asn1.ASN1Encodable>> getClaimedAttributes()
    • getAttributeCertificates

      public List<org.bouncycastle.asn1.x509.AttributeCertificate> 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: SignatureAttribute
      Retorna o atributo codificado
      Specified by:
      getEncoded in interface SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
      Returns:
      O atributo no formato em que foi parametrizado a classe
    • getEncodedAttributeCertificates

      protected org.bouncycastle.asn1.DERTaggedObject getEncodedAttributeCertificates()