Generate A SAML Key And Certificate Pair
The openssl utility can be used to generate a SAML (Security Assertion Markup Language) key pair which consists of a public certificate and a private key.
openssl req -new -x509 -days 365 -nodes -sha256 \
-out saml.crt \
-keyout saml.keyThe req command primarily creates and processes certificate requests in PKCS#10 format. It can additionally create self-signed certificates, for use as root CAs, for example.
The flags to req are as follows:
-newfor a new certificate (cert) request-x509to output a self-signed cert instead of a cert request-days 365for a year-long cert-nodesto not encrypt the private key-sha256is the digest algorithm for signing the cert-out saml.crtspecifies the certificate output file-keyout saml.keyspecifies the private key output file
See man openssl and search for openssl req for more details.
Last updated
Was this helpful?