|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.caib.signatura.provider.tradise.TradiseSignature
public class TradiseSignature
Implementación de la interfaz SignatureData para usar con la
entidad certificadora Tradisea
Signer,
Signature,
Serialized Form| Field Summary | |
|---|---|
protected byte[] |
signatureBytes
|
| Constructor Summary | |
|---|---|
TradiseSignature(byte[] pkcs7,
java.lang.String contentType)
Crea un nuevo objeto a partir de los atributos de la clase. |
|
TradiseSignature(SignatureProviderInterface impl)
|
|
| Method Summary | |
|---|---|
java.security.cert.X509Certificate |
getCert()
Returns the X509 certificate used to sign. |
java.lang.String |
getCertCaName()
Obtiene el nombre de la entidad certificadora usada en la firma |
java.security.cert.X509Certificate[] |
getCertificateChain()
Returns the certificate chain. |
java.lang.String |
getCertSubjectAlternativeNames()
Gets the concatenation of the subject's alternate name of the certificate used to sign as follows: name0 = value, name1 = value, ... |
java.lang.String |
getCertSubjectCommonName()
Obtiene el nombre del certificado usado en la firma |
protected java.lang.String |
getClassLoaderName()
|
java.lang.String |
getContentType()
Returns the content type of the signature. |
java.util.Date |
getDate()
Gets the date of the signature timestamp. |
protected java.lang.String |
getImplClassName()
|
ParsedCertificate |
getParsedCertificate()
Gets a ParsedCertificate object with the subject's credentials. |
byte[] |
getPkcs7()
Returns the signature in PKCS#7 format. |
boolean |
verify()
Determinate the certificate validity of the signature. |
boolean |
verify(java.io.InputStream contentStream)
Verifies the digital signature of a document. |
boolean |
verifyAPosterioriTimestamp(java.io.InputStream contentStream)
Verifies the digital signature of a document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected byte[] signatureBytes
| Constructor Detail |
|---|
public TradiseSignature(byte[] pkcs7,
java.lang.String contentType)
throws SignatureDataException
Signature para crear una firma. Se extrae el certificado
de la firma y se guarda en la propiedad transient
certificate para usarla en los métodos que dan información concreta del
certificado
signatureBytes - array de bytes con la firma digital generada por la api del
proveedor de firma electrónica
SignatureDataExceptionpublic TradiseSignature(SignatureProviderInterface impl)
| Method Detail |
|---|
protected java.lang.String getClassLoaderName()
protected java.lang.String getImplClassName()
public java.lang.String getCertCaName()
getCertCaName in interface Signaturepublic java.lang.String getCertSubjectCommonName()
getCertSubjectCommonName in interface Signaturepublic java.lang.String getCertSubjectAlternativeNames()
Signature
getCertSubjectAlternativeNames in interface Signaturepublic byte[] getPkcs7()
Signature
getPkcs7 in interface Signature
public java.util.Date getDate()
throws SignatureTimestampException
Signature
getDate in interface Signaturenull if the signature doesn't include timestamp.
SignatureTimestampException
public boolean verify()
throws SignatureVerifyException
Signature
verify in interface Signaturetrue if the certificate is valid; false otherwise.
SignatureVerifyExceptionSigner.verify(java.io.InputStream, es.caib.signatura.api.Signature)public java.lang.String getContentType()
Signature
getContentType in interface Signaturepublic java.security.cert.X509Certificate getCert()
Signature
getCert in interface Signature
public java.security.cert.X509Certificate[] getCertificateChain()
throws java.lang.Exception
Signature
getCertificateChain in interface Signaturejava.lang.Exceptionpublic ParsedCertificate getParsedCertificate()
Signature
getParsedCertificate in interface Signature
public boolean verifyAPosterioriTimestamp(java.io.InputStream contentStream)
throws SignatureProviderException,
java.io.IOException,
SignatureVerifyException
Signature
verifyAPosterioriTimestamp in interface SignaturecontentStream - byte stream of the document.
true if the verification process is correct; false otherwise.
SignatureProviderException - If the API provider cannot be accessed.
java.io.IOException - If the document or the timestamp server is not available.
SignatureVerifyException - If failed the verification process.
public boolean verify(java.io.InputStream contentStream)
throws SignatureProviderException,
java.io.IOException,
SignatureVerifyException
Signature
verify in interface SignaturecontentStream - byte stream of the document.
true if the verification process is correct; false otherwise.
SignatureProviderException - If the API provider cannot be accessed.
java.io.IOException - If the document or the timestamp server is not available.
SignatureVerifyException - If failed the verification process.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||