public class ScepUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addCmsCertSet(org.bouncycastle.cms.CMSSignedDataGenerator generator,
X509Certificate[] cmsCertSet) |
static org.bouncycastle.asn1.x509.SubjectPublicKeyInfo |
createSubjectPublicKeyInfo(PublicKey publicKey) |
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
extractDigesetAlgorithmIdentifier(String sigOid,
byte[] sigParams) |
static org.bouncycastle.pkcs.PKCS10CertificationRequest |
generateRequest(PrivateKey privatekey,
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo,
org.bouncycastle.asn1.x500.X500Name subjectDn,
Map<org.bouncycastle.asn1.ASN1ObjectIdentifier,org.bouncycastle.asn1.ASN1Encodable> attributes) |
static org.bouncycastle.pkcs.PKCS10CertificationRequest |
generateRequest(PrivateKey privatekey,
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo,
org.bouncycastle.asn1.x500.X500Name subjectDn,
String challengePassword,
List<org.bouncycastle.asn1.x509.Extension> extensions) |
static X509Certificate |
generateSelfsignedCert(org.bouncycastle.asn1.pkcs.CertificationRequest csr,
PrivateKey identityKey) |
static X509Certificate |
generateSelfsignedCert(org.bouncycastle.asn1.x500.X500Name subjectDn,
PublicKey pubKey,
PrivateKey identityKey) |
static X509Certificate |
generateSelfsignedCert(org.bouncycastle.asn1.x500.X500Name subjectDn,
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo pubKeyInfo,
PrivateKey identityKey) |
static List<X509Certificate> |
getCertsFromSignedData(org.bouncycastle.asn1.cms.SignedData signedData)
The first one is a non-CA certificate if there exists one non-CA certificate.
|
static X509CRL |
getCrlFromPkiMessage(org.bouncycastle.asn1.cms.SignedData signedData) |
static org.bouncycastle.asn1.ASN1Encodable |
getFirstAttrValue(org.bouncycastle.asn1.cms.AttributeTable attrs,
org.bouncycastle.asn1.ASN1ObjectIdentifier type) |
static String |
getSignatureAlgorithm(PrivateKey key,
ScepHashAlgo hashAlgo) |
static boolean |
hasKeyusage(X509Certificate cert,
KeyUsage usage) |
static boolean |
isSelfSigned(X509Certificate cert) |
static boolean |
issues(X509Certificate issuerCert,
X509Certificate cert) |
static X509Certificate |
parseCert(byte[] certBytes) |
static X509CRL |
parseCrl(byte[] encodedCrl) |
static X509CRL |
parseCrl(InputStream crlStream) |
static byte[] |
read(InputStream in) |
static String |
requireNonBlank(String objName,
String obj) |
static <T> Collection<T> |
requireNonEmpty(String objName,
Collection<T> obj) |
static <T> T |
requireNonNull(String objName,
T obj) |
static X509Certificate |
toX509Cert(org.bouncycastle.asn1.x509.Certificate asn1Cert) |
static X509CRL |
toX509Crl(org.bouncycastle.asn1.x509.CertificateList asn1CertList) |
public static org.bouncycastle.asn1.x509.SubjectPublicKeyInfo createSubjectPublicKeyInfo(PublicKey publicKey) throws IOException
IOExceptionpublic static org.bouncycastle.pkcs.PKCS10CertificationRequest generateRequest(PrivateKey privatekey, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo, org.bouncycastle.asn1.x500.X500Name subjectDn, Map<org.bouncycastle.asn1.ASN1ObjectIdentifier,org.bouncycastle.asn1.ASN1Encodable> attributes) throws org.bouncycastle.operator.OperatorCreationException
org.bouncycastle.operator.OperatorCreationExceptionpublic static org.bouncycastle.pkcs.PKCS10CertificationRequest generateRequest(PrivateKey privatekey, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo subjectPublicKeyInfo, org.bouncycastle.asn1.x500.X500Name subjectDn, String challengePassword, List<org.bouncycastle.asn1.x509.Extension> extensions) throws org.bouncycastle.operator.OperatorCreationException
org.bouncycastle.operator.OperatorCreationExceptionpublic static X509Certificate generateSelfsignedCert(org.bouncycastle.asn1.pkcs.CertificationRequest csr, PrivateKey identityKey) throws CertificateException
CertificateExceptionpublic static X509Certificate generateSelfsignedCert(org.bouncycastle.asn1.x500.X500Name subjectDn, PublicKey pubKey, PrivateKey identityKey) throws CertificateException
CertificateExceptionpublic static X509Certificate generateSelfsignedCert(org.bouncycastle.asn1.x500.X500Name subjectDn, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo pubKeyInfo, PrivateKey identityKey) throws CertificateException
CertificateExceptionpublic static List<X509Certificate> getCertsFromSignedData(org.bouncycastle.asn1.cms.SignedData signedData) throws CertificateException
CertificateExceptionpublic static X509CRL getCrlFromPkiMessage(org.bouncycastle.asn1.cms.SignedData signedData) throws CRLException
CRLExceptionpublic static String getSignatureAlgorithm(PrivateKey key, ScepHashAlgo hashAlgo)
public static X509Certificate toX509Cert(org.bouncycastle.asn1.x509.Certificate asn1Cert) throws CertificateException
CertificateExceptionpublic static X509CRL toX509Crl(org.bouncycastle.asn1.x509.CertificateList asn1CertList) throws CertificateException, CRLException
CertificateExceptionCRLExceptionpublic static X509CRL parseCrl(byte[] encodedCrl) throws CertificateException, CRLException
CertificateExceptionCRLExceptionpublic static X509CRL parseCrl(InputStream crlStream) throws CertificateException, CRLException
CertificateExceptionCRLExceptionpublic static X509Certificate parseCert(byte[] certBytes) throws CertificateException
CertificateExceptionpublic static boolean hasKeyusage(X509Certificate cert, KeyUsage usage)
public static boolean isSelfSigned(X509Certificate cert)
public static boolean issues(X509Certificate issuerCert, X509Certificate cert) throws CertificateEncodingException
CertificateEncodingExceptionpublic static org.bouncycastle.asn1.ASN1ObjectIdentifier extractDigesetAlgorithmIdentifier(String sigOid, byte[] sigParams) throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic static org.bouncycastle.asn1.ASN1Encodable getFirstAttrValue(org.bouncycastle.asn1.cms.AttributeTable attrs,
org.bouncycastle.asn1.ASN1ObjectIdentifier type)
public static byte[] read(InputStream in) throws IOException
IOExceptionpublic static void addCmsCertSet(org.bouncycastle.cms.CMSSignedDataGenerator generator,
X509Certificate[] cmsCertSet)
throws CertificateEncodingException,
org.bouncycastle.cms.CMSException
CertificateEncodingExceptionorg.bouncycastle.cms.CMSExceptionpublic static <T> T requireNonNull(String objName, T obj)
public static <T> Collection<T> requireNonEmpty(String objName, Collection<T> obj)
Copyright © 2018. All rights reserved.