To resolve this issue, perform the following steps;
This is a sample of what a PKCS 7 file would be :
(Please note this certificate is made invalid on purpose and is merely an example.)
Please check the following in order to try and resolve your problem:
1) There are no spaces in the certificate.
2) The header and the footer are included.
3) Save the certificate as a .crt file.
Alternately the following information are suggested 'fixes' for this error:
1. Download the certificate in Standard Format
and save it in Notepad as a .cer file You can download your certificate again. Depending on which channel your certificate was purchased through, perform the steps on the following link to download it in standard format: SO7369
NB: If you are unable to get the certificate in Standard Format (X.509 format), request that the agent helping you, email you the certificate in this format.
2. Once you saved the file with the above extension, right click on the file and choose 'Install certificate'. Keep clicking through the options until you get to Finish.
a. Now that it is installed into Internet Explorer, from within the browser click Tools -> Internet Options
b. Click the Content tab > Click Certificates.
c. Select your certificate out of the Other tab then click Export
d. Click Next.
e. Select the bullet that says: Cryptographic Message Syntax Standard - PKCS#7 Certificates (.P7B) and check the box that says: Include all certificates in the certification path if possible
f. Click Next
g. Click Browse. Enter a file name and path for the new combined file to be saved. You can save the file with a .CER extension
h. Click Next > Finish
You will need to take this new file that was created and install it into the Java Keystore
The syntax that can be used is: "keytool -import -trustcacerts -keystore <name of your key store> -alias <name of your alias> -file <name of the file that was just created