static fun createSelfSignedCertificateIfMissing(key: Path!, certificate: Path!): Boolean
(source)
Create a self-signed certificate, if it is not already present.
If both the key or the certificate file are missing, they will be re-created as a self-signed certificate.
certificate
- Path!: The certificate path.
IOException
- If an IO error occurs creating the certificate.
Return
Boolean: true
if a self-signed certificate was created.
static fun createSelfSignedCertificateIfMissing(key: Path!, certificate: Path!, commonName: String!): Boolean
(source)
Create a self-signed certificate, if it is not already present.
If both the key or the certificate file are missing, they will be re-created as a self-signed certificate.
certificate
- Path!: The certificate path.
commonName
- String!: the name to use for the CN attribute of the certificate. If null or empty, a random value is used.
IOException
- If an IO error occurs creating the certificate.
Return
Boolean: true
if a self-signed certificate was created.