Skip to content

Create certificate

Dinesh edited this page Sep 22, 2023 · 2 revisions

Generating Certificate

o generate an RSA private.pem private key, run the openssl genpkey command in the terminal, as below:

openssl genpkey\
  -aes-256-cbc\
  -algorithm RSA\
  -out private_encrypted.pem\
  -pkeyopt rsa_keygen_bits:4096

After that, it's required to convert it into the RSA form with:

openssl rsa\
  -in private_encrypted.pem\
  -out private.pem

At this point, the generated private.pem content should be provided to the signPlugin.privateKey property. Provided password should be specified as the signPlugin.password property in the signPlugin configuration.

As a next step, we will generate a chain.crt certificate chain with:

openssl req\
  -key private.pem\
  -new\
  -x509\
  -days 365\
  -out chain.crt

The content of the chain.crt file will be used for the signPlugin.certificateChain property.

Generate Base64 Files and paste them in actions -> secret variables

openssl enc -A -base64 -in private.pem -out private_base64.pem
openssl enc -A -base64 -in chain.crt -out chain-base64.crt 
Clone this wiki locally