The following messages appeared when a certificate was added to the Top Secret
TSS0942I INVALID CERTIFICATE DATA - FORMAT
TSS0301I CHKCERT FUNCTION FAILED, RETURN CODE = 4
Release : 16.0
Component : Top Secret for z/OS
The FORMAT keyword means that there is a problem on the certificate structure.
A Certificate must start with:
-----BEGIN CERTIFICATE-----
And must end with:
-----END CERTIFICATE-----
When browsing a certificate to check its format, if no apparent problem is seem, it is worth opening the ISPF HEX editor to verify that the blank spaces on all lines corresponds to HEX 40 value. It is common that certificates transferred from a Windows system contain a HEX 0D value at the end of each line, which is in ASCII is the CR code.
If is that the case, replace any HEX 0D value to HEX 40.