public class BasicCertificate extends Object
CertificateExtra| Modifier and Type | Field and Description |
|---|---|
static String |
OID_A1_CERTIFICATE |
static String |
OID_A2_CERTIFICATE |
static String |
OID_A3_CERTIFICATE |
static String |
OID_A4_CERTIFICATE |
static String |
OID_S1_CERTIFICATE |
static String |
OID_S2_CERTIFICATE |
static String |
OID_S3_CERTIFICATE |
static String |
OID_S4_CERTIFICATE |
| Constructor and Description |
|---|
BasicCertificate(byte[] data) |
BasicCertificate(InputStream is) |
BasicCertificate(X509Certificate certificate) |
| Modifier and Type | Method and Description |
|---|---|
Date |
getAfterDate() |
List<String> |
getAuthorityInfoAccess()
Returns the AuthorityInfoAccess extension value on list format.
|
String |
getAuthorityKeyIdentifier()
*
|
Date |
getBeforeDate() |
ICPBR_DN |
getCertificateIssuerDN()
Gets the IssuerDN (Issuer Distinguished Name) of a certificate
|
String |
getCertificateLevel()
returns the ICP-BRASIL Certificate Level(A1, A2, A3, A4, S1, S2, S3,
S4).
|
ICPBR_DN |
getCertificateSubjectDN()
Returns the SubjectDN (Subject Distinguished Name) of a Certificate
|
List<String> |
getCRLDistributionPoint() |
String |
getEmail()
Returns the email address that was defined on
SubjectAlternativeNames.
|
org.bouncycastle.asn1.ASN1Primitive |
getExtensionValue(String oid)
Gets the contents of a given OID
|
ICPBRCertificateEquipment |
getICPBRCertificateEquipment()
Returns data of "Equipamento/Aplicacao" on certificate in
ICPBRCertificateEquipment format
If its not a "Equipamento/Aplicacao" certificate Returns null |
ICPBRCertificatePF |
getICPBRCertificatePF()
Returns data of "Pessoa Fisica" on certificate in ICPBRCertificatePF
format
If its not a "Pessoa Fisica" certificate Returns null |
ICPBRCertificatePJ |
getICPBRCertificatePJ()
Returns data of "Pessoa Juridica" on certificate in ICPBRCertificatePJ
format
If its not a "Pessoa Juridica" certificate Returns null |
ICPBRKeyUsage |
getICPBRKeyUsage()
Returns the ICPBRKeyUsage Object with the informations about uses of the
certificate
|
ICPBRSubjectAlternativeNames |
getICPBRSubjectAlternativeNames()
Returns the SubjectAlternativeNames of certificate in
ICPBRSubjectAlternativeNames format. |
String |
getName()
Returns the name that was defined on CN for CertificateSubjectDN.
|
String |
getNome()
Deprecated.
spelling mistake, use getName
|
int |
getPathLength()
Returns the PathLength value of Certificate BasicConstraint.
|
String |
getSerialNumber()
Returns the SerialNumber of certificate on String formatr
|
String |
getSubjectKeyIdentifier() |
X509Certificate |
getX509Certificate()
Return the certificate on original format X509Certificate
|
boolean |
hasCertificateEquipment()
Check if the certificate has a "ICP-BRASIL Equipment (Equipamento ou
Aplicação) Certificate".
|
boolean |
hasCertificatePF()
Check if the certificate has a "ICP-BRASIL Pessoa Fisica Certificate".
|
boolean |
hasCertificatePJ()
* Check if the certificate has a "ICP-BRASIL Pessoa Juridica
Certificate".
|
boolean |
isCACertificate()
Check if is a Certificate Authority Certificate (ICP-BRASIL = AC).
|
String |
toString() |
public static final String OID_A1_CERTIFICATE
public static final String OID_A2_CERTIFICATE
public static final String OID_A3_CERTIFICATE
public static final String OID_A4_CERTIFICATE
public static final String OID_S1_CERTIFICATE
public static final String OID_S2_CERTIFICATE
public static final String OID_S3_CERTIFICATE
public static final String OID_S4_CERTIFICATE
public BasicCertificate(X509Certificate certificate)
certificate - type X509CertificateX509Certificatepublic BasicCertificate(byte[] data)
throws Exception
data - The bytes of the certificate to be usedException - exceptionpublic BasicCertificate(InputStream is) throws IOException, Exception
is - The input stream of the certificate to be usedIOException - exceptionException - exceptionpublic X509Certificate getX509Certificate()
public ICPBR_DN getCertificateIssuerDN() throws IOException
ICPBR_DN IssuerDN of a certificateIOException - exceptionpublic String getSerialNumber()
public ICPBR_DN getCertificateSubjectDN() throws IOException
ICPBR_DN SubjectDN of a certificateIOException - exceptionpublic String getNome()
public String getName()
public Date getBeforeDate()
public Date getAfterDate()
public ICPBRKeyUsage getICPBRKeyUsage()
ICPBRKeyUsagepublic ICPBRSubjectAlternativeNames getICPBRSubjectAlternativeNames()
ICPBRSubjectAlternativeNamespublic String getEmail()
public boolean hasCertificatePF()
public ICPBRCertificatePF getICPBRCertificatePF()
ICPBRCertificatePFpublic boolean hasCertificatePJ()
public ICPBRCertificatePJ getICPBRCertificatePJ()
ICPBRCertificatePJpublic boolean hasCertificateEquipment()
public ICPBRCertificateEquipment getICPBRCertificateEquipment()
ICPBRCertificateEquipmentpublic int getPathLength()
public boolean isCACertificate()
public String getCertificateLevel()
public List<String> getAuthorityInfoAccess()
public String getAuthorityKeyIdentifier()
public String getSubjectKeyIdentifier() throws IOException
IOException - exceptionpublic List<String> getCRLDistributionPoint() throws IOException
IOException - exceptionpublic org.bouncycastle.asn1.ASN1Primitive getExtensionValue(String oid)
oid - Object Identifier (OID)Copyright © 2025 SERPRO - Serviço Federal de Processamento de Dados. All rights reserved.