|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eparapher.core.crypto.cert.X509Util
public class X509Util
| Field Summary | |
|---|---|
static String |
BEGIN_CERT
|
static String |
BEGIN_CERT_REQ
|
static int |
CERT_LINE_LENGTH
|
static int |
CERT_REQ_LINE_LENGTH
|
static String |
END_CERT
|
static String |
END_CERT_REQ
|
| Constructor Summary | |
|---|---|
X509Util()
|
|
| Method Summary | |
|---|---|
static X509Certificate[] |
convertCertChaintoX509(Certificate[] certChain)
|
static byte[] |
fromHexString(String s)
and be formed only of digits 0-9 A-F or a-f. |
static Iterator<String> |
getAlgNames()
|
static X509Certificate |
getBCCertificate(X509Certificate cert)
Convert any X509Certificate implementation from any Security Provider to BouncyCastle Security Provider implementation. |
static String |
getCertBase64Encoded(X509Certificate cert)
Return Certificate Base 64 Encoded (PEM format) |
static byte[] |
getCertEncodedPkcs7(X509Certificate cert)
|
static CertificateFactory |
getCertificateFactory()
|
static byte[] |
getCertsEncodedPkcs7(X509Certificate[] certs)
|
static Collection<X509Certificate> |
getCertsFromPEM(InputStream certstream)
Reads a certificate in PEM-format from an InputStream. |
static Collection<X509Certificate> |
getCertsFromPEM(String certFile)
Reads a certificate in PEM-format from a file. |
static Collection<X509Certificate> |
getCertsFromPKCS7(String p7bfilename)
Extract X509 Certificates from p7b files |
static org.bouncycastle.asn1.x509.DistributionPoint[] |
getCrlDistributionPoint(X509Certificate certificate)
Return the CRL distribution point URL form a certificate. |
static org.bouncycastle.jce.PKCS10CertificationRequest |
getCSRFromPEM(String csrFile)
Reads a certificate in PEM-format from an InputStream. |
static String[] |
getECSpecsNames()
|
static org.bouncycastle.asn1.DERObject |
getExtensionValue(X509Certificate cert,
String oid)
Return an Extension DERObject from a certificate |
static X509CRL |
loadCRLFromDP(org.bouncycastle.asn1.x509.DistributionPoint dp)
|
static boolean |
saveX509toFile(String filename,
X509Certificate cert)
Save a X509 Certificate to a file, in Base64 format |
static String |
toHexString(byte[] b)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BEGIN_CERT
public static final String END_CERT
public static final int CERT_LINE_LENGTH
public static final String BEGIN_CERT_REQ
public static final String END_CERT_REQ
public static final int CERT_REQ_LINE_LENGTH
| Constructor Detail |
|---|
public X509Util()
| Method Detail |
|---|
public static Iterator<String> getAlgNames()
public static String[] getECSpecsNames()
public static org.bouncycastle.asn1.DERObject getExtensionValue(X509Certificate cert,
String oid)
throws IOException
IOException
public static org.bouncycastle.asn1.x509.DistributionPoint[] getCrlDistributionPoint(X509Certificate certificate)
throws CertificateParsingException
CertificateParsingExceptionpublic static X509Certificate[] convertCertChaintoX509(Certificate[] certChain)
public static String getCertBase64Encoded(X509Certificate cert)
cert -
public static boolean saveX509toFile(String filename,
X509Certificate cert)
filename - The file that will certificatecert - Certificate to save
public static Collection<X509Certificate> getCertsFromPKCS7(String p7bfilename)
throws IOException,
CertificateException,
org.bouncycastle.cms.CMSException,
NoSuchProviderException,
org.bouncycastle.x509.NoSuchStoreException
p7bfilename -
IOException
CertificateException
org.bouncycastle.cms.CMSException
org.bouncycastle.x509.NoSuchStoreException
NoSuchProviderException
public static Collection<X509Certificate> getCertsFromPEM(String certFile)
throws IOException,
CertificateException
certFile - the file containing the certificate in PEM-format
IOException - if the filen cannot be read.
CertificateException - if the filen does not contain a correct certificate.
public static Collection<X509Certificate> getCertsFromPEM(InputStream certstream)
throws IOException,
CertificateException
certFile - the input stream containing the certificate in PEM-format
IOException - if the stream cannot be read.
CertificateException - if the stream does not contain a correct certificate.
public static org.bouncycastle.jce.PKCS10CertificationRequest getCSRFromPEM(String csrFile)
throws IOException,
CertificateException
certFile - the input stream containing the certificate in PEM-format
IOException - if the stream cannot be read.
CertificateException - if the stream does not contain a correct certificate.public static byte[] getCertEncodedPkcs7(X509Certificate cert)
public static byte[] getCertsEncodedPkcs7(X509Certificate[] certs)
public static CertificateFactory getCertificateFactory()
public static String toHexString(byte[] b)
public static byte[] fromHexString(String s)
public static X509Certificate getBCCertificate(X509Certificate cert)
cert - the certificate object to convert
public static X509CRL loadCRLFromDP(org.bouncycastle.asn1.x509.DistributionPoint dp)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||