Class SelfSignedCertificate.Builder
java.lang.Object
io.netty.handler.ssl.util.SelfSignedCertificate.Builder
- Enclosing class:
SelfSignedCertificate
-
Method Summary
Modifier and TypeMethodDescriptionSet the key algorithm.bits(int bits) Set the key size.build()Build the certificate.Set the fully-qualified domain name of the certificate that should be generated.Set the end of the certificate validity period.Set the start of the certificate validity period.random(SecureRandom random) Set the RNG to use for key generation.
-
Method Details
-
fqdn
Set the fully-qualified domain name of the certificate that should be generated.- Parameters:
fqdn- The FQDN- Returns:
- This builder
-
random
Set the RNG to use for key generation. This setting is not supported by the keytool-based generator.- Parameters:
random- The CSPRNG- Returns:
- This builder
-
bits
Set the key size.- Parameters:
bits- The key size- Returns:
- This builder
-
notBefore
Set the start of the certificate validity period.- Parameters:
notBefore- The start date- Returns:
- This builder
-
notAfter
Set the end of the certificate validity period.- Parameters:
notAfter- The start date- Returns:
- This builder
-
algorithm
Set the key algorithm. Only RSA and EC are supported.- Parameters:
algorithm- The key algorithm- Returns:
- This builder
-
build
Build the certificate. This builder must not be used again after this method is called.- Returns:
- The certificate
- Throws:
CertificateException- If generation fails
-