Blame doc/invoke-certtool.texi

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