public class CertificateManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
org.bouncycastle.cert.X509CertificateHolder |
ca |
org.bouncycastle.crypto.params.AsymmetricKeyParameter |
caKey |
int |
minusHours |
java.lang.String |
orgName |
org.bouncycastle.cert.X509CertificateHolder |
server |
org.bouncycastle.crypto.params.AsymmetricKeyParameter |
serverKey |
int |
validDays |
| Constructor and Description |
|---|
CertificateManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
generateCA() |
org.bouncycastle.cert.X509CertificateHolder |
generateCertificate(java.lang.String subjectName,
java.security.PublicKey subjectPublicKey) |
java.security.KeyPair |
generateKeyPair() |
org.bouncycastle.cert.X509CertificateHolder |
readCertificate(java.nio.file.Path file) |
org.bouncycastle.cert.X509CertificateHolder |
readCertificate(java.io.Reader reader) |
org.bouncycastle.crypto.params.AsymmetricKeyParameter |
readPrivateKey(java.nio.file.Path file) |
org.bouncycastle.crypto.params.AsymmetricKeyParameter |
readPrivateKey(java.io.Reader reader) |
void |
writeCertificate(java.nio.file.Path file,
org.bouncycastle.cert.X509CertificateHolder holder) |
void |
writeCertificate(java.io.Writer writer,
org.bouncycastle.cert.X509CertificateHolder holder) |
void |
writePrivateKey(java.nio.file.Path file,
org.bouncycastle.crypto.params.AsymmetricKeyParameter key) |
void |
writePrivateKey(java.nio.file.Path file,
java.security.PrivateKey privateKey) |
void |
writePrivateKey(java.io.Writer writer,
org.bouncycastle.crypto.params.AsymmetricKeyParameter key) |
void |
writePrivateKey(java.io.Writer writer,
java.security.PrivateKey privateKey) |
public org.bouncycastle.cert.X509CertificateHolder ca
public org.bouncycastle.crypto.params.AsymmetricKeyParameter caKey
public org.bouncycastle.cert.X509CertificateHolder server
public org.bouncycastle.crypto.params.AsymmetricKeyParameter serverKey
public int validDays
public int minusHours
public java.lang.String orgName
public org.bouncycastle.cert.X509CertificateHolder generateCertificate(java.lang.String subjectName,
java.security.PublicKey subjectPublicKey)
throws org.bouncycastle.operator.OperatorCreationException
org.bouncycastle.operator.OperatorCreationExceptionpublic void generateCA()
throws java.security.NoSuchAlgorithmException,
java.io.IOException,
org.bouncycastle.operator.OperatorCreationException,
java.security.InvalidAlgorithmParameterException
java.security.NoSuchAlgorithmExceptionjava.io.IOExceptionorg.bouncycastle.operator.OperatorCreationExceptionjava.security.InvalidAlgorithmParameterExceptionpublic java.security.KeyPair generateKeyPair()
throws java.security.InvalidAlgorithmParameterException,
java.security.NoSuchAlgorithmException
java.security.InvalidAlgorithmParameterExceptionjava.security.NoSuchAlgorithmExceptionpublic void writePrivateKey(java.nio.file.Path file,
java.security.PrivateKey privateKey)
throws java.io.IOException
java.io.IOExceptionpublic void writePrivateKey(java.io.Writer writer,
java.security.PrivateKey privateKey)
throws java.io.IOException
java.io.IOExceptionpublic void writePrivateKey(java.nio.file.Path file,
org.bouncycastle.crypto.params.AsymmetricKeyParameter key)
throws java.io.IOException
java.io.IOExceptionpublic void writePrivateKey(java.io.Writer writer,
org.bouncycastle.crypto.params.AsymmetricKeyParameter key)
throws java.io.IOException
java.io.IOExceptionpublic void writeCertificate(java.nio.file.Path file,
org.bouncycastle.cert.X509CertificateHolder holder)
throws java.io.IOException
java.io.IOExceptionpublic void writeCertificate(java.io.Writer writer,
org.bouncycastle.cert.X509CertificateHolder holder)
throws java.io.IOException
java.io.IOExceptionpublic org.bouncycastle.crypto.params.AsymmetricKeyParameter readPrivateKey(java.nio.file.Path file)
throws java.io.IOException
java.io.IOExceptionpublic org.bouncycastle.crypto.params.AsymmetricKeyParameter readPrivateKey(java.io.Reader reader)
throws java.io.IOException
java.io.IOExceptionpublic org.bouncycastle.cert.X509CertificateHolder readCertificate(java.nio.file.Path file)
throws java.io.IOException
java.io.IOExceptionpublic org.bouncycastle.cert.X509CertificateHolder readCertificate(java.io.Reader reader)
throws java.io.IOException
java.io.IOException