>_ IzzyLab

Hands-on task

This task is step 11 of the course “TLS and certificates”

openssl: PKCS12 bundle

medium~7 min

Pack the private key /root/key.pem and the certificate /root/cert.pem into a single PKCS12 bundle /root/bundle.p12 with the password pass.

What you'll practise:
  • openssl
  • pkcs12
  • container formats
  • private keys
  • non-interactive password

Topic breakdown

PKCS12 (.p12/.pfx) is a single password-protected container that holds a private key together with a certificate (and optionally the CA chain), unlike scattered PEM files. Such a bundle is convenient to import into browsers, the Windows store or a Java keystore in one piece. The task is to understand the export mode (assembling the container, not unpacking it) and to learn to supply the password non-interactively as a string, without typing it by hand.

What's checked

  1. the bundle opens with the password and contains the certificate
  2. the bundle contains the private key

What it looks like