If you need to set up a Certificate Authority (CA) before you create and export certificates then you need to execute the following commands on the mainframe. You need to modify these commands depending on your particular configuration and requirements:
RACDCERT GENCERT CERTAUTH SUBJECTSDN(CN('common-name')) SIZE(key-size) + NOTAFTER(DATE(yyyy-mm-dd)) WITHLABEL('label-name')
RACDCERT GENCERT ID(certificate-owner) SUBJECTSDN(CN('common-name')) + SIZE(key-size) NOTAFTER(DATE(yyyy-mm-dd)) + WITHLABEL('label-name') SIGNWITH(CERTAUTH LABEL('label-name'))+ KEYUSAGE(DATAENCRYPT DOCSIGN HANDSHAKE)
ADDRING(ring-name)
RACDCERT ID(certificate-owner) CONNECT(CERTAUTH LABEL('label-name') RING(ring-name))
RACDCERT ID(certificate-owner) CONNECT(LABEL('label-name') RING(ring-name) DEFAULT)
At this point you can now issue the commands to create and export the certificates. See Exporting Certificates from RACF for more information.