Requesting a Certificate
Request a certificate when a server, a service, or a device needs one from
your CA. You can send a request that other software made, or have pki
make the key and package the result for a device to import.
Before you start #
- Find the CA's name and the template to use.
pki ca listlists the CAs you have rights at, andpki ca showlists the templates a CA issues from. - Make sure you can request the names the certificate is to carry, as described in Controlling Who Can Request Certificates.
Certify a request you made #
Software that keeps its own key, such as a web server, makes the request itself, in PEM or DER. Submit it under a template the CA offers:
If the CA issues the certificate, pki writes it to www.pem. If the
request is held for approval, pki prints its number instead. Once an
officer approves it, collect the certificate:
Make a key and certificate for a device #
Phones, laptops, and other devices import a key and its certificates as one
PKCS #12 file. pki enroll makes the key on this machine, asks the CA to
certify it, and writes the file:
pki asks for a passphrase of at least 15 characters, which protects the
file and is asked for again when it is imported. pkid sees only the request,
never the key. The file holds the key, the certificate, and the CA
certificates above it that you can see on this pkid, so a device that
imports it can present the chain.
Name the certificate with --dns for a host name, --email for an email
address, or --upn for a user principal name, which EAP-TLS sign-in to
Wi-Fi uses. Each can be repeated.
The file is encrypted with AES-256, as OpenSSL 3 writes by default, and OpenSSL 3 imports it. Apple systems older than iOS 18 and macOS 15 are reported to refuse it.
When the request is held #
The key exists nowhere but on this machine, so a held request can't lose
it: pki seals the key under the same passphrase in a file beside the one it
would have written, here alice.p12.key, and prints the command that
finishes the job. Once an officer approves request 42, run:
Delete alice.p12.key once the device has imported the file.
Request a certificate with the Certificate Authority window #
- Open Certificate Authority from the launcher, and choose Request a Certificate in the sidebar.
- Choose the Authority and the Template. Only those you may request from are offered.
- Type the names the certificate is for, separated by commas.
- Leave Key set to Make a Key Here to have the window make the key and save it with its certificates as a PKCS #12 file. Choose Save To and a Password of at least 15 characters. To certify a request other software made, set Key to Use My Own Request and choose the request file instead.
- Choose Request Certificate.
If the request is held for approval, the window keeps the key sealed beside the file and remembers the request. Once an officer approves it, the overview says the certificate is ready: open the request, choose Save…, and type the file's password.
Check the result #
List the CA's certificates:
The new certificate is listed with the state valid, its serial number,
and when it expires. pki cert show with the serial number shows it in
full.