Class SigAndRefsTimeStamp
java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.unsigned.TimeStamp
br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.unsigned.TimeStampToken
br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.unsigned.SigAndRefsTimeStamp
- All Implemented Interfaces:
SignatureAttribute<Element>
,Comparable
public class SigAndRefsTimeStamp extends TimeStampToken
Representa o carimbo do tempo sobre as referências.
Esquema do atributo SigAndRefsTimeStamp retirado do ETSI TS 101 903:
<xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
-
Field Summary
Fields Modifier and Type Field Description static String
IDENTIFIER
static List<String>
mandatoryAttributes
static List<String>
optionalAttributes
Fields inherited from class br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.unsigned.TimeStamp
signatureContainer, signatureVerifier
-
Constructor Summary
Constructors Constructor Description SigAndRefsTimeStamp(CadesSignatureContainer signatureContainer)
Construtor usado para criar um novo carimbo do tempo.SigAndRefsTimeStamp(AbstractVerifier signatureVerifier, Integer index)
Construtor usado para verificação do atributoSigAndRefsTimeStamp(Element genericEncoding)
Construtor usado para decodificar carimbos do tempo e obter dados dos mesmos ou alterar os seus atributos não assinados. -
Method Summary
Modifier and Type Method Description protected byte[]
getAttributeHash(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier)
Calcula o hash do atributoprotected String
getElementName()
Retorna a tag XML do atributoString
getIdentifier()
Retorna o identificador do atributoprotected boolean
isAttributeHashValid(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier, byte[] expected)
protected TimeStampVerifierInterface
makeTimeStampVerifier(boolean containsRefsTimestamp, boolean containsArchiveTimestamp)
Cria um objetoTimeStampVerifierInterface
Methods inherited from class br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.unsigned.TimeStampToken
createSignerInformationVerifier, decode, getEncoded, getReport, isSigned, isUnique, validate, validate
Methods inherited from class br.ufsc.labsec.signature.conformanceVerifier.xades.attributes.unsigned.TimeStamp
addUnsignedAttribute, buildTimeStampToken, compareTo, getContentInfo, getTimeReference
-
Field Details
-
IDENTIFIER
- See Also:
- Constant Field Values
-
mandatoryAttributes
-
optionalAttributes
-
-
Constructor Details
-
SigAndRefsTimeStamp
public SigAndRefsTimeStamp(AbstractVerifier signatureVerifier, Integer index) throws SignatureAttributeExceptionConstrutor usado para verificação do atributo- Parameters:
signatureVerifier
- Usado para criar e verificar o atributoindex
- Índice usado para selecionar o atributo- Throws:
SignatureAttributeException
-
SigAndRefsTimeStamp
Construtor usado para criar um novo carimbo do tempo.- Parameters:
signatureContainer
- O conteúdo do carimbo do tempo
-
SigAndRefsTimeStamp
Construtor usado para decodificar carimbos do tempo e obter dados dos mesmos ou alterar os seus atributos não assinados.- Parameters:
genericEncoding
- O atributo codificado- Throws:
SignatureAttributeException
-
-
Method Details
-
getIdentifier
Retorna o identificador do atributo- Specified by:
getIdentifier
in interfaceSignatureAttribute<Element>
- Specified by:
getIdentifier
in classTimeStamp
- Returns:
- O identificador do atributo
-
getElementName
Retorna a tag XML do atributo- Specified by:
getElementName
in classTimeStampToken
- Returns:
- Retorna "XAdES:SigAndRefsTimeStamp"
-
getAttributeHash
protected byte[] getAttributeHash(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier) throws PbadException, NoSuchAlgorithmExceptionCalcula o hash do atributo- Specified by:
getAttributeHash
in classTimeStamp
- Parameters:
identifier
- O algoritmo utilizado- Returns:
- O valor de hash do atributo
- Throws:
PbadException
- Exceção em caso de erro durante o cálculoNoSuchAlgorithmException
-
isAttributeHashValid
protected boolean isAttributeHashValid(org.bouncycastle.asn1.ASN1ObjectIdentifier identifier, byte[] expected) throws PbadException- Specified by:
isAttributeHashValid
in classTimeStamp
- Throws:
PbadException
-
makeTimeStampVerifier
protected TimeStampVerifierInterface makeTimeStampVerifier(boolean containsRefsTimestamp, boolean containsArchiveTimestamp) throws EncodingException, IOExceptionCria um objetoTimeStampVerifierInterface
- Overrides:
makeTimeStampVerifier
in classTimeStampToken
- Returns:
- O objeto criado
- Throws:
EncodingException
IOException
-