public class CertificateService
extends java.lang.Object
| Constructor and Description |
|---|
CertificateService() |
| Modifier and Type | Method and Description |
|---|---|
java.security.cert.X509Certificate |
createSelfSignedCertificate(java.math.BigInteger serialNumber,
java.security.KeyPair key,
java.util.Map<org.bouncycastle.asn1.ASN1ObjectIdentifier,java.lang.String> subjectData,
java.lang.String webId) |
java.security.cert.X509Certificate |
createSelfSignedCertificate(java.math.BigInteger serialNumber,
java.security.KeyPair key,
java.lang.String commonName,
java.lang.String webId) |
static java.util.List<java.net.URI> |
getWebIdFromSubjectAlternativeNames(java.security.cert.X509Certificate cert) |
public java.security.cert.X509Certificate createSelfSignedCertificate(java.math.BigInteger serialNumber,
java.security.KeyPair key,
java.lang.String commonName,
java.lang.String webId)
serialNumber - unique number within the certificate issuerkey - key pair for which the certificate is to be createdcommonName - subject common name. For servers, this should be the host
name. E.g. if a server supports https at https://www.example.com/secure, the
common name should be specified as www.example.com. For clients, it can be
anything.webId - webID that represents the identity of the subject or null if the
subject has no webIDjava.io.IOExceptionpublic java.security.cert.X509Certificate createSelfSignedCertificate(java.math.BigInteger serialNumber,
java.security.KeyPair key,
java.util.Map<org.bouncycastle.asn1.ASN1ObjectIdentifier,java.lang.String> subjectData,
java.lang.String webId)
serialNumber - unique number within the certificate issuer.key - key pair for which the certificate is to be created.subjectData - subject data to be put in distinguished name field of the
certificate. Such as CN - common name, O - organization, OU - organization
unit, L - locality, C - county, etc.webId - webID that represents the identity of the subject or null if the
subject has no webID.java.io.IOExceptionpublic static java.util.List<java.net.URI> getWebIdFromSubjectAlternativeNames(java.security.cert.X509Certificate cert)
throws java.security.cert.CertificateParsingException
java.security.cert.CertificateParsingExceptionCopyright © 2019. All Rights Reserved.