Blame doc/invoke-certtool.texi

Packit 549fdc
@node certtool Invocation
Packit 549fdc
@subsection Invoking certtool
Packit 549fdc
@pindex certtool
Packit 549fdc
@ignore
Packit 549fdc
#  -*- buffer-read-only: t -*- vi: set ro:
Packit 549fdc
#
Packit 549fdc
# DO NOT EDIT THIS FILE   (invoke-certtool.texi)
Packit 549fdc
#
Packit 549fdc
# It has been AutoGen-ed
Packit 549fdc
# From the definitions    ../src/certtool-args.def
Packit 549fdc
# and the template file   agtexi-cmd.tpl
Packit 549fdc
@end ignore
Packit 549fdc
Packit 549fdc
Packit 549fdc
Tool to parse and generate X.509 certificates, requests and private keys.
Packit 549fdc
It can be used interactively or non interactively by
Packit 549fdc
specifying the template command line option.
Packit 549fdc
Packit 549fdc
The tool accepts files or supported URIs via the --infile option. In case PIN
Packit 549fdc
is required for URI access you can provide it using the environment variables GNUTLS_PIN 
Packit 549fdc
and GNUTLS_SO_PIN.
Packit 549fdc
Packit 549fdc
Packit 549fdc
This section was generated by @strong{AutoGen},
Packit 549fdc
using the @code{agtexi-cmd} template and the option descriptions for the @code{certtool} program.
Packit 549fdc
This software is released under the GNU General Public License, version 3 or later.
Packit 549fdc
Packit 549fdc
Packit 549fdc
@anchor{certtool usage}
Packit 549fdc
@subsubheading certtool help/usage (@option{--help})
Packit 549fdc
@cindex certtool help
Packit 549fdc
Packit 549fdc
This is the automatically generated usage text for certtool.
Packit 549fdc
Packit 549fdc
The text printed is the same whether selected with the @code{help} option
Packit 549fdc
(@option{--help}) or the @code{more-help} option (@option{--more-help}).  @code{more-help} will print
Packit 549fdc
the usage text by passing it through a pager program.
Packit 549fdc
@code{more-help} is disabled on platforms without a working
Packit 549fdc
@code{fork(2)} function.  The @code{PAGER} environment variable is
Packit 549fdc
used to select the program, defaulting to @file{more}.  Both will exit
Packit 549fdc
with a status code of 0.
Packit 549fdc
Packit 549fdc
@exampleindent 0
Packit 549fdc
@example
Packit 549fdc
certtool - GnuTLS certificate tool
Packit 549fdc
Usage:  certtool [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Packit 549fdc
Packit 549fdc
   -d, --debug=num            Enable debugging
Packit 549fdc
                                - it must be in the range:
Packit 549fdc
                                  0 to 9999
Packit 549fdc
   -V, --verbose              More verbose output
Packit 549fdc
                                - may appear multiple times
Packit 549fdc
       --infile=file          Input file
Packit 549fdc
                                - file must pre-exist
Packit 549fdc
       --outfile=str          Output file
Packit 549fdc
Packit 549fdc
Certificate related options:
Packit 549fdc
Packit 549fdc
   -i, --certificate-info     Print information on the given certificate
Packit 549fdc
       --pubkey-info          Print information on a public key
Packit 549fdc
   -s, --generate-self-signed  Generate a self-signed certificate
Packit 549fdc
   -c, --generate-certificate  Generate a signed certificate
Packit 549fdc
       --generate-proxy       Generates a proxy certificate
Packit 549fdc
   -u, --update-certificate   Update a signed certificate
Packit 549fdc
       --fingerprint          Print the fingerprint of the given certificate
Packit 549fdc
       --key-id               Print the key ID of the given certificate
Packit 549fdc
       --v1                   Generate an X.509 version 1 certificate (with no extensions)
Packit 549fdc
       --sign-params=str      Sign a certificate with a specific signature algorithm
Packit 549fdc
Packit 549fdc
Certificate request related options:
Packit 549fdc
Packit 549fdc
       --crq-info             Print information on the given certificate request
Packit 549fdc
   -q, --generate-request     Generate a PKCS #10 certificate request
Packit 549fdc
                                - prohibits the option 'infile'
Packit 549fdc
       --no-crq-extensions    Do not use extensions in certificate requests
Packit 549fdc
Packit 549fdc
PKCS#12 file related options:
Packit 549fdc
Packit 549fdc
       --p12-info             Print information on a PKCS #12 structure
Packit 549fdc
       --p12-name=str         The PKCS #12 friendly name to use
Packit 549fdc
       --to-p12               Generate a PKCS #12 structure
Packit 549fdc
Packit 549fdc
Private key related options:
Packit 549fdc
Packit 549fdc
   -k, --key-info             Print information on a private key
Packit 549fdc
       --p8-info              Print information on a PKCS #8 structure
Packit 549fdc
       --to-rsa               Convert an RSA-PSS key to raw RSA format
Packit 549fdc
   -p, --generate-privkey     Generate a private key
Packit 549fdc
       --bits=num             Specify the number of bits for key generation
Packit 549fdc
       --curve=str            Specify the curve used for EC key generation
Packit 549fdc
       --sec-param=str        Specify the security level [low, legacy, medium, high, ultra]
Packit 549fdc
       --to-p8                Convert a given key to a PKCS #8 structure
Packit 549fdc
   -8, --pkcs8                Use PKCS #8 format for private keys
Packit 549fdc
       --provable             Generate a private key or parameters from a seed using a provable method
Packit 549fdc
       --verify-provable-privkey  Verify a private key generated from a seed using a provable method
Packit 549fdc
       --seed=str             When generating a private key use the given hex-encoded seed
Packit 549fdc
Packit 549fdc
CRL related options:
Packit 549fdc
Packit 549fdc
   -l, --crl-info             Print information on the given CRL structure
Packit 549fdc
       --generate-crl         Generate a CRL
Packit 549fdc
       --verify-crl           Verify a Certificate Revocation List using a trusted list
Packit 549fdc
                                - requires the option 'load-ca-certificate'
Packit 549fdc
Packit 549fdc
Certificate verification related options:
Packit 549fdc
Packit 549fdc
   -e, --verify-chain         Verify a PEM encoded certificate chain
Packit 549fdc
       --verify               Verify a PEM encoded certificate (chain) against a trusted set
Packit 549fdc
       --verify-hostname=str  Specify a hostname to be used for certificate chain verification
Packit 549fdc
       --verify-email=str     Specify a email to be used for certificate chain verification
Packit 549fdc
                                - prohibits the option 'verify-hostname'
Packit 549fdc
       --verify-purpose=str   Specify a purpose OID to be used for certificate chain verification
Packit 549fdc
       --verify-allow-broken  Allow broken algorithms, such as MD5 for verification
Packit 549fdc
Packit 549fdc
PKCS#7 structure options:
Packit 549fdc
Packit 549fdc
       --p7-generate          Generate a PKCS #7 structure
Packit 549fdc
       --p7-sign              Signs using a PKCS #7 structure
Packit 549fdc
       --p7-detached-sign     Signs using a detached PKCS #7 structure
Packit 549fdc
       --p7-include-cert      The signer's certificate will be included in the cert list.
Packit 549fdc
                                - disabled as '--no-p7-include-cert'
Packit 549fdc
                                - enabled by default
Packit 549fdc
       --p7-time              Will include a timestamp in the PKCS #7 structure
Packit 549fdc
                                - disabled as '--no-p7-time'
Packit 549fdc
       --p7-show-data         Will show the embedded data in the PKCS #7 structure
Packit 549fdc
                                - disabled as '--no-p7-show-data'
Packit 549fdc
       --p7-info              Print information on a PKCS #7 structure
Packit 549fdc
       --p7-verify            Verify the provided PKCS #7 structure
Packit 549fdc
       --smime-to-p7          Convert S/MIME to PKCS #7 structure
Packit 549fdc
Packit 549fdc
Other options:
Packit 549fdc
Packit 549fdc
       --get-dh-params        List the included PKCS #3 encoded Diffie-Hellman parameters
Packit 549fdc
       --dh-info              Print information PKCS #3 encoded Diffie-Hellman parameters
Packit 549fdc
       --load-privkey=str     Loads a private key file
Packit 549fdc
       --load-pubkey=str      Loads a public key file
Packit 549fdc
       --load-request=str     Loads a certificate request file
Packit 549fdc
       --load-certificate=str Loads a certificate file
Packit 549fdc
       --load-ca-privkey=str  Loads the certificate authority's private key file
Packit 549fdc
       --load-ca-certificate=str Loads the certificate authority's certificate file
Packit 549fdc
       --load-crl=str         Loads the provided CRL
Packit 549fdc
       --load-data=str        Loads auxiliary data
Packit 549fdc
       --password=str         Password to use
Packit 549fdc
       --null-password        Enforce a NULL password
Packit 549fdc
       --empty-password       Enforce an empty password
Packit 549fdc
       --hex-numbers          Print big number in an easier format to parse
Packit 549fdc
       --cprint               In certain operations it prints the information in C-friendly format
Packit 549fdc
       --key-type=str         Specify the key type to use on key generation
Packit 549fdc
       --hash=str             Hash algorithm to use for signing
Packit 549fdc
       --salt-size=num        Specify the RSA-PSS key default salt size
Packit 549fdc
       --inder                Use DER format for input certificates, private keys, and DH parameters
Packit 549fdc
                                - disabled as '--no-inder'
Packit 549fdc
       --inraw                an alias for the 'inder' option
Packit 549fdc
       --outder               Use DER format for output certificates, private keys, and DH parameters
Packit 549fdc
                                - disabled as '--no-outder'
Packit 549fdc
       --outraw               an alias for the 'outder' option
Packit 549fdc
       --template=str         Template file to use for non-interactive operation
Packit 549fdc
       --stdout-info          Print information to stdout instead of stderr
Packit 549fdc
       --ask-pass             Enable interaction for entering password when in batch mode.
Packit 549fdc
       --pkcs-cipher=str      Cipher to use for PKCS #8 and #12 operations
Packit 549fdc
       --provider=str         Specify the PKCS #11 provider library
Packit 549fdc
Packit 549fdc
Version, usage and configuration options:
Packit 549fdc
Packit 549fdc
   -v, --version[=arg]        output version information and exit
Packit 549fdc
   -h, --help                 display extended usage information and exit
Packit 549fdc
   -!, --more-help            extended usage information passed thru pager
Packit 549fdc
Packit 549fdc
Options are specified by doubled hyphens and their name or by a single
Packit 549fdc
hyphen and the flag character.
Packit 549fdc
Packit 549fdc
Tool to parse and generate X.509 certificates, requests and private keys.
Packit 549fdc
It can be used interactively or non interactively by specifying the
Packit 549fdc
template command line option.
Packit 549fdc
Packit 549fdc
The tool accepts files or supported URIs via the --infile option.  In case
Packit 549fdc
PIN is required for URI access you can provide it using the environment
Packit 549fdc
variables GNUTLS_PIN and GNUTLS_SO_PIN.
Packit 549fdc
Packit 549fdc
@end example
Packit 549fdc
@exampleindent 4
Packit 549fdc
Packit 549fdc
@anchor{certtool }
Packit 549fdc
@subsubheading Base options
Packit 549fdc
@subsubheading debug option (-d).
Packit 549fdc
@anchor{certtool debug}
Packit 549fdc
Packit 549fdc
This is the ``enable debugging'' option.
Packit 549fdc
This option takes a number argument.
Packit 549fdc
Specifies the debug level.
Packit 549fdc
@anchor{certtool cert-options}
Packit 549fdc
@subsubheading cert-options options
Packit 549fdc
Certificate related options.
Packit 549fdc
@subsubheading pubkey-info option.
Packit 549fdc
@anchor{certtool pubkey-info}
Packit 549fdc
Packit 549fdc
This is the ``print information on a public key'' option.
Packit 549fdc
The option combined with --load-request, --load-pubkey, --load-privkey and --load-certificate will extract the public key of the object in question.
Packit 549fdc
@subsubheading fingerprint option.
Packit 549fdc
@anchor{certtool fingerprint}
Packit 549fdc
Packit 549fdc
This is the ``print the fingerprint of the given certificate'' option.
Packit 549fdc
This is a simple hash of the DER encoding of the certificate. It can be combined with the --hash parameter. However, it is recommended for identification to use the key-id which depends only on the certificate's key.
Packit 549fdc
@subsubheading key-id option.
Packit 549fdc
@anchor{certtool key-id}
Packit 549fdc
Packit 549fdc
This is the ``print the key id of the given certificate'' option.
Packit 549fdc
This is a hash of the public key of the given certificate. It identifies the key uniquely, remains the same on a certificate renewal and depends only on signed fields of the certificate.
Packit 549fdc
@subsubheading certificate-pubkey option.
Packit 549fdc
@anchor{certtool certificate-pubkey}
Packit 549fdc
Packit 549fdc
This is the ``print certificate's public key'' option.
Packit 549fdc
This option is deprecated as a duplicate of --pubkey-info
Packit 549fdc
Packit 549fdc
@strong{NOTE}@strong{: THIS OPTION IS DEPRECATED}
Packit 549fdc
@subsubheading sign-params option.
Packit 549fdc
@anchor{certtool sign-params}
Packit 549fdc
Packit 549fdc
This is the ``sign a certificate with a specific signature algorithm'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This option can be combined with --generate-certificate, to sign the certificate with
Packit 549fdc
a specific signature algorithm variant. The only option supported is 'RSA-PSS', and should be
Packit 549fdc
specified when the signer does not have a certificate which is marked for RSA-PSS use only.
Packit 549fdc
@anchor{certtool crq-options}
Packit 549fdc
@subsubheading crq-options options
Packit 549fdc
Certificate request related options.
Packit 549fdc
@subsubheading generate-request option (-q).
Packit 549fdc
@anchor{certtool generate-request}
Packit 549fdc
Packit 549fdc
This is the ``generate a pkcs #10 certificate request'' option.
Packit 549fdc
Packit 549fdc
@noindent
Packit 549fdc
This option has some usage constraints.  It:
Packit 549fdc
@itemize @bullet
Packit 549fdc
@item
Packit 549fdc
must not appear in combination with any of the following options:
Packit 549fdc
infile.
Packit 549fdc
@end itemize
Packit 549fdc
Packit 549fdc
Will generate a PKCS #10 certificate request. To specify a private key use --load-privkey.
Packit 549fdc
@anchor{certtool pkcs12-options}
Packit 549fdc
@subsubheading pkcs12-options options
Packit 549fdc
PKCS#12 file related options.
Packit 549fdc
@subsubheading p12-info option.
Packit 549fdc
@anchor{certtool p12-info}
Packit 549fdc
Packit 549fdc
This is the ``print information on a pkcs #12 structure'' option.
Packit 549fdc
This option will dump the contents and print the metadata of the provided PKCS #12 structure.
Packit 549fdc
@subsubheading p12-name option.
Packit 549fdc
@anchor{certtool p12-name}
Packit 549fdc
Packit 549fdc
This is the ``the pkcs #12 friendly name to use'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
The name to be used for the primary certificate and private key in a PKCS #12 file.
Packit 549fdc
@subsubheading to-p12 option.
Packit 549fdc
@anchor{certtool to-p12}
Packit 549fdc
Packit 549fdc
This is the ``generate a pkcs #12 structure'' option.
Packit 549fdc
It requires a certificate, a private key and possibly a CA certificate to be specified.
Packit 549fdc
@anchor{certtool key-options}
Packit 549fdc
@subsubheading key-options options
Packit 549fdc
Private key related options.
Packit 549fdc
@subsubheading p8-info option.
Packit 549fdc
@anchor{certtool p8-info}
Packit 549fdc
Packit 549fdc
This is the ``print information on a pkcs #8 structure'' option.
Packit 549fdc
This option will print information about encrypted PKCS #8 structures. That option does not require the decryption of the structure.
Packit 549fdc
@subsubheading to-rsa option.
Packit 549fdc
@anchor{certtool to-rsa}
Packit 549fdc
Packit 549fdc
This is the ``convert an rsa-pss key to raw rsa format'' option.
Packit 549fdc
It requires an RSA-PSS key as input and will output a raw RSA
Packit 549fdc
key. This command is necessary for compatibility with applications that
Packit 549fdc
cannot read RSA-PSS keys.
Packit 549fdc
@subsubheading generate-privkey option (-p).
Packit 549fdc
@anchor{certtool generate-privkey}
Packit 549fdc
Packit 549fdc
This is the ``generate a private key'' option.
Packit 549fdc
When generating RSA-PSS private keys, the --hash option will
Packit 549fdc
restrict the allowed hash for the key; in the same keys the --salt-size
Packit 549fdc
option is also acceptable.
Packit 549fdc
@subsubheading curve option.
Packit 549fdc
@anchor{certtool curve}
Packit 549fdc
Packit 549fdc
This is the ``specify the curve used for ec key generation'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
Supported values are secp192r1, secp224r1, secp256r1, secp384r1 and secp521r1.
Packit 549fdc
@subsubheading sec-param option.
Packit 549fdc
@anchor{certtool sec-param}
Packit 549fdc
Packit 549fdc
This is the ``specify the security level [low, legacy, medium, high, ultra]'' option.
Packit 549fdc
This option takes a string argument @file{Security parameter}.
Packit 549fdc
This is alternative to the bits option.
Packit 549fdc
@subsubheading to-p8 option.
Packit 549fdc
@anchor{certtool to-p8}
Packit 549fdc
Packit 549fdc
This is the ``convert a given key to a pkcs #8 structure'' option.
Packit 549fdc
This needs to be combined with --load-privkey.
Packit 549fdc
@subsubheading provable option.
Packit 549fdc
@anchor{certtool provable}
Packit 549fdc
Packit 549fdc
This is the ``generate a private key or parameters from a seed using a provable method'' option.
Packit 549fdc
This will use the FIPS PUB186-4 algorithms (i.e., Shawe-Taylor) for provable key generation.
Packit 549fdc
When specified the private keys or parameters will be generated from a seed, and can be
Packit 549fdc
later validated with --verify-provable-privkey to be correctly generated from the seed. You may
Packit 549fdc
specify --seed or allow GnuTLS to generate one (recommended). This option can be combined with
Packit 549fdc
--generate-privkey or --generate-dh-params.
Packit 549fdc
Packit 549fdc
That option applies to RSA and DSA keys. On the DSA keys the PQG parameters
Packit 549fdc
are generated using the seed, and on RSA the two primes.
Packit 549fdc
@subsubheading verify-provable-privkey option.
Packit 549fdc
@anchor{certtool verify-provable-privkey}
Packit 549fdc
Packit 549fdc
This is the ``verify a private key generated from a seed using a provable method'' option.
Packit 549fdc
This will use the FIPS-186-4 algorithms for provable key generation. You may specify --seed or use the seed stored in the private key structure.
Packit 549fdc
@subsubheading seed option.
Packit 549fdc
@anchor{certtool seed}
Packit 549fdc
Packit 549fdc
This is the ``when generating a private key use the given hex-encoded seed'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
The seed acts as a security parameter for the private key, and
Packit 549fdc
thus a seed size which corresponds to the security level of the private key
Packit 549fdc
should be provided (e.g., 256-bits seed).
Packit 549fdc
@anchor{certtool crl-options}
Packit 549fdc
@subsubheading crl-options options
Packit 549fdc
CRL related options.
Packit 549fdc
@subsubheading generate-crl option.
Packit 549fdc
@anchor{certtool generate-crl}
Packit 549fdc
Packit 549fdc
This is the ``generate a crl'' option.
Packit 549fdc
This option generates a Certificate Revocation List. When combined with --load-crl it would use the loaded CRL as base for the generated (i.e., all revoked certificates in the base will be copied to the new CRL).
Packit 549fdc
@subsubheading verify-crl option.
Packit 549fdc
@anchor{certtool verify-crl}
Packit 549fdc
Packit 549fdc
This is the ``verify a certificate revocation list using a trusted list'' option.
Packit 549fdc
Packit 549fdc
@noindent
Packit 549fdc
This option has some usage constraints.  It:
Packit 549fdc
@itemize @bullet
Packit 549fdc
@item
Packit 549fdc
must appear in combination with the following options:
Packit 549fdc
load-ca-certificate.
Packit 549fdc
@end itemize
Packit 549fdc
Packit 549fdc
The trusted certificate list must be loaded with --load-ca-certificate.
Packit 549fdc
@anchor{certtool cert-verify-options}
Packit 549fdc
@subsubheading cert-verify-options options
Packit 549fdc
Certificate verification related options.
Packit 549fdc
@subsubheading verify-chain option (-e).
Packit 549fdc
@anchor{certtool verify-chain}
Packit 549fdc
Packit 549fdc
This is the ``verify a pem encoded certificate chain'' option.
Packit 549fdc
Verifies the validity of a certificate chain. That is, an ordered set of
Packit 549fdc
    certificates where each one is the issuer of the previous, and the first is
Packit 549fdc
    the end-certificate to be validated. In a proper chain the last certificate
Packit 549fdc
    is a self signed one. It can be combined with --verify-purpose or --verify-hostname.
Packit 549fdc
@subsubheading verify option.
Packit 549fdc
@anchor{certtool verify}
Packit 549fdc
Packit 549fdc
This is the ``verify a pem encoded certificate (chain) against a trusted set'' option.
Packit 549fdc
The trusted certificate list can be loaded with --load-ca-certificate. If no
Packit 549fdc
certificate list is provided, then the system's trusted certificate list is used. Note that
Packit 549fdc
during verification multiple paths may be explored. On a successful verification
Packit 549fdc
the successful path will be the last one. It can be combined with --verify-purpose or --verify-hostname.
Packit 549fdc
@subsubheading verify-hostname option.
Packit 549fdc
@anchor{certtool verify-hostname}
Packit 549fdc
Packit 549fdc
This is the ``specify a hostname to be used for certificate chain verification'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This is to be combined with one of the verify certificate options.
Packit 549fdc
@subsubheading verify-email option.
Packit 549fdc
@anchor{certtool verify-email}
Packit 549fdc
Packit 549fdc
This is the ``specify a email to be used for certificate chain verification'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
Packit 549fdc
@noindent
Packit 549fdc
This option has some usage constraints.  It:
Packit 549fdc
@itemize @bullet
Packit 549fdc
@item
Packit 549fdc
must not appear in combination with any of the following options:
Packit 549fdc
verify-hostname.
Packit 549fdc
@end itemize
Packit 549fdc
Packit 549fdc
This is to be combined with one of the verify certificate options.
Packit 549fdc
@subsubheading verify-purpose option.
Packit 549fdc
@anchor{certtool verify-purpose}
Packit 549fdc
Packit 549fdc
This is the ``specify a purpose oid to be used for certificate chain verification'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This object identifier restricts the purpose of the certificates to be verified. Example purposes are 1.3.6.1.5.5.7.3.1 (TLS WWW), 1.3.6.1.5.5.7.3.4 (EMAIL) etc. Note that a CA certificate without a purpose set (extended key usage) is valid for any purpose.
Packit 549fdc
@subsubheading verify-allow-broken option.
Packit 549fdc
@anchor{certtool verify-allow-broken}
Packit 549fdc
Packit 549fdc
This is the ``allow broken algorithms, such as md5 for verification'' option.
Packit 549fdc
This can be combined with --p7-verify, --verify or --verify-chain.
Packit 549fdc
@anchor{certtool pkcs7-options}
Packit 549fdc
@subsubheading pkcs7-options options
Packit 549fdc
PKCS#7 structure options.
Packit 549fdc
@subsubheading p7-generate option.
Packit 549fdc
@anchor{certtool p7-generate}
Packit 549fdc
Packit 549fdc
This is the ``generate a pkcs #7 structure'' option.
Packit 549fdc
This option generates a PKCS #7 certificate container structure. To add certificates in the structure use --load-certificate and --load-crl.
Packit 549fdc
@subsubheading p7-sign option.
Packit 549fdc
@anchor{certtool p7-sign}
Packit 549fdc
Packit 549fdc
This is the ``signs using a pkcs #7 structure'' option.
Packit 549fdc
This option generates a PKCS #7 structure containing a signature for the provided data from infile. The data are stored within the structure. The signer certificate has to be specified using --load-certificate and --load-privkey. The input to --load-certificate can be a list of certificates. In case of a list, the first certificate is used for signing and the other certificates are included in the structure.
Packit 549fdc
@subsubheading p7-detached-sign option.
Packit 549fdc
@anchor{certtool p7-detached-sign}
Packit 549fdc
Packit 549fdc
This is the ``signs using a detached pkcs #7 structure'' option.
Packit 549fdc
This option generates a PKCS #7 structure containing a signature for the provided data from infile. The signer certificate has to be specified using --load-certificate and --load-privkey. The input to --load-certificate can be a list of certificates. In case of a list, the first certificate is used for signing and the other certificates are included in the structure.
Packit 549fdc
@subsubheading p7-include-cert option.
Packit 549fdc
@anchor{certtool p7-include-cert}
Packit 549fdc
Packit 549fdc
This is the ``the signer's certificate will be included in the cert list.'' option.
Packit 549fdc
Packit 549fdc
@noindent
Packit 549fdc
This option has some usage constraints.  It:
Packit 549fdc
@itemize @bullet
Packit 549fdc
@item
Packit 549fdc
can be disabled with --no-p7-include-cert.
Packit 549fdc
@item
Packit 549fdc
It is enabled by default.
Packit 549fdc
@end itemize
Packit 549fdc
Packit 549fdc
This options works with --p7-sign or --p7-detached-sign and will include or exclude the signer's certificate into the generated signature.
Packit 549fdc
@subsubheading p7-time option.
Packit 549fdc
@anchor{certtool p7-time}
Packit 549fdc
Packit 549fdc
This is the ``will include a timestamp in the pkcs #7 structure'' option.
Packit 549fdc
Packit 549fdc
@noindent
Packit 549fdc
This option has some usage constraints.  It:
Packit 549fdc
@itemize @bullet
Packit 549fdc
@item
Packit 549fdc
can be disabled with --no-p7-time.
Packit 549fdc
@end itemize
Packit 549fdc
Packit 549fdc
This option will include a timestamp in the generated signature
Packit 549fdc
@subsubheading p7-show-data option.
Packit 549fdc
@anchor{certtool p7-show-data}
Packit 549fdc
Packit 549fdc
This is the ``will show the embedded data in the pkcs #7 structure'' option.
Packit 549fdc
Packit 549fdc
@noindent
Packit 549fdc
This option has some usage constraints.  It:
Packit 549fdc
@itemize @bullet
Packit 549fdc
@item
Packit 549fdc
can be disabled with --no-p7-show-data.
Packit 549fdc
@end itemize
Packit 549fdc
Packit 549fdc
This option can be combined with --p7-verify or --p7-info and will display the embedded signed data in the PKCS #7 structure.
Packit 549fdc
@subsubheading p7-verify option.
Packit 549fdc
@anchor{certtool p7-verify}
Packit 549fdc
Packit 549fdc
This is the ``verify the provided pkcs #7 structure'' option.
Packit 549fdc
This option verifies the signed PKCS #7 structure. The certificate list to use for verification can be specified with --load-ca-certificate. When no certificate list is provided, then the system's certificate list is used. Alternatively a direct signer can be provided using --load-certificate. A key purpose can be enforced with the --verify-purpose option, and the --load-data option will utilize detached data.
Packit 549fdc
@anchor{certtool other-options}
Packit 549fdc
@subsubheading other-options options
Packit 549fdc
Other options.
Packit 549fdc
@subsubheading generate-dh-params option.
Packit 549fdc
@anchor{certtool generate-dh-params}
Packit 549fdc
Packit 549fdc
This is the ``generate pkcs #3 encoded diffie-hellman parameters'' option.
Packit 549fdc
The will generate random parameters to be used with
Packit 549fdc
Diffie-Hellman key exchange. The output parameters will be in PKCS #3
Packit 549fdc
format. Note that it is recommended to use the --get-dh-params option
Packit 549fdc
instead.
Packit 549fdc
Packit 549fdc
@strong{NOTE}@strong{: THIS OPTION IS DEPRECATED}
Packit 549fdc
@subsubheading get-dh-params option.
Packit 549fdc
@anchor{certtool get-dh-params}
Packit 549fdc
Packit 549fdc
This is the ``list the included pkcs #3 encoded diffie-hellman parameters'' option.
Packit 549fdc
Returns stored DH parameters in GnuTLS. Those parameters returned
Packit 549fdc
are defined in RFC7919, and can be considered standard parameters for a TLS
Packit 549fdc
key exchange. This option is provided for old applications which require
Packit 549fdc
DH parameters to be specified; modern GnuTLS applications should not require
Packit 549fdc
them.
Packit 549fdc
@subsubheading load-privkey option.
Packit 549fdc
@anchor{certtool load-privkey}
Packit 549fdc
Packit 549fdc
This is the ``loads a private key file'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This can be either a file or a PKCS #11 URL
Packit 549fdc
@subsubheading load-pubkey option.
Packit 549fdc
@anchor{certtool load-pubkey}
Packit 549fdc
Packit 549fdc
This is the ``loads a public key file'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This can be either a file or a PKCS #11 URL
Packit 549fdc
@subsubheading load-request option.
Packit 549fdc
@anchor{certtool load-request}
Packit 549fdc
Packit 549fdc
This is the ``loads a certificate request file'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This option can be used with a file
Packit 549fdc
@subsubheading load-certificate option.
Packit 549fdc
@anchor{certtool load-certificate}
Packit 549fdc
Packit 549fdc
This is the ``loads a certificate file'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This option can be used with a file
Packit 549fdc
@subsubheading load-ca-privkey option.
Packit 549fdc
@anchor{certtool load-ca-privkey}
Packit 549fdc
Packit 549fdc
This is the ``loads the certificate authority's private key file'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This can be either a file or a PKCS #11 URL
Packit 549fdc
@subsubheading load-ca-certificate option.
Packit 549fdc
@anchor{certtool load-ca-certificate}
Packit 549fdc
Packit 549fdc
This is the ``loads the certificate authority's certificate file'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This can be either a file or a PKCS #11 URL
Packit 549fdc
@subsubheading load-crl option.
Packit 549fdc
@anchor{certtool load-crl}
Packit 549fdc
Packit 549fdc
This is the ``loads the provided crl'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This option can be used with a file
Packit 549fdc
@subsubheading load-data option.
Packit 549fdc
@anchor{certtool load-data}
Packit 549fdc
Packit 549fdc
This is the ``loads auxiliary data'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This option can be used with a file
Packit 549fdc
@subsubheading password option.
Packit 549fdc
@anchor{certtool password}
Packit 549fdc
Packit 549fdc
This is the ``password to use'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
You can use this option to specify the password in the command line instead of reading it from the tty. Note, that the command line arguments are available for view in others in the system. Specifying password as '' is the same as specifying no password.
Packit 549fdc
@subsubheading null-password option.
Packit 549fdc
@anchor{certtool null-password}
Packit 549fdc
Packit 549fdc
This is the ``enforce a null password'' option.
Packit 549fdc
This option enforces a NULL password. This is different than the empty or no password in schemas like PKCS #8.
Packit 549fdc
@subsubheading empty-password option.
Packit 549fdc
@anchor{certtool empty-password}
Packit 549fdc
Packit 549fdc
This is the ``enforce an empty password'' option.
Packit 549fdc
This option enforces an empty password. This is different than the NULL or no password in schemas like PKCS #8.
Packit 549fdc
@subsubheading cprint option.
Packit 549fdc
@anchor{certtool cprint}
Packit 549fdc
Packit 549fdc
This is the ``in certain operations it prints the information in c-friendly format'' option.
Packit 549fdc
In certain operations it prints the information in C-friendly format, suitable for including into C programs.
Packit 549fdc
@subsubheading rsa option.
Packit 549fdc
@anchor{certtool rsa}
Packit 549fdc
Packit 549fdc
This is the ``generate rsa key'' option.
Packit 549fdc
When combined with --generate-privkey generates an RSA private key.
Packit 549fdc
Packit 549fdc
@strong{NOTE}@strong{: THIS OPTION IS DEPRECATED}
Packit 549fdc
@subsubheading dsa option.
Packit 549fdc
@anchor{certtool dsa}
Packit 549fdc
Packit 549fdc
This is the ``generate dsa key'' option.
Packit 549fdc
When combined with --generate-privkey generates a DSA private key.
Packit 549fdc
Packit 549fdc
@strong{NOTE}@strong{: THIS OPTION IS DEPRECATED}
Packit 549fdc
@subsubheading ecc option.
Packit 549fdc
@anchor{certtool ecc}
Packit 549fdc
Packit 549fdc
This is the ``generate ecc (ecdsa) key'' option.
Packit 549fdc
When combined with --generate-privkey generates an elliptic curve private key to be used with ECDSA.
Packit 549fdc
Packit 549fdc
@strong{NOTE}@strong{: THIS OPTION IS DEPRECATED}
Packit 549fdc
@subsubheading ecdsa option.
Packit 549fdc
@anchor{certtool ecdsa}
Packit 549fdc
Packit 549fdc
This is an alias for the @code{ecc} option,
Packit 549fdc
@pxref{certtool ecc, the ecc option documentation}.
Packit 549fdc
Packit 549fdc
@subsubheading key-type option.
Packit 549fdc
@anchor{certtool key-type}
Packit 549fdc
Packit 549fdc
This is the ``specify the key type to use on key generation'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This option can be combined with --generate-privkey, to specify
Packit 549fdc
    the key type to be generated. Valid options are, 'rsa', 'rsa-pss',
Packit 549fdc
'dsa', 'ecdsa', and 'ed25519'.
Packit 549fdc
@subsubheading hash option.
Packit 549fdc
@anchor{certtool hash}
Packit 549fdc
Packit 549fdc
This is the ``hash algorithm to use for signing'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
Available hash functions are SHA1, RMD160, SHA256, SHA384, SHA512, SHA3-224, SHA3-256, SHA3-384, SHA3-512.
Packit 549fdc
@subsubheading salt-size option.
Packit 549fdc
@anchor{certtool salt-size}
Packit 549fdc
Packit 549fdc
This is the ``specify the rsa-pss key default salt size'' option.
Packit 549fdc
This option takes a number argument.
Packit 549fdc
Typical keys shouldn't set or restrict this option.
Packit 549fdc
@subsubheading inder option.
Packit 549fdc
@anchor{certtool inder}
Packit 549fdc
Packit 549fdc
This is the ``use der format for input certificates, private keys, and dh parameters '' option.
Packit 549fdc
Packit 549fdc
@noindent
Packit 549fdc
This option has some usage constraints.  It:
Packit 549fdc
@itemize @bullet
Packit 549fdc
@item
Packit 549fdc
can be disabled with --no-inder.
Packit 549fdc
@end itemize
Packit 549fdc
Packit 549fdc
The input files will be assumed to be in DER or RAW format. 
Packit 549fdc
Unlike options that in PEM input would allow multiple input data (e.g. multiple 
Packit 549fdc
certificates), when reading in DER format a single data structure is read.
Packit 549fdc
@subsubheading inraw option.
Packit 549fdc
@anchor{certtool inraw}
Packit 549fdc
Packit 549fdc
This is an alias for the @code{inder} option,
Packit 549fdc
@pxref{certtool inder, the inder option documentation}.
Packit 549fdc
Packit 549fdc
@subsubheading outder option.
Packit 549fdc
@anchor{certtool outder}
Packit 549fdc
Packit 549fdc
This is the ``use der format for output certificates, private keys, and dh parameters'' option.
Packit 549fdc
Packit 549fdc
@noindent
Packit 549fdc
This option has some usage constraints.  It:
Packit 549fdc
@itemize @bullet
Packit 549fdc
@item
Packit 549fdc
can be disabled with --no-outder.
Packit 549fdc
@end itemize
Packit 549fdc
Packit 549fdc
The output will be in DER or RAW format.
Packit 549fdc
@subsubheading outraw option.
Packit 549fdc
@anchor{certtool outraw}
Packit 549fdc
Packit 549fdc
This is an alias for the @code{outder} option,
Packit 549fdc
@pxref{certtool outder, the outder option documentation}.
Packit 549fdc
Packit 549fdc
@subsubheading ask-pass option.
Packit 549fdc
@anchor{certtool ask-pass}
Packit 549fdc
Packit 549fdc
This is the ``enable interaction for entering password when in batch mode.'' option.
Packit 549fdc
This option will enable interaction to enter password when in batch mode. That is useful when the template option has been specified.
Packit 549fdc
@subsubheading pkcs-cipher option.
Packit 549fdc
@anchor{certtool pkcs-cipher}
Packit 549fdc
Packit 549fdc
This is the ``cipher to use for pkcs #8 and #12 operations'' option.
Packit 549fdc
This option takes a string argument @file{Cipher}.
Packit 549fdc
Cipher may be one of 3des, 3des-pkcs12, aes-128, aes-192, aes-256, rc2-40, arcfour.
Packit 549fdc
@subsubheading provider option.
Packit 549fdc
@anchor{certtool provider}
Packit 549fdc
Packit 549fdc
This is the ``specify the pkcs #11 provider library'' option.
Packit 549fdc
This option takes a string argument.
Packit 549fdc
This will override the default options in /etc/gnutls/pkcs11.conf
Packit 549fdc
@anchor{certtool exit status}
Packit 549fdc
@subsubheading certtool exit status
Packit 549fdc
Packit 549fdc
One of the following exit values will be returned:
Packit 549fdc
@table @samp
Packit 549fdc
@item 0 (EXIT_SUCCESS)
Packit 549fdc
Successful program execution.
Packit 549fdc
@item 1 (EXIT_FAILURE)
Packit 549fdc
The operation failed or the command syntax was not valid.
Packit 549fdc
@end table
Packit 549fdc
@anchor{certtool See Also}
Packit 549fdc
@subsubheading certtool See Also
Packit 549fdc
    p11tool (1)
Packit 549fdc
@anchor{certtool Examples}
Packit 549fdc
@subsubheading certtool Examples
Packit 549fdc
@subsubheading Generating private keys
Packit 549fdc
To create an RSA private key, run:
Packit 549fdc
@example
Packit 549fdc
$ certtool --generate-privkey --outfile key.pem --rsa
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
To create a DSA or elliptic curves (ECDSA) private key use the
Packit 549fdc
above command combined with 'dsa' or 'ecc' options.
Packit 549fdc
Packit 549fdc
@subsubheading Generating certificate requests
Packit 549fdc
To create a certificate request (needed when the certificate is  issued  by
Packit 549fdc
another party), run:
Packit 549fdc
@example
Packit 549fdc
certtool --generate-request --load-privkey key.pem \
Packit 549fdc
   --outfile request.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
If the private key is stored in a smart card you can generate
Packit 549fdc
a request by specifying the private key object URL.
Packit 549fdc
@example
Packit 549fdc
$ ./certtool --generate-request --load-privkey "pkcs11:..." \
Packit 549fdc
  --load-pubkey "pkcs11:..." --outfile request.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
Packit 549fdc
@subsubheading Generating a self-signed certificate
Packit 549fdc
To create a self signed certificate, use the command:
Packit 549fdc
@example
Packit 549fdc
$ certtool --generate-privkey --outfile ca-key.pem
Packit 549fdc
$ certtool --generate-self-signed --load-privkey ca-key.pem \
Packit 549fdc
   --outfile ca-cert.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
Note that a self-signed certificate usually belongs to a certificate
Packit 549fdc
authority, that signs other certificates.
Packit 549fdc
Packit 549fdc
@subsubheading Generating a certificate
Packit 549fdc
To generate a certificate using the previous request, use the command:
Packit 549fdc
@example
Packit 549fdc
$ certtool --generate-certificate --load-request request.pem \
Packit 549fdc
   --outfile cert.pem --load-ca-certificate ca-cert.pem \
Packit 549fdc
   --load-ca-privkey ca-key.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
To generate a certificate using the private key only, use the command:
Packit 549fdc
@example
Packit 549fdc
$ certtool --generate-certificate --load-privkey key.pem \
Packit 549fdc
   --outfile cert.pem --load-ca-certificate ca-cert.pem \
Packit 549fdc
   --load-ca-privkey ca-key.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
@subsubheading Certificate information
Packit 549fdc
To view the certificate information, use:
Packit 549fdc
@example
Packit 549fdc
$ certtool --certificate-info --infile cert.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
@subsubheading PKCS #12 structure generation
Packit 549fdc
To generate a PKCS #12 structure using the previous key and certificate,
Packit 549fdc
use the command:
Packit 549fdc
@example
Packit 549fdc
$ certtool --load-certificate cert.pem --load-privkey key.pem \
Packit 549fdc
   --to-p12 --outder --outfile key.p12
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
Some tools (reportedly web browsers) have problems with that file
Packit 549fdc
because it does not contain the CA certificate for the certificate.
Packit 549fdc
To work around that problem in the tool, you can use the
Packit 549fdc
--load-ca-certificate parameter as follows:
Packit 549fdc
Packit 549fdc
@example
Packit 549fdc
$ certtool --load-ca-certificate ca.pem \
Packit 549fdc
  --load-certificate cert.pem --load-privkey key.pem \
Packit 549fdc
  --to-p12 --outder --outfile key.p12
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
@subsubheading Obtaining Diffie-Hellman parameters
Packit 549fdc
To obtain the RFC7919 parameters for Diffie-Hellman key exchange, use the command:
Packit 549fdc
@example
Packit 549fdc
$ certtool --get-dh-params --outfile dh.pem --sec-param medium
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
@subsubheading Verifying a certificate
Packit 549fdc
To verify a certificate in a file against the system's CA trust store
Packit 549fdc
use the following command:
Packit 549fdc
@example
Packit 549fdc
$ certtool --verify --infile cert.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
It is also possible to simulate hostname verification with the following
Packit 549fdc
options:
Packit 549fdc
@example
Packit 549fdc
$ certtool --verify --verify-hostname www.example.com --infile cert.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
Packit 549fdc
@subsubheading Proxy certificate generation
Packit 549fdc
Proxy certificate can be used to delegate your credential to a
Packit 549fdc
temporary, typically short-lived, certificate.  To create one from the
Packit 549fdc
previously created certificate, first create a temporary key and then
Packit 549fdc
generate a proxy certificate for it, using the commands:
Packit 549fdc
Packit 549fdc
@example
Packit 549fdc
$ certtool --generate-privkey > proxy-key.pem
Packit 549fdc
$ certtool --generate-proxy --load-ca-privkey key.pem \
Packit 549fdc
  --load-privkey proxy-key.pem --load-certificate cert.pem \
Packit 549fdc
  --outfile proxy-cert.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
@subsubheading Certificate revocation list generation
Packit 549fdc
To create an empty Certificate Revocation List (CRL) do:
Packit 549fdc
Packit 549fdc
@example
Packit 549fdc
$ certtool --generate-crl --load-ca-privkey x509-ca-key.pem \
Packit 549fdc
           --load-ca-certificate x509-ca.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
To create a CRL that contains some revoked certificates, place the
Packit 549fdc
certificates in a file and use @code{--load-certificate} as follows:
Packit 549fdc
Packit 549fdc
@example
Packit 549fdc
$ certtool --generate-crl --load-ca-privkey x509-ca-key.pem \
Packit 549fdc
  --load-ca-certificate x509-ca.pem --load-certificate revoked-certs.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
To verify a Certificate Revocation List (CRL) do:
Packit 549fdc
Packit 549fdc
@example
Packit 549fdc
$ certtool --verify-crl --load-ca-certificate x509-ca.pem < crl.pem
Packit 549fdc
@end example
Packit 549fdc
@anchor{certtool Files}
Packit 549fdc
@subsubheading certtool Files
Packit 549fdc
@subsubheading Certtool's template file format
Packit 549fdc
A template file can be used to avoid the interactive questions of
Packit 549fdc
certtool. Initially create a file named 'cert.cfg' that contains the information
Packit 549fdc
about the certificate. The template can be used as below:
Packit 549fdc
Packit 549fdc
@example
Packit 549fdc
$ certtool --generate-certificate --load-privkey key.pem  \
Packit 549fdc
   --template cert.cfg --outfile cert.pem \
Packit 549fdc
   --load-ca-certificate ca-cert.pem --load-ca-privkey ca-key.pem
Packit 549fdc
@end example
Packit 549fdc
Packit 549fdc
An example certtool template file that can be used to generate a certificate
Packit 549fdc
request or a self signed certificate follows.
Packit 549fdc
Packit 549fdc
@example
Packit 549fdc
# X.509 Certificate options
Packit 549fdc
#
Packit 549fdc
# DN options
Packit 549fdc
Packit 549fdc
# The organization of the subject.
Packit 549fdc
organization = "Koko inc."
Packit 549fdc
Packit 549fdc
# The organizational unit of the subject.
Packit 549fdc
unit = "sleeping dept."
Packit 549fdc
Packit 549fdc
# The locality of the subject.
Packit 549fdc
# locality =
Packit 549fdc
Packit 549fdc
# The state of the certificate owner.
Packit 549fdc
state = "Attiki"
Packit 549fdc
Packit 549fdc
# The country of the subject. Two letter code.
Packit 549fdc
country = GR
Packit 549fdc
Packit 549fdc
# The common name of the certificate owner.
Packit 549fdc
cn = "Cindy Lauper"
Packit 549fdc
Packit 549fdc
# A user id of the certificate owner.
Packit 549fdc
#uid = "clauper"
Packit 549fdc
Packit 549fdc
# Set domain components
Packit 549fdc
#dc = "name"
Packit 549fdc
#dc = "domain"
Packit 549fdc
Packit 549fdc
# If the supported DN OIDs are not adequate you can set
Packit 549fdc
# any OID here.
Packit 549fdc
# For example set the X.520 Title and the X.520 Pseudonym
Packit 549fdc
# by using OID and string pairs.
Packit 549fdc
#dn_oid = "2.5.4.12 Dr."
Packit 549fdc
#dn_oid = "2.5.4.65 jackal"
Packit 549fdc
Packit 549fdc
# This is deprecated and should not be used in new
Packit 549fdc
# certificates.
Packit 549fdc
# pkcs9_email = "none@@none.org"
Packit 549fdc
Packit 549fdc
# An alternative way to set the certificate's distinguished name directly
Packit 549fdc
# is with the "dn" option. The attribute names allowed are:
Packit 549fdc
# C (country), street, O (organization), OU (unit), title, CN (common name),
Packit 549fdc
# L (locality), ST (state), placeOfBirth, gender, countryOfCitizenship, 
Packit 549fdc
# countryOfResidence, serialNumber, telephoneNumber, surName, initials, 
Packit 549fdc
# generationQualifier, givenName, pseudonym, dnQualifier, postalCode, name, 
Packit 549fdc
# businessCategory, DC, UID, jurisdictionOfIncorporationLocalityName, 
Packit 549fdc
# jurisdictionOfIncorporationStateOrProvinceName,
Packit 549fdc
# jurisdictionOfIncorporationCountryName, XmppAddr, and numeric OIDs.
Packit 549fdc
Packit 549fdc
#dn = "cn = Nikos,st = New\, Something,C=GR,surName=Mavrogiannopoulos,2.5.4.9=Arkadias"
Packit 549fdc
Packit 549fdc
# The serial number of the certificate
Packit 549fdc
# Comment the field for a time-based serial number.
Packit 549fdc
serial = 007
Packit 549fdc
Packit 549fdc
# In how many days, counting from today, this certificate will expire.
Packit 549fdc
# Use -1 if there is no expiration date.
Packit 549fdc
expiration_days = 700
Packit 549fdc
Packit 549fdc
# Alternatively you may set concrete dates and time. The GNU date string 
Packit 549fdc
# formats are accepted. See:
Packit 549fdc
# http://www.gnu.org/software/tar/manual/html_node/Date-input-formats.html
Packit 549fdc
Packit 549fdc
#activation_date = "2004-02-29 16:21:42"
Packit 549fdc
#expiration_date = "2025-02-29 16:24:41"
Packit 549fdc
Packit 549fdc
# X.509 v3 extensions
Packit 549fdc
Packit 549fdc
# A dnsname in case of a WWW server.
Packit 549fdc
#dns_name = "www.none.org"
Packit 549fdc
#dns_name = "www.morethanone.org"
Packit 549fdc
Packit 549fdc
# An othername defined by an OID and a hex encoded string
Packit 549fdc
#other_name = "1.3.6.1.5.2.2 302ca00d1b0b56414e5245494e2e4f5247a11b3019a006020400000002a10f300d1b047269636b1b0561646d696e"
Packit 549fdc
#other_name_utf8 = "1.2.4.5.6 A UTF8 string"
Packit 549fdc
#other_name_octet = "1.2.4.5.6 A string that will be encoded as ASN.1 octet string"
Packit 549fdc
Packit 549fdc
# Allows writing an XmppAddr Identifier
Packit 549fdc
#xmpp_name = juliet@@im.example.com
Packit 549fdc
Packit 549fdc
# Names used in PKINIT
Packit 549fdc
#krb5_principal = user@@REALM.COM
Packit 549fdc
#krb5_principal = HTTP/user@@REALM.COM
Packit 549fdc
Packit 549fdc
# A subject alternative name URI
Packit 549fdc
#uri = "http://www.example.com"
Packit 549fdc
Packit 549fdc
# An IP address in case of a server.
Packit 549fdc
#ip_address = "192.168.1.1"
Packit 549fdc
Packit 549fdc
# An email in case of a person
Packit 549fdc
email = "none@@none.org"
Packit 549fdc
Packit 549fdc
# TLS feature (rfc7633) extension. That can is used to indicate mandatory TLS
Packit 549fdc
# extension features to be provided by the server. In practice this is used
Packit 549fdc
# to require the Status Request (extid: 5) extension from the server. That is,
Packit 549fdc
# to require the server holding this certificate to provide a stapled OCSP response.
Packit 549fdc
# You can have multiple lines for multiple TLS features.
Packit 549fdc
Packit 549fdc
# To ask for OCSP status request use:
Packit 549fdc
#tls_feature = 5
Packit 549fdc
Packit 549fdc
# Challenge password used in certificate requests
Packit 549fdc
challenge_password = 123456
Packit 549fdc
Packit 549fdc
# Password when encrypting a private key
Packit 549fdc
#password = secret
Packit 549fdc
Packit 549fdc
# An URL that has CRLs (certificate revocation lists)
Packit 549fdc
# available. Needed in CA certificates.
Packit 549fdc
#crl_dist_points = "http://www.getcrl.crl/getcrl/"
Packit 549fdc
Packit 549fdc
# Whether this is a CA certificate or not
Packit 549fdc
#ca
Packit 549fdc
Packit 549fdc
# Subject Unique ID (in hex)
Packit 549fdc
#subject_unique_id = 00153224
Packit 549fdc
Packit 549fdc
# Issuer Unique ID (in hex)
Packit 549fdc
#issuer_unique_id = 00153225
Packit 549fdc
Packit 549fdc
#### Key usage
Packit 549fdc
Packit 549fdc
# The following key usage flags are used by CAs and end certificates
Packit 549fdc
Packit 549fdc
# Whether this certificate will be used to sign data (needed
Packit 549fdc
# in TLS DHE ciphersuites). This is the digitalSignature flag
Packit 549fdc
# in RFC5280 terminology.
Packit 549fdc
signing_key
Packit 549fdc
Packit 549fdc
# Whether this certificate will be used to encrypt data (needed
Packit 549fdc
# in TLS RSA ciphersuites). Note that it is preferred to use different
Packit 549fdc
# keys for encryption and signing. This is the keyEncipherment flag
Packit 549fdc
# in RFC5280 terminology.
Packit 549fdc
encryption_key
Packit 549fdc
Packit 549fdc
# Whether this key will be used to sign other certificates. The
Packit 549fdc
# keyCertSign flag in RFC5280 terminology.
Packit 549fdc
#cert_signing_key
Packit 549fdc
Packit 549fdc
# Whether this key will be used to sign CRLs. The
Packit 549fdc
# cRLSign flag in RFC5280 terminology.
Packit 549fdc
#crl_signing_key
Packit 549fdc
Packit 549fdc
# The keyAgreement flag of RFC5280. It's purpose is loosely
Packit 549fdc
# defined. Not use it unless required by a protocol.
Packit 549fdc
#key_agreement
Packit 549fdc
Packit 549fdc
# The dataEncipherment flag of RFC5280. It's purpose is loosely
Packit 549fdc
# defined. Not use it unless required by a protocol.
Packit 549fdc
#data_encipherment
Packit 549fdc
Packit 549fdc
# The nonRepudiation flag of RFC5280. It's purpose is loosely
Packit 549fdc
# defined. Not use it unless required by a protocol.
Packit 549fdc
#non_repudiation
Packit 549fdc
Packit 549fdc
#### Extended key usage (key purposes)
Packit 549fdc
Packit 549fdc
# The following extensions are used in an end certificate
Packit 549fdc
# to clarify its purpose. Some CAs also use it to indicate
Packit 549fdc
# the types of certificates they are purposed to sign.
Packit 549fdc
Packit 549fdc
Packit 549fdc
# Whether this certificate will be used for a TLS client;
Packit 549fdc
# this sets the id-kp-serverAuth (1.3.6.1.5.5.7.3.1) of 
Packit 549fdc
# extended key usage.
Packit 549fdc
#tls_www_client
Packit 549fdc
Packit 549fdc
# Whether this certificate will be used for a TLS server;
Packit 549fdc
# This sets the id-kp-clientAuth (1.3.6.1.5.5.7.3.2) of 
Packit 549fdc
# extended key usage.
Packit 549fdc
#tls_www_server
Packit 549fdc
Packit 549fdc
# Whether this key will be used to sign code. This sets the
Packit 549fdc
# id-kp-codeSigning (1.3.6.1.5.5.7.3.3) of extended key usage
Packit 549fdc
# extension.
Packit 549fdc
#code_signing_key
Packit 549fdc
Packit 549fdc
# Whether this key will be used to sign OCSP data. This sets the
Packit 549fdc
# id-kp-OCSPSigning (1.3.6.1.5.5.7.3.9) of extended key usage extension.
Packit 549fdc
#ocsp_signing_key
Packit 549fdc
Packit 549fdc
# Whether this key will be used for time stamping. This sets the
Packit 549fdc
# id-kp-timeStamping (1.3.6.1.5.5.7.3.8) of extended key usage extension.
Packit 549fdc
#time_stamping_key
Packit 549fdc
Packit 549fdc
# Whether this key will be used for email protection. This sets the
Packit 549fdc
# id-kp-emailProtection (1.3.6.1.5.5.7.3.4) of extended key usage extension.
Packit 549fdc
#email_protection_key
Packit 549fdc
Packit 549fdc
# Whether this key will be used for IPsec IKE operations (1.3.6.1.5.5.7.3.17).
Packit 549fdc
#ipsec_ike_key
Packit 549fdc
Packit 549fdc
## adding custom key purpose OIDs
Packit 549fdc
Packit 549fdc
# for microsoft smart card logon
Packit 549fdc
# key_purpose_oid = 1.3.6.1.4.1.311.20.2.2
Packit 549fdc
Packit 549fdc
# for email protection
Packit 549fdc
# key_purpose_oid = 1.3.6.1.5.5.7.3.4
Packit 549fdc
Packit 549fdc
# for any purpose (must not be used in intermediate CA certificates)
Packit 549fdc
# key_purpose_oid = 2.5.29.37.0
Packit 549fdc
Packit 549fdc
### end of key purpose OIDs
Packit 549fdc
Packit 549fdc
### Adding arbitrary extensions
Packit 549fdc
# This requires to provide the extension OIDs, as well as the extension data in
Packit 549fdc
# hex format. The following two options are available since GnuTLS 3.5.3.
Packit 549fdc
#add_extension = "1.2.3.4 0x0AAB01ACFE"
Packit 549fdc
Packit 549fdc
# As above but encode the data as an octet string
Packit 549fdc
#add_extension = "1.2.3.4 octet_string(0x0AAB01ACFE)"
Packit 549fdc
Packit 549fdc
# For portability critical extensions shouldn't be set to certificates.
Packit 549fdc
#add_critical_extension = "5.6.7.8 0x1AAB01ACFE"
Packit 549fdc
Packit 549fdc
# When generating a certificate from a certificate
Packit 549fdc
# request, then honor the extensions stored in the request
Packit 549fdc
# and store them in the real certificate.
Packit 549fdc
#honor_crq_extensions
Packit 549fdc
Packit 549fdc
# Alternatively only specific extensions can be copied.
Packit 549fdc
#honor_crq_ext = 2.5.29.17
Packit 549fdc
#honor_crq_ext = 2.5.29.15
Packit 549fdc
Packit 549fdc
# Path length contraint. Sets the maximum number of
Packit 549fdc
# certificates that can be used to certify this certificate.
Packit 549fdc
# (i.e. the certificate chain length)
Packit 549fdc
#path_len = -1
Packit 549fdc
#path_len = 2
Packit 549fdc
Packit 549fdc
# OCSP URI
Packit 549fdc
# ocsp_uri = http://my.ocsp.server/ocsp
Packit 549fdc
Packit 549fdc
# CA issuers URI
Packit 549fdc
# ca_issuers_uri = http://my.ca.issuer
Packit 549fdc
Packit 549fdc
# Certificate policies
Packit 549fdc
#policy1 = 1.3.6.1.4.1.5484.1.10.99.1.0
Packit 549fdc
#policy1_txt = "This is a long policy to summarize"
Packit 549fdc
#policy1_url = http://www.example.com/a-policy-to-read
Packit 549fdc
Packit 549fdc
#policy2 = 1.3.6.1.4.1.5484.1.10.99.1.1
Packit 549fdc
#policy2_txt = "This is a short policy"
Packit 549fdc
#policy2_url = http://www.example.com/another-policy-to-read
Packit 549fdc
Packit 549fdc
# The number of additional certificates that may appear in a
Packit 549fdc
# path before the anyPolicy is no longer acceptable.
Packit 549fdc
#inhibit_anypolicy_skip_certs 1
Packit 549fdc
Packit 549fdc
# Name constraints
Packit 549fdc
Packit 549fdc
# DNS
Packit 549fdc
#nc_permit_dns = example.com
Packit 549fdc
#nc_exclude_dns = test.example.com
Packit 549fdc
Packit 549fdc
# EMAIL
Packit 549fdc
#nc_permit_email = "nmav@@ex.net"
Packit 549fdc
Packit 549fdc
# Exclude subdomains of example.com
Packit 549fdc
#nc_exclude_email = .example.com
Packit 549fdc
Packit 549fdc
# Exclude all e-mail addresses of example.com
Packit 549fdc
#nc_exclude_email = example.com
Packit 549fdc
Packit 549fdc
# IP
Packit 549fdc
#nc_permit_ip = 192.168.0.0/16
Packit 549fdc
#nc_exclude_ip = 192.168.5.0/24
Packit 549fdc
#nc_permit_ip = fc0a:eef2:e7e7:a56e::/64
Packit 549fdc
Packit 549fdc
Packit 549fdc
# Options for proxy certificates
Packit 549fdc
#proxy_policy_language = 1.3.6.1.5.5.7.21.1
Packit 549fdc
Packit 549fdc
Packit 549fdc
# Options for generating a CRL
Packit 549fdc
Packit 549fdc
# The number of days the next CRL update will be due.
Packit 549fdc
# next CRL update will be in 43 days
Packit 549fdc
#crl_next_update = 43
Packit 549fdc
Packit 549fdc
# this is the 5th CRL by this CA
Packit 549fdc
# Comment the field for a time-based number.
Packit 549fdc
#crl_number = 5
Packit 549fdc
Packit 549fdc
# Specify the update dates more precisely.
Packit 549fdc
#crl_this_update_date = "2004-02-29 16:21:42"
Packit 549fdc
#crl_next_update_date = "2025-02-29 16:24:41"
Packit 549fdc
Packit 549fdc
# The date that the certificates will be made seen as
Packit 549fdc
# being revoked.
Packit 549fdc
#crl_revocation_date = "2025-02-29 16:24:41"
Packit 549fdc
Packit 549fdc
@end example