Skip to content

bxp new-intermediate

Replace the intermediate certificate, with the offline root key.

Usage

Make a new intermediate certificate, signed by the root key, in place
of the current one. BastionXP CA has exactly one intermediate: from the next
start of "bxp serve", the new one signs everything.

Do it before the current one expires (the server warns a year ahead),
or if its key may be in the wrong hands. Run it on the CA machine, with
the root key from wherever you keep it offline, and its passphrase.

The old intermediate key is removed. Certificates it issued stay valid,
because they chain to the same root, but revoking them no longer works:
the CRL and OCSP answers come from the new intermediate. Renew them to
move them over. The command says how many there are and asks first.

Usage:
  bxp new-intermediate [flags]

Examples:
  # with BastionXP CA's own root
  bxp new-intermediate --config bastionxp-ca.yaml --root-key /media/usb/root.key

  # under another root (bxp init --external-root): a CSR, then its certificate
  bxp new-intermediate --config bastionxp-ca.yaml --csr
  bxp new-intermediate --config bastionxp-ca.yaml --import bastionxp-ca.crt \
      --root-ca corp-root.crt --issuing-ca corp-issuing-ca.crt

Flags:
      --csr                           under another root: make the new key and a CSR for that root's CA to sign
  -h, --help                          help for new-intermediate
      --import string                 under another root: put the certificate the CA issued for the CSR in place
      --issuing-ca stringArray        with --import: the CA that signed the certificate, if it is not the root (PEM).
                                      Repeat for each level up to the root, or give one file with all of them
      --root-ca string                with --import, the first time: the root CA certificate (PEM)
      --root-key string               the root key's file (default: data_dir/root.key, if it is there)
      --root-passphrase-file string   read the root key's passphrase from this file instead of asking (/dev/stdin works)
      --yes                           replace it without asking, even if certificates it issued are still valid

Global Flags:
      --config string   path to the configuration file (default "bastionxp-ca.yaml")