es.caib.signatura.impl
Class CertificateImpl

java.lang.Object
  extended by es.caib.signatura.impl.CertificateImpl
All Implemented Interfaces:
Certificate

public class CertificateImpl
extends java.lang.Object
implements Certificate


Constructor Summary
CertificateImpl(java.security.cert.X509Certificate[] certificateChain)
          Constructor.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CertificateImpl

public CertificateImpl(java.security.cert.X509Certificate[] certificateChain)
Constructor.

Parameters:
certificateChain -
Method Detail

getCertCaName

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

Specified by:
getCertCaName in interface Certificate
Returns:
the name of the certificate authority.

getCertSubjectCommonName

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

Specified by:
getCertSubjectCommonName in interface Certificate
Returns:
the subject common name.

getCertSubjectAlternativeNames

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

Specified by:
getCertSubjectAlternativeNames in interface Certificate
Returns:
a string containing the subject's alternate name of the certificate.

getCert

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

Specified by:
getCert in interface Certificate
Returns:
the X509Certificate.

getParsedCertificate

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

Specified by:
getParsedCertificate in interface Certificate
Returns:
a ParsedCertificate object with the subject's credentials.

verify

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

Specified by:
verify in interface Certificate
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 © 2011 Direcció General de Tecnologia i Comunicacions. Govern de les Illes Balears. All Rights Reserved.