Class IdAaEtsArchiveTimestampV3
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.IdAaEtsArchiveTimestampV3
- All Implemented Interfaces:
SignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
,Comparable<TimeStamp<org.bouncycastle.asn1.cms.Attribute>>
public class IdAaEtsArchiveTimestampV3 extends TimeStampToken
O atributo IdAaEtsArchiveTimestampV3 representa o carimbo do tempo de arquivamento.
Oid e esquema do atributo id-aa-ets-archiveTimestampV3 retirado do documento ETSI EN 319 122-1 V1.2.1
id-aa-ets-archiveTimestampV3 OBJECT IDENTIFIER ::= { itu-t(0) identified-organization(4) etsi(0) electronic-signature-standard(1733) attributes(2) 4 } ArchiveTimeStampToken ::= TimeStampToken ATSHashIndexV3 ::= SEQUENCE { hashIndAlgorithm AlgorithmIdentifier, certificatesHashIndex SEQUENCE OF OCTET STRING, crlsHashIndex SEQUENCE OF OCTET STRING, unsignedAttrValuesHashIndex SEQUENCE OF OCTET STRING }
-
Field Summary
Fields Modifier and Type Field Description ATSHashIndexV3
hashIndex
static String
IDENTIFIER
Fields inherited from class br.ufsc.labsec.signature.conformanceVerifier.cades.attributes.unsigned.TimeStampToken
FAILURE_TO_VALIDATE_TIMESTAMP, INVALID_ASYMMETRIC_CIPHER_ERROR, INVALID_TIMESTAMP_ERROR
Fields inherited from class br.ufsc.labsec.signature.conformanceVerifier.cades.attributes.TimeStamp
contentInfo
-
Constructor Summary
Constructors Constructor Description IdAaEtsArchiveTimestampV3(AbstractVerifier signatureVerifier, Integer index)
IdAaEtsArchiveTimestampV3(org.bouncycastle.asn1.cms.Attribute genericEncoding)
Constrói um objetoIdAaEtsArchiveTimestampV3
IdAaEtsArchiveTimestampV3(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
Constrói um objetoIdAaEtsArchiveTimestampV3
a partir de umContentInfo
. -
Method Summary
Modifier and Type Method Description protected byte[]
getAttributeHash(String hashAlgorithmId, boolean hashWithoutTag)
Calcula o hash do atributoprotected byte[]
getAttributeHash(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier, boolean hashWithoutTag)
String
getIdentifier()
Obtém o identificador do atributoprotected boolean
isAttributeHashValid(String identifier, boolean hashWithoutTag, byte[] expected)
Methods inherited from class br.ufsc.labsec.signature.conformanceVerifier.cades.attributes.unsigned.TimeStampToken
createSignerInformationVerifier, getArchiveTimeStampContentInfo, getAttributeHash, getEncoded, isAnyAttributeHashValid, isAttributeHashValid, isSigned, isUnique, makeTimeStampVerifier, validate, validate
Methods inherited from class br.ufsc.labsec.signature.conformanceVerifier.cades.attributes.TimeStamp
addUnsignedAttribute, buildTimeStampToken, compareTo, contentInfoToSignatureContainer, getAttributeList, getContentInfo, getEncodedAttribute, getEncodedAttribute, getTimeReference, removeUnsignedAttribute, replaceUnsignedAttribute
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface br.ufsc.labsec.signature.conformanceVerifier.common.SignatureAttribute
getValue
-
Field Details
-
IDENTIFIER
- See Also:
- Constant Field Values
-
hashIndex
-
-
Constructor Details
-
IdAaEtsArchiveTimestampV3
public IdAaEtsArchiveTimestampV3(org.bouncycastle.asn1.cms.Attribute genericEncoding) throws SignatureAttributeExceptionConstrói um objetoIdAaEtsArchiveTimestampV3
- Parameters:
genericEncoding
- O atributo codificado.- Throws:
SignatureAttributeException
-
IdAaEtsArchiveTimestampV3
public IdAaEtsArchiveTimestampV3(org.bouncycastle.asn1.cms.ContentInfo contentInfo) throws SignatureAttributeExceptionConstrói um objetoIdAaEtsArchiveTimestampV3
a partir de umContentInfo
.- Parameters:
contentInfo
- O conteúdo do carimbo do tempo- Throws:
SignatureAttributeException
-
IdAaEtsArchiveTimestampV3
public IdAaEtsArchiveTimestampV3(AbstractVerifier signatureVerifier, Integer index) throws SignatureAttributeException- Throws:
SignatureAttributeException
-
-
Method Details
-
getAttributeHash
protected byte[] getAttributeHash(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier, boolean hashWithoutTag) throws NoSuchAlgorithmException, PbadException -
getAttributeHash
protected byte[] getAttributeHash(String hashAlgorithmId, boolean hashWithoutTag) throws PbadException, NoSuchAlgorithmExceptionDescription copied from class:TimeStampToken
Calcula o hash do atributo- Specified by:
getAttributeHash
in classTimeStampToken
- Parameters:
hashAlgorithmId
- O algoritmo utilizadohashWithoutTag
- 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:
PbadException
- Exceção em caso de erro durante o cálculoNoSuchAlgorithmException
-
isAttributeHashValid
- Specified by:
isAttributeHashValid
in classTimeStampToken
-
getIdentifier
Description copied from class:TimeStamp
Obtém o identificador do atributo- Specified by:
getIdentifier
in interfaceSignatureAttribute<org.bouncycastle.asn1.cms.Attribute>
- Specified by:
getIdentifier
in classTimeStamp<org.bouncycastle.asn1.cms.Attribute>
- Returns:
- O identificador do atributo
-