Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Create a keystore for SOAPUI from a

.p7b file
Mon, Jul 15, 2019

I had to use SOAPUI to send some requests to a SOAP API at work the other day,
and the API in question required the use of a certificate. I had the required
certificate in a .p7b file, as well as the private key in a .key file, but those can’t be
used directly with SOAPUI. I had to create a keystore and populate that keystore
with my certificate (and private key). Unfamiliar with certificates that I was (and
still am), I tried a bunch of different things suggested by the top google-results
for queries such as “create keystore from p7b”. What finally worked was this
recipe. Here are the steps:

1. Convert the .p7b file to a .pem file: openssl pkcs7 -print_certs -in
file.p7b -out file.pem

2. Export the .pem file with the private key to a .p12 file: openssl pkcs12 -
export -name aliasName -in file.pem -inkey file.key -out file.p12
Here file.key is the private key.

3. Import the .p12 file to a new keystore: keytool -importkeystore -


srcstoretype pkcs12 -srckeystore file.p12 -destkeystore file.jks

The result of these three commands in that I have a keystore in the file
file.jks that can be used with SOAPUI:
The password is the password you entered when running the keytool -
importkeystore -command above.

Comments
0 Comments 
1 Login

Start the discussion…

LOG IN WITH OR SIGN UP WITH DISQUS ?

Name

 Share Best Newest Oldest

Be the first to comment.

Subscribe Privacy Do Not Sell My Data

You might also like