Installing the Partner Client Certificates
We recently streamlined our Java sample code to more obviously expose the interactions with the VerticalResponse API. This included the way that partner client certificates are handled in the sample code. All you’ll need to do to get the sample code running is place the P12 certificate you received in a directory accessible to the sample code, and then add the path to the certificate and the passphrase to the sample code (around lines 46 and 47).
For actual development and production environments, you’ll want to store your certificates in the keystore of your JDK environment or your app server environment (Tomcat, JBoss, etc.). Depending on your environment, you may also need to add the VRAPI_ca.crt to a trust store — we’ve included step-by-step instructions for that below.
If you have any questions or run into any challenges, email us at api-support@verticalresponse.com.
Creating a Trust Store
First, download the vr_api_ca.crt file and move it to the directory in which you’ll be creating the trust store.
To create the trust store, use the keytool utility to create a file called truststore within the /cert folder. When you do this, keytool will ask you for a password to assign to the new trust store:
$ keytool -import -keystore truststore -file vr_api_ca.crt
Enter keystore password:
Owner: EMAILADDRESS=api-services@verticalresponse.com, CN=VerticalResponse Inc API Services Certificate Authority, OU=VerticalResponse Inc API Services, O=VerticalResponse Inc, L=San Francisco, ST=California, C=US
Issuer: EMAILADDRESS=api-services@verticalresponse.com, CN=VerticalResponse Inc API Services Certificate Authority, OU=VerticalResponse Inc API Services, O=VerticalResponse Inc, L=San Francisco, ST=California, C=US
Serial number: db2b…
Valid from: Wed Dec 20 10:39:27 PST 2006 until: Sun May 07 11:39:27 PDT 2034
Certificate fingerprints:
MD5: E1:B3:E1:A7:89:…
SHA1: 1F:83:80:31:78:….
Trust this certificate? [no]: yes
Certificate was added to keystore