Top Secret Commands to set up a keyring using a third party signed certificate
Top Secret
Generate a Certificate:
TSS GENCERT(acid) DIGICERT(certU) SUBJECTN('o="company" CN=" selfsigned cert" OU="department" C="US" ')
** Plug in the information in the lower case values.
** If the LABLCERT field is not used then the certificate label will default to the DIGICERT name.
This is the best thing to do because it avoids the possibility of specifying the digicert name when
the LABLNAME should be specified in application parmfile data. There may be applications that
will require the certificate specific label. Follow the application documentation.
Create a CSR(Certificate Signing Request). This puts the certificate in a dataset in PKCS#10 format. PKCS#10 does not contain the private key:
TSS GENREQ(acid) DIGICERT(certU) DCDSN('unsigned.cert)
*** Note: The dataset cannot be preallocated.
*** CAUTION NOTE*** Do not delete the original certU. It is holding the private key. If original certificate is
deleted before pairing the keys then the private key will be forever gone.
Send the certificate in the dataset to the Certificate Authority to be signed.
Receive the signed certificate from the CA(Certificate Authority) and put it into a dataset.
Add the certificate back to the owning ACID with a slightly different name. It is good practice to give the certificates names ending in U for unsigned and S for signed:
TSS ADD(acid) DIGICERT(certS) DCDSN('signed.cert)TRUST
** Note: A message that indicates that the certificate was added with NOTRUST may occur (TSS1573I THE CERTIFICATE <digicertname> SIGNER NOT FOUND. ADDING CERTIFICATE WITH NOTRUST STATUS). This is because the signing CA certificate is not in the Top Secret Database yet. The following TSS REPLACE command should be issued:
TSS REPLACE(acid) DIGICERT(certS) TRUST
The above ADD command paired the keys and there is now a signed certificate with a private key.
Create the KEYRING
TSS ADD(acid) KEYRING(keyring)
** If the LABLRING field in not used then the keyring label will default to the keyring name.
There may be applications that require the keyring label be a specific value. Follow
the application documentation.
Add the certificates to the keyring
TSS ADD(acid) KEYRING(keyring) RINGDATA(owner, certS) USAGE(PERSONAL) DEFAULT
All the CA certificate(s) will also need to to be added to complete the signing chain
TSS ADD(acid) KEYRING(keyring) RINGDATA(CERTAUTH,ca-cert) USAGE(CERTAUTH)
Give the owner of the keyring the following permits to read the keyring and certificates on it
TSS ADD(dept) IBMFAC(IRR.DIGTCERT) <---(skip if previously done)
TSS PER(acid) IBMFAC(IRR.DIGTCERT.LISTRING)
ACCESS(UPDATE)
TSS PER(acid) IBMFAC(IRR.DIGTCERT.LIST)
ACCESS(UPDATE)
Note: If the owner of the client/personal certificate is not the owner of the keyring then specify
ACCESS(CONTROL) on the PERMIT commands.
For the SERVER, a copy of the personal certificate needs to be sent to the client. The following command puts the certificate into a dataset without the private key
TSS EXPORT(acid) DIGICERT(certS) DCDSN('signed.server.cert')
Send the certificate to the client.
The client needs to add this certificate to their keyring.
**Note: Many SERVER/CLIENT information is sent two ways. In that case each side would send the other their personal certificate.