es.caib.signatura.api
Interface Certificate


public interface Certificate

Interface to access to the information contained into a digital certificate. It provides needed methods to get different attributes of the certificate.

Version:
1.0
Author:
Pau Carré Cardona
See Also:
Certificate

Method Summary
 java.security.cert.X509Certificate getCert()
          Returns the X509 Certificate.
 java.lang.String getCertCaName()
          Gets the name of the certification authority.
 java.lang.String getCertSubjectAlternativeNames()
          Gets the concatenation of the subject's alternate name as follows: name0 = value, name1 = value, ...
 java.lang.String getCertSubjectCommonName()
          Gets the subject's Common Name of the certificate.
 ParsedCertificate getParsedCertificate()
          Gets a ParsedCertificate object with the subject's credentials.
 boolean verify()
          Verify the certificate and its certification chain.
 

Method Detail

getCertCaName

java.lang.String getCertCaName()
Gets the name of the certification authority.

Returns:
the name of the certificate authority.

getCertSubjectCommonName

java.lang.String getCertSubjectCommonName()
Gets the subject's Common Name of the certificate.

Returns:
the subject common name.

getCertSubjectAlternativeNames

java.lang.String getCertSubjectAlternativeNames()
Gets the concatenation of the subject's alternate name as follows: name0 = value, name1 = value, ...

Returns:
a string containing the subject's alternate name of the certificate.

getCert

java.security.cert.X509Certificate getCert()
Returns the X509 Certificate.

Returns:
the X509Certificate.

getParsedCertificate

ParsedCertificate getParsedCertificate()
Gets a ParsedCertificate object with the subject's credentials.

Returns:
a ParsedCertificate object with the subject's credentials.

verify

boolean verify()
               throws java.io.IOException,
                      CertificateVerifyException
Verify the certificate and its certification chain.

Returns:
true if verification is successful false otherwise.
Throws:
java.io.IOException - if unable to access to the file.
CertificateVerifyException - if it hasn't been able to finish the verification process.


Copyright © 2010 Direcció General de Tecnologia i Comunicacions. Govern de les Illes Balears. All Rights Reserved.