Forrest logo
back to the certutil tool

certutil:tldr:6e6f7

certutil: Add subject alternative names to a given certificate.
$ certutil -S -f ${path-to-password_file-txt} -d . -t ",," -c "${server_certificate}" -n "${server_name}" -g ${2048} -s "CN=${common_name},O=${organization}"
try on your machine

The command is using the certutil utility to perform various operations related to certificates. Here's a breakdown of each component:

  • certutil: It is a command-line utility used for managing certificates in a Windows operating system.

  • -S: This option specifies that a new certificate request should be submitted to a certification authority (CA).

  • -f ${path-to-password_file-txt}: It specifies the path to a file containing the password required to access the user's private key. The file should be in plain text format.

  • -d .: It sets the current directory as the location where the user's certificate database is stored.

  • -t ",,": This option sets the trust attributes for the new certificate. The value ",," indicates that the certificate should not be trusted for any purpose initially.

  • -c "${server_certificate}": It specifies the path to the CA's certificate file (server certificate) that will be used for signing the new certificate.

  • -n "${server_name}": This is the nickname or ID to be assigned to the newly issued certificate.

  • -g ${2048}: It sets the key size to be used for the certificate request. In this case, it sets it to 2048 bits.

  • -s "CN=${common_name},O=${organization}": This option sets the subject name for the new certificate. The subject name typically includes common information like the common name (CN) and organization (O). The values for CN and O are specified using the variables ${common_name} and ${organization}, respectively.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the certutil tool