0

i am trying to work with docusign JWT. The environment where i develop only supports .p12 files. Docusign offers me a pem file. Is there a way to convert the .pem into a .p12 or even better to generate a .p12 directly from docusign ?

When trying to convert it to a .p12 i need the certificates. Can anybody help me on where i can get the corresponding / matching certificates ? I am completely lost.

Thanks!

BR Martin

Inbar Gazit
  • 12,566
  • 1
  • 16
  • 23
Martin
  • 790
  • 2
  • 9
  • 24

1 Answers1

1

Procedure

  1. Go to https://www.openssl.org/community/binaries.html

  2. Download and install version 1.0.1p.

Run the following command format from the OpenSSL installation bin folder.

openssl pkcs12 -export -out Cert.p12 -in cert.pem -inkey key.pem -passin pass:root -passout pass:root

(original source)

However, you only need the private key to get a token using JWT. .p12 files include both. If you can extract the private key from them - you can use it. DocuSign doesn't provide an SDK support to work with a .p12 file, but there are things in the web you can look into:

https://www.ssl.com/how-to/export-certificates-private-key-from-pkcs12-file-with-openssl/

Inbar Gazit
  • 12,566
  • 1
  • 16
  • 23
  • Hi Inbar thanks for your answer! I have to use it in SAP. There I can only import a .p12 file, even though i will only need the private part of the certificate. I have already tried to run the statement you posted. I get an error "unable to load certificates". Am i right that the cert.pem is the public key i get from Docusign ? – Martin Nov 08 '20 at 04:55
  • AFAIK the keys are just given as plain text and you can copy/paste them into any file you want. – Inbar Gazit Nov 08 '20 at 20:42
  • 1
    Inbar is correct that we don't support .p12 files. For our SDKs I believe the PEM file consists of the standard PEM format with a private key like this: Initial Data to be processed -----Begin [Label]----- private key info -----End [Label]----- RFC: https://tools.ietf.org/html/rfc7468 As long as the file follows that format it should still work. – Matt King DS Nov 17 '20 at 17:46
  • @martin if this is resolved, please mark it such. Feel free to post new questions. – Inbar Gazit Nov 17 '20 at 18:08
  • HI Inbar it is not solved so far. But it i am in contact with docusign on this issue. thanks for your help! – Martin Nov 19 '20 at 12:11