corda / net.corda.core.crypto / X509Utilities / createServerCert

# createServerCert

`fun createServerCert(subject: X500Name, publicKey: PublicKey, certificateAuthority: CACertAndKey, subjectAlternativeNameDomains: List<String>, subjectAlternativeNameIps: List<String>): X509Certificate`

Create an X509v3 certificate suitable for use in TLS roles.

### Parameters

`subject` - The contents to put in the subject field of the certificate

`publicKey` - The PublicKey to be wrapped in the certificate

`certificateAuthority` - The Public certificate and KeyPair of the parent CA that will sign this certificate

`subjectAlternativeNameDomains` - A set of alternate DNS names to be supported by the certificate during validation of the TLS handshakes

`subjectAlternativeNameIps` - A set of alternate IP addresses to be supported by the certificate during validation of the TLS handshakes

Return
The generated X509Certificate suitable for use as a Server/Client certificate in TLS. This certificate is not marked as a CA cert to be similar in nature to commercial certificates.