We have a PFX file that contains a root certificate, an intermediate certificate, and a server certificate. On my Linux system, I use the base64 command to generate the payload of our PFX file.
base64 | example.pfx
Which returns a base 64 string, something like this.
The PFX file contains the following alias.
Let's say the password for the PFX file is itsa&secret!
I create example.xml that will be used for the import. My XML file looks like this.
And then I issue this command to perform the import.
GatewayMigrationUtility.sh restman -argFile example.properties -method POST -path '1.0/privateKeys/00000000000000000000000000000002:some-test.somedomain.com/import' -request example.xml
The following is being returned.
Status: 400 Bad Request
<h3>The request sent by the client was syntactically incorrect.</h3>
When using XML (like a restman xml) any value with special reserved XML chars which are,
" to "
' to '
< to <
> to >
& to &
Need to be properly escaped as above so for example for a Private Key password that contains a & like,
It needs to be updated to be encoded like,