Class PAdESLTProfile
java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.signaturePolicy.decoder.Profile<Object,PadesSignature>
br.ufsc.labsec.signature.conformanceVerifier.signaturePolicy.decoder.PAdESProfiles.PAdESProfileAbstract
br.ufsc.labsec.signature.conformanceVerifier.signaturePolicy.decoder.PAdESProfiles.PAdESLTProfile
- All Implemented Interfaces:
SignaturePolicyInstance
public class PAdESLTProfile extends PAdESProfileAbstract
-
Nested Class Summary
Nested classes/interfaces inherited from class br.ufsc.labsec.signature.conformanceVerifier.signaturePolicy.decoder.Profile
Profile.AdESLevel, Profile.AdESType
-
Field Summary
Fields inherited from class br.ufsc.labsec.signature.conformanceVerifier.signaturePolicy.decoder.Profile
conditionalSignedAttributeList, conditionalUnsignedAttributeList, mandatedConditionalSignedAttributeList, mandatedSignedAttributeList, mandatedUnsignedAttributeList, prohibitedSignedAttributeList, prohibitedUnsignedAttributeList
-
Constructor Summary
Constructors Constructor Description PAdESLTProfile()
-
Method Summary
Modifier and Type Method Description Profile.AdESLevel
getAdESLevel()
Retorna o nível do perfilProfile.AdESType
getAdESType()
Retorna o tipo da política.AlgorithmIdentifier
getAlgorithmIdentifier()
Retorna o atributoSignPolicyHashAlg
.byte[]
getEncoded()
Retorna os bytes da políticabyte[]
getEncodedHash(String algorithm)
byte[]
getExpectedSignPolicyInfoHash()
Retorna o atributoSignPolicyHash
.String
getSignPolicyIdentifier()
Retorna o oid da política.List<String>
getWarningAttributeList()
Método que retorna a lista de atributos que geram warningsboolean
isAtLeast(Profile.AdESLevel level)
boolean
isFound()
Informa se a política está incorretamente definidaboolean
isXML()
Verifica se a Política de Assinatura é XMLboolean
validateHash()
verifica o resumo criptográfico do SignPolicyInfo da políticaorg.apache.commons.lang3.tuple.Pair<Boolean,List<String>>
validateMandatoryConditionals(Signature<Object> signature, List<String> attrList)
Methods inherited from class br.ufsc.labsec.signature.conformanceVerifier.signaturePolicy.decoder.PAdESProfiles.PAdESProfileAbstract
getMandatedSignatureDictionaryEntries, getNormativeReference, getProhibitedSignatureDictionaryEntries, setDictionaryEntriesCondition, validate, verifyDictionary
Methods inherited from class br.ufsc.labsec.signature.conformanceVerifier.signaturePolicy.decoder.Profile
addMandatoryConditionals, getAdES, getIdentifier, getMandatedConditionalSignedAttributeList, getMandatedSignedAttrs, getMandatedUnsignedAttributeList, getMandatedUnsignedAttrs, getProhibitedSignedAttrs, getProhibitedUnsignedAttrs, getSignaturePolicyName, getSignaturePolicyType, getSignatureValidationPolicy, isInstanceOf, loadAttributes, validate, validateMandatoryConditionalsLocal
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.signaturePolicy.decoder.SignaturePolicyInstance
isNotFound
-
Constructor Details
-
PAdESLTProfile
public PAdESLTProfile()
-
-
Method Details
-
getAdESType
Retorna o tipo da política.- Returns:
- tipo da política
-
getAdESLevel
Retorna o nível do perfil- Specified by:
getAdESLevel
in interfaceSignaturePolicyInstance
- Specified by:
getAdESLevel
in classProfile<Object,PadesSignature>
- Returns:
- string informando o tipo de perfil
-
getAlgorithmIdentifier
Retorna o atributoSignPolicyHashAlg
.- Returns:
- O valor do atributo
-
getSignPolicyIdentifier
Retorna o oid da política.- Returns:
- O valor do oid da política
-
getExpectedSignPolicyInfoHash
public byte[] getExpectedSignPolicyInfoHash()Retorna o atributoSignPolicyHash
.- Returns:
- O valor do atributo
-
getEncoded
public byte[] getEncoded()Retorna os bytes da política- Returns:
- array de bytes da política
-
getEncodedHash
- Parameters:
algorithm
-- Returns:
- Throws:
NoSuchAlgorithmException
-
isFound
public boolean isFound()Informa se a política está incorretamente definida- Returns:
- se a política está incorretamente definida
-
isXML
public boolean isXML()Verifica se a Política de Assinatura é XML- Returns:
- Indica se a Política de Assinatura é XML
-
validateHash
public boolean validateHash() throws IOException, NoSuchAlgorithmException, TransformerFactoryConfigurationError, TransformerExceptionverifica o resumo criptográfico do SignPolicyInfo da política- Returns:
- verdadeiro se o resumo criptográfico é o esperado
- Throws:
IOException
- Caso não seja possível ler os bytes da políticaNoSuchAlgorithmException
- Caso o algoritmo de resumo criptográfico esteja mal definidoTransformerFactoryConfigurationError
- Caso não seja possível transformar uma política em XMLTransformerException
- Caso não seja possível transformar uma política em XML
-
isAtLeast
- Specified by:
isAtLeast
in classProfile<Object,PadesSignature>
-
validateMandatoryConditionals
public org.apache.commons.lang3.tuple.Pair<Boolean,List<String>> validateMandatoryConditionals(Signature<Object> signature, List<String> attrList)- Overrides:
validateMandatoryConditionals
in classPAdESProfileAbstract
-
getWarningAttributeList
Description copied from class:Profile
Método que retorna a lista de atributos que geram warnings- Specified by:
getWarningAttributeList
in classProfile<Object,PadesSignature>
- Returns:
- lista de atributos que geram warnings
-