Create a Self-Signed Certificate with openssl on IBM i
`openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem`
or
call QP2TERM
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
Generate the Self-Signed Certificate with the command openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
The last optional command is to convert the certificate to a PKCS12 format with the command openssl pkcs12 -export -out exported.pfx -inkey server.key -in server.crt
Reference:
https://www.ibm.com/support/pages/how-create-self-signed-certificate-openssl