java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.cades.attributes.TimeStamp<org.bouncycastle.asn1.cms.Attribute>
br.ufsc.labsec.signature.conformanceVerifier.cades.attributes.unsigned.TimeStampToken
br.ufsc.labsec.signature.conformanceVerifier.cades.attributes.unsigned.IdAaSignatureTimeStampToken
All Implemented Interfaces:
SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>, Comparable<TimeStamp<org.bouncycastle.asn1.cms.Attribute>>

public class IdAaSignatureTimeStampToken
extends TimeStampToken
Representa o carimbo do tempo da assinatura.

Oid e esquema do atributo id-aa-signatureTimeStampToken retirado do documento ETSI TS 101 733 V1.8.1:

 id-aa-signatureTimeStampToken OBJECT IDENTIFIER ::= { iso(1) member-body(2)
 us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-aa(2) 14}

 SignatureTimeStampToken ::= TimeStampToken
 
  • Field Details

    • IDENTIFIER

      public static final String IDENTIFIER
  • Constructor Details

  • Method Details

    • getIdentifier

      public String getIdentifier()
      Indica o identificador do atributo.
      Specified by:
      getIdentifier in interface SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
      Specified by:
      getIdentifier in class TimeStamp<org.bouncycastle.asn1.cms.Attribute>
      Returns:
      Retorna "1.2.840.113549.1.9.16.2.14"
    • getAttributeHash

      protected byte[] getAttributeHash​(String identifier, boolean hashWithoutTag) throws NoSuchAlgorithmException
      Calcula o hash do atributo
      Specified by:
      getAttributeHash in class TimeStampToken
      Parameters:
      identifier - O algoritmo utilizado
      hashWithoutTag - Indica a forma de cálculo da hash, de acordo com as notas 2 e 3 da pagina 109 do ETSI TS 101 733 V2.2.1. Se verdadeiro indica que o calculo é feito sem incluir tag e length.
      Returns:
      O valor de hash do atributo
      Throws:
      NoSuchAlgorithmException
    • isAttributeHashValid

      protected boolean isAttributeHashValid​(String identifier, boolean hashWithoutTag, byte[] expected)
      Specified by:
      isAttributeHashValid in class TimeStampToken
    • makeTimeStampVerifier

      protected TimeStampVerifier makeTimeStampVerifier​(org.bouncycastle.tsp.TimeStampToken timeStamp, boolean containsRefsTimestamp, boolean containsArchiveTimestamp)
      Overrides:
      makeTimeStampVerifier in class TimeStampToken
      Returns:
      O objeto TimeStampVerifier criado