createRootCert
fun createRootCert( keyPair: KeyPair, issuer: String = "cn=ComunyAndroidCert", nbf: Date = Date(System.currentTimeMillis() - notBeforeOffset), exp: Date = Date(System.currentTimeMillis() + notAfterOffset), subject: String = issuer): X509Certificate
Content copied to clipboard
Generate a root certificate for the given key pair.
Return
The generated certificate
Parameters
keyPair
private and public key used to create this self-signed root certificate
issuer
name of the issuer (Default: cn=ComunyAndroidCert)
nbf
Date used for the "notBefore" field (Default: now - 30d)
exp
Expiry date used for the "notAfter" field (Default: now + 365d)
subject
name of the issuer (Default: taken from issuer)