Class TSLCertificateExtensionAnalyzer
- java.lang.Object
-
- es.gob.afirma.tsl.parsing.impl.common.TSLCertificateExtensionAnalyzer
-
public class TSLCertificateExtensionAnalyzer extends java.lang.ObjectUtilities wrapper for analyze the extensions defined in a specific X509v3 certificate.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
- Version:
- 1.2, 19/09/2022.
-
-
Constructor Summary
Constructors Constructor Description TSLCertificateExtensionAnalyzer(java.security.cert.X509Certificate cert)Constructor method for the class TSLCertificateExtensionAnalyzer.java.TSLCertificateExtensionAnalyzer(org.bouncycastle.asn1.x509.Certificate cert)Constructor method for the class TSLCertificateExtensionAnalyzer.java.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.asn1.x509.CertificategetCertificate()Gets the certificate associated to this analyzer.java.util.List<java.lang.String>getPolicyInformationsOids()Gets the value of the attributepolicyInformationsOids.java.util.List<java.lang.String>getQcStatementExtEuTypeOids()Gets the value of the attributeqcStatementExtEuTypeOids.java.util.List<java.lang.String>getQcStatementsOids()Gets the value of the attributeqcStatementsOids.booleanhasCertPolPolInfExtensionOid(java.lang.String certPolPolInfOid)Checks if the certificate has the Certification Policies - Policy Information Extension OID.booleanhasQcStatementEuTypeExtensionOid(java.lang.String qcStatementEuTypeOid)Checks if the certificate has the input QcStatement EuType Extension OID.booleanhasQcStatementExtensionOid(java.lang.String qcStatementOid)Checks if the certificate has the input QcStatement Extension OID.booleanhasSomeCertPolPolInfExtensionOid(java.util.List<java.lang.String> certPolPolInfOidsList)Checks if the certificate has some of the input Certification Policies - Policy Information Extension OIDs.booleanhasSomeQcStatementExtensionOid(java.util.List<java.lang.String> qcStatementOidsList)Checks if the certificate has the input QcStatement Extension OID.booleanisThereSomeCertPolPolInfExtension()Checks if the certificate has some Certification Policies - Policy Information extension.booleanisThereSomeQcStatementEuTypeExtension()Checks if the certificate has the QcStatement EuType extension.booleanisThereSomeQcStatementExtension()Checks if the certificate has some QcStatement extension.
-
-
-
Constructor Detail
-
TSLCertificateExtensionAnalyzer
public TSLCertificateExtensionAnalyzer(java.security.cert.X509Certificate cert) throws TSLCertificateValidationExceptionConstructor method for the class TSLCertificateExtensionAnalyzer.java.- Parameters:
cert- X509v3 certificate to analyze.- Throws:
TSLCertificateValidationException- If the input certificate isnull, or there is some error extracting its information.
-
TSLCertificateExtensionAnalyzer
public TSLCertificateExtensionAnalyzer(org.bouncycastle.asn1.x509.Certificate cert) throws TSLCertificateValidationExceptionConstructor method for the class TSLCertificateExtensionAnalyzer.java.- Parameters:
cert- X509v3 Certificate (Bouncy Castle Provider implementation) to analyze.- Throws:
TSLCertificateValidationException- If the input certificate isnull, or there is some error extracting its information.
-
-
Method Detail
-
getCertificate
public final org.bouncycastle.asn1.x509.Certificate getCertificate()
Gets the certificate associated to this analyzer.- Returns:
- X509v3 certificate used in this analyzer.
-
getQcStatementsOids
public final java.util.List<java.lang.String> getQcStatementsOids()
Gets the value of the attributeqcStatementsOids.- Returns:
- the value of the attribute
qcStatementsOids.
-
isThereSomeQcStatementExtension
public final boolean isThereSomeQcStatementExtension()
Checks if the certificate has some QcStatement extension.- Returns:
trueif the certificate has some QcStatement extension, otherwisefalse.
-
hasQcStatementExtensionOid
public final boolean hasQcStatementExtensionOid(java.lang.String qcStatementOid)
Checks if the certificate has the input QcStatement Extension OID.- Parameters:
qcStatementOid- QcStatement Extension OID inStringrepresentation.- Returns:
trueif the certificate has the QcStatement Extension OID, otherwisefalse.
-
hasSomeQcStatementExtensionOid
public final boolean hasSomeQcStatementExtensionOid(java.util.List<java.lang.String> qcStatementOidsList)
Checks if the certificate has the input QcStatement Extension OID.- Parameters:
qcStatementOidsList- QcStatement Extension OIDs List to check.- Returns:
trueif the certificate has some of the input QcStatement Extension OID, otherwisefalse.
-
getQcStatementExtEuTypeOids
public final java.util.List<java.lang.String> getQcStatementExtEuTypeOids()
Gets the value of the attributeqcStatementExtEuTypeOids.- Returns:
- the value of the attribute
qcStatementExtEuTypeOids.
-
isThereSomeQcStatementEuTypeExtension
public final boolean isThereSomeQcStatementEuTypeExtension()
Checks if the certificate has the QcStatement EuType extension.- Returns:
trueif the certificate has the QcStatement EuType extension, otherwisefalse.
-
hasQcStatementEuTypeExtensionOid
public final boolean hasQcStatementEuTypeExtensionOid(java.lang.String qcStatementEuTypeOid)
Checks if the certificate has the input QcStatement EuType Extension OID.- Parameters:
qcStatementEuTypeOid- QcStatement EuType Extension OID inStringrepresentation.- Returns:
trueif the certificate has the QcStatement EuType Extension OID, otherwisefalse.
-
getPolicyInformationsOids
public final java.util.List<java.lang.String> getPolicyInformationsOids()
Gets the value of the attributepolicyInformationsOids.- Returns:
- the value of the attribute
policyInformationsOids.
-
isThereSomeCertPolPolInfExtension
public final boolean isThereSomeCertPolPolInfExtension()
Checks if the certificate has some Certification Policies - Policy Information extension.- Returns:
trueif the certificate has some Certification Policies - Policy Information extension, otherwisefalse.
-
hasCertPolPolInfExtensionOid
public final boolean hasCertPolPolInfExtensionOid(java.lang.String certPolPolInfOid)
Checks if the certificate has the Certification Policies - Policy Information Extension OID.- Parameters:
certPolPolInfOid- Certification Policies - Policy Information Extension OID inStringrepresentation.- Returns:
trueif the certificate has the Certification Policies - Policy Information Extension OID, otherwisefalse.
-
hasSomeCertPolPolInfExtensionOid
public final boolean hasSomeCertPolPolInfExtensionOid(java.util.List<java.lang.String> certPolPolInfOidsList)
Checks if the certificate has some of the input Certification Policies - Policy Information Extension OIDs.- Parameters:
certPolPolInfOidsList- Certification Policies - Policy Information Extension OIDs List to check.- Returns:
trueif the certificate has some of the input Certification Policies - Policy Information Extension OIDs, otherwisefalse.
-
-