[ { "meta": { "desc": "", "prog-name": "certtool", "prog-title": "GnuTLS certificate tool", "prog-desc": "Manipulate certificates and private keys.", "detail": "Tool to parse and generate X.509 certificates, requests and private keys.\nIt can be used interactively or non interactively by\nspecifying the template command line option.\n\nThe tool accepts files or supported URIs via the --infile option. In case PIN\nis required for URI access you can provide it using the environment variables GNUTLS_PIN \nand GNUTLS_SO_PIN.\n", "short-usage": "certtool [options]\ncerttool --help for usage instructions.\n", "explain": "" }, "options": [ { "long-option": "debug", "short-option": "d", "arg-min": "0 ", "desc": "Enable debugging", "arg-max": " 9999", "detail": "Specifies the debug level.", "arg-type": "number" }, { "short-option": "V", "max": "NOLIMIT", "long-option": "verbose", "desc": "More verbose output", "disabled": "", "detail": "" }, { "long-option": "infile", "detail": "", "arg-type": "file", "desc": "Input file", "file-exists": "yes" }, { "detail": "", "arg-type": "string", "desc": "Output file", "long-option": "outfile" } ] }, { "meta": { "id": "cert-options", "desc": "Certificate related options" }, "options": [ { "detail": "", "desc": "Print information on the given certificate", "short-option": "i", "long-option": "certificate-info" }, { "desc": "Print information on a public key", "long-option": "pubkey-info", "detail": "The option combined with --load-request, --load-pubkey, --load-privkey and --load-certificate will extract the public key of the object in question." }, { "long-option": "generate-self-signed", "short-option": "s", "desc": "Generate a self-signed certificate", "detail": "" }, { "short-option": "c", "long-option": "generate-certificate", "desc": "Generate a signed certificate", "detail": "" }, { "detail": "", "desc": "Generates a proxy certificate", "long-option": "generate-proxy" }, { "short-option": "u", "long-option": "update-certificate", "detail": "", "desc": "Update a signed certificate" }, { "desc": "Print the fingerprint of the given certificate", "long-option": "fingerprint", "detail": "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." }, { "long-option": "key-id", "desc": "Print the key ID of the given certificate", "detail": "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." }, { "deprecated": "", "long-option": "certificate-pubkey", "desc": "Print certificate's public key", "detail": "This option is deprecated as a duplicate of --pubkey-info" }, { "desc": "Generate an X.509 version 1 certificate (with no extensions)", "long-option": "v1", "detail": "" }, { "desc": "Sign a certificate with a specific signature algorithm", "arg-type": "string", "detail": "This option can be combined with --generate-certificate, to sign the certificate with\na specific signature algorithm variant. The only option supported is 'RSA-PSS', and should be\nspecified when the signer does not have a certificate which is marked for RSA-PSS use only.", "long-option": "sign-params" } ] }, { "meta": { "desc": "Certificate request related options", "id": "crq-options" }, "options": [ { "detail": "", "long-option": "crq-info", "desc": "Print information on the given certificate request" }, { "detail": "Will generate a PKCS #10 certificate request. To specify a private key use --load-privkey.", "conflicts": "infile", "long-option": "generate-request", "desc": "Generate a PKCS #10 certificate request", "short-option": "q" }, { "desc": "Do not use extensions in certificate requests", "detail": "", "long-option": "no-crq-extensions" } ] }, { "meta": { "desc": "PKCS#12 file related options", "id": "pkcs12-options" }, "options": [ { "detail": "This option will dump the contents and print the metadata of the provided PKCS #12 structure.", "desc": "Print information on a PKCS #12 structure", "long-option": "p12-info" }, { "arg-type": "string", "desc": "The PKCS #12 friendly name to use", "detail": "The name to be used for the primary certificate and private key in a PKCS #12 file.", "long-option": "p12-name" }, { "detail": "It requires a certificate, a private key and possibly a CA certificate to be specified.", "desc": "Generate a PKCS #12 structure", "long-option": "to-p12" } ] }, { "meta": { "id": "key-options", "desc": "Private key related options" }, "options": [ { "short-option": "k", "long-option": "key-info", "detail": "", "desc": "Print information on a private key" }, { "desc": "Print information on a PKCS #8 structure", "detail": "This option will print information about encrypted PKCS #8 structures. That option does not require the decryption of the structure.", "long-option": "p8-info" }, { "detail": "It requires an RSA-PSS key as input and will output a raw RSA\nkey. This command is necessary for compatibility with applications that\ncannot read RSA-PSS keys.", "long-option": "to-rsa", "desc": "Convert an RSA-PSS key to raw RSA format" }, { "long-option": "generate-privkey", "detail": "When generating RSA-PSS private keys, the --hash option will\nrestrict the allowed hash for the key; in the same keys the --salt-size\noption is also acceptable.", "desc": "Generate a private key", "short-option": "p" }, { "arg-type": "string", "long-option": "key-type", "desc": "Specify the key type to use on key generation", "detail": "This option can be combined with --generate-privkey, to specify\nthe key type to be generated. Valid options are, 'rsa', 'rsa-pss', 'dsa', 'ecdsa', 'ed25519, 'ed448', 'x25519', and 'x448'.'.\nWhen combined with certificate generation it can be used to specify an\nRSA-PSS certificate when an RSA key is given." }, { "long-option": "bits", "desc": "Specify the number of bits for key generation", "detail": "", "arg-type": "number" }, { "detail": "Supported values are secp192r1, secp224r1, secp256r1, secp384r1 and secp521r1.", "arg-type": "string", "long-option": "curve", "desc": "Specify the curve used for EC key generation" }, { "detail": "This is alternative to the bits option.", "arg-type": "string", "long-option": "sec-param", "arg-name": "Security parameter", "desc": "Specify the security level [low, legacy, medium, high, ultra]" }, { "detail": "This needs to be combined with --load-privkey.", "desc": "Convert a given key to a PKCS #8 structure", "long-option": "to-p8" }, { "short-option": "8", "long-option": "pkcs8", "desc": "Use PKCS #8 format for private keys", "detail": "" }, { "desc": "Generate a private key or parameters from a seed using a provable method", "detail": "This will use the FIPS PUB186-4 algorithms (i.e., Shawe-Taylor) for provable key generation.\nWhen specified the private keys or parameters will be generated from a seed, and can be\nlater validated with --verify-provable-privkey to be correctly generated from the seed. You may\nspecify --seed or allow GnuTLS to generate one (recommended). This option can be combined with\n--generate-privkey or --generate-dh-params.\n\nThat option applies to RSA and DSA keys. On the DSA keys the PQG parameters\nare generated using the seed, and on RSA the two primes.", "long-option": "provable" }, { "detail": "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.", "long-option": "verify-provable-privkey", "desc": "Verify a private key generated from a seed using a provable method" }, { "detail": "The seed acts as a security parameter for the private key, and\nthus a seed size which corresponds to the security level of the private key\nshould be provided (e.g., 256-bits seed).", "arg-type": "string", "desc": "When generating a private key use the given hex-encoded seed", "long-option": "seed" } ] }, { "meta": { "desc": "CRL related options", "id": "crl-options" }, "options": [ { "short-option": "l", "desc": "Print information on the given CRL structure", "long-option": "crl-info", "detail": "" }, { "long-option": "generate-crl", "detail": "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).\nTo add new certificates to the CRL use --load-certificate.", "desc": "Generate a CRL" }, { "requires": "load-ca-certificate", "desc": "Verify a Certificate Revocation List using a trusted list", "long-option": "verify-crl", "detail": "The trusted certificate list must be loaded with --load-ca-certificate." } ] }, { "meta": { "desc": "Certificate verification related options", "id": "cert-verify-options" }, "options": [ { "long-option": "verify-chain", "desc": "Verify a PEM encoded certificate chain", "detail": "Verifies the validity of a certificate chain. That is, an ordered set of\ncertificates where each one is the issuer of the previous, and the first is\nthe end-certificate to be validated. In a proper chain the last certificate\nis a self signed one. It can be combined with --verify-purpose or --verify-hostname.", "short-option": "e" }, { "detail": "The trusted certificate list can be loaded with --load-ca-certificate. If no\ncertificate list is provided, then the system's trusted certificate list is used. Note that\nduring verification multiple paths may be explored. On a successful verification\nthe successful path will be the last one. It can be combined with --verify-purpose or --verify-hostname.", "desc": "Verify a PEM encoded certificate (chain) against a trusted set", "long-option": "verify" }, { "long-option": "verify-hostname", "desc": "Specify a hostname to be used for certificate chain verification", "arg-type": "string", "detail": "This is to be combined with one of the verify certificate options." }, { "detail": "This is to be combined with one of the verify certificate options.", "long-option": "verify-email", "desc": "Specify a email to be used for certificate chain verification", "conflicts": "verify-hostname", "arg-type": "string" }, { "detail": "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.", "long-option": "verify-purpose", "arg-type": "string", "desc": "Specify a purpose OID to be used for certificate chain verification" }, { "long-option": "verify-allow-broken", "detail": "This can be combined with --p7-verify, --verify or --verify-chain.", "desc": "Allow broken algorithms, such as MD5 for verification" }, { "detail": "This option can be used to specify a certificate verification profile. Certificate\n verification profiles correspond to the security level. This should be one of\n 'none', 'very weak', 'low', 'legacy', 'medium', 'high', 'ultra',\n 'future'. Note that by default no profile is applied, unless one is set\n as minimum in the gnutls configuration file.", "long-option": "verify-profile", "arg-type": "string", "desc": "Specify a security level profile to be used for verification" } ] }, { "meta": { "desc": "PKCS#7 structure options", "id": "pkcs7-options" }, "options": [ { "desc": "Generate a PKCS #7 structure", "detail": "This option generates a PKCS #7 certificate container structure. To add certificates in the structure use --load-certificate and --load-crl.", "long-option": "p7-generate" }, { "long-option": "p7-sign", "detail": "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.", "desc": "Signs using a PKCS #7 structure" }, { "desc": "Signs using a detached PKCS #7 structure", "detail": "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.", "long-option": "p7-detached-sign" }, { "disable-prefix": "no-", "long-option": "p7-include-cert", "desc": "The signer's certificate will be included in the cert list.", "detail": "This options works with --p7-sign or --p7-detached-sign and will include or exclude the signer's certificate into the generated signature.", "enabled": "" }, { "detail": "This option will include a timestamp in the generated signature", "disable-prefix": "no-", "disabled": "", "desc": "Will include a timestamp in the PKCS #7 structure", "long-option": "p7-time" }, { "disable-prefix": "no-", "disabled": "", "desc": "Will show the embedded data in the PKCS #7 structure", "long-option": "p7-show-data", "detail": "This option can be combined with --p7-verify or --p7-info and will display the embedded signed data in the PKCS #7 structure." }, { "long-option": "p7-info", "desc": "Print information on a PKCS #7 structure", "detail": "" }, { "detail": "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.", "long-option": "p7-verify", "desc": "Verify the provided PKCS #7 structure" }, { "long-option": "smime-to-p7", "desc": "Convert S/MIME to PKCS #7 structure", "detail": "" } ] }, { "meta": { "desc": "Other options", "id": "other-options" }, "options": [ { "detail": "The will generate random parameters to be used with\nDiffie-Hellman key exchange. The output parameters will be in PKCS #3\nformat. Note that it is recommended to use the --get-dh-params option\ninstead.", "desc": "Generate PKCS #3 encoded Diffie-Hellman parameters", "deprecated": "", "long-option": "generate-dh-params" }, { "long-option": "get-dh-params", "desc": "List the included PKCS #3 encoded Diffie-Hellman parameters", "detail": "Returns stored DH parameters in GnuTLS. Those parameters returned\nare defined in RFC7919, and can be considered standard parameters for a TLS\nkey exchange. This option is provided for old applications which require\nDH parameters to be specified; modern GnuTLS applications should not require\nthem." }, { "desc": "Print information PKCS #3 encoded Diffie-Hellman parameters", "detail": "", "long-option": "dh-info" }, { "detail": "This can be either a file or a PKCS #11 URL", "long-option": "load-privkey", "arg-type": "string", "desc": "Loads a private key file" }, { "arg-type": "string", "desc": "Loads a public key file", "detail": "This can be either a file or a PKCS #11 URL", "long-option": "load-pubkey" }, { "long-option": "load-request", "desc": "Loads a certificate request file", "detail": "This option can be used with a file", "arg-type": "string" }, { "arg-type": "string", "long-option": "load-certificate", "detail": "This option can be used with a file", "desc": "Loads a certificate file" }, { "desc": "Loads the certificate authority's private key file", "arg-type": "string", "detail": "This can be either a file or a PKCS #11 URL", "long-option": "load-ca-privkey" }, { "desc": "Loads the certificate authority's certificate file", "detail": "This can be either a file or a PKCS #11 URL", "arg-type": "string", "long-option": "load-ca-certificate" }, { "desc": "Loads the provided CRL", "arg-type": "string", "long-option": "load-crl", "detail": "This option can be used with a file" }, { "detail": "This option can be used with a file", "desc": "Loads auxiliary data", "arg-type": "string", "long-option": "load-data" }, { "detail": "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.", "arg-type": "string", "desc": "Password to use", "long-option": "password" }, { "desc": "Enforce a NULL password", "long-option": "null-password", "detail": "This option enforces a NULL password. This is different than the empty or no password in schemas like PKCS #8." }, { "detail": "This option enforces an empty password. This is different than the NULL or no password in schemas like PKCS #8.", "long-option": "empty-password", "desc": "Enforce an empty password" }, { "long-option": "hex-numbers", "detail": "", "desc": "Print big number in an easier format to parse" }, { "long-option": "cprint", "desc": "In certain operations it prints the information in C-friendly format", "detail": "In certain operations it prints the information in C-friendly format, suitable for including into C programs." }, { "desc": "Generate RSA key", "detail": "When combined with --generate-privkey generates an RSA private key.", "long-option": "rsa", "description": "This option is equivalent to '--key-type rsa'.", "deprecated": "" }, { "description": "This option is equivalent to '--key-type dsa'.", "deprecated": "", "long-option": "dsa", "detail": "When combined with --generate-privkey generates a DSA private key.", "desc": "Generate DSA key" }, { "desc": "Generate ECC (ECDSA) key", "description": "This option is equivalent to '--key-type ecdsa'.", "long-option": "ecc", "detail": "When combined with --generate-privkey generates an elliptic curve private key to be used with ECDSA.", "deprecated": "" }, { "aliases": "ecc", "deprecated": "", "long-option": "ecdsa" }, { "long-option": "hash", "detail": "Available hash functions are SHA1, RMD160, SHA256, SHA384, SHA512, SHA3-224, SHA3-256, SHA3-384, SHA3-512.", "desc": "Hash algorithm to use for signing", "arg-type": "string" }, { "desc": "Specify the RSA-PSS key default salt size", "arg-type": "number", "long-option": "salt-size", "detail": "Typical keys shouldn't set or restrict this option." }, { "desc": "Use DER format for input certificates, private keys, and DH parameters ", "detail": "The input files will be assumed to be in DER or RAW format. \nUnlike options that in PEM input would allow multiple input data (e.g. multiple \ncertificates), when reading in DER format a single data structure is read.", "disabled": "", "disable-prefix": "no-", "long-option": "inder" }, { "aliases": "inder", "long-option": "inraw" }, { "long-option": "outder", "disabled": "", "desc": "Use DER format for output certificates, private keys, and DH parameters", "disable-prefix": "no-", "detail": "The output will be in DER or RAW format." }, { "aliases": "outder", "long-option": "outraw" }, { "desc": "No effect", "long-option": "disable-quick-random", "deprecated": "", "detail": "" }, { "arg-type": "string", "long-option": "template", "desc": "Template file to use for non-interactive operation", "detail": "" }, { "long-option": "stdout-info", "detail": "", "desc": "Print information to stdout instead of stderr" }, { "long-option": "ask-pass", "disabled": "", "desc": "Enable interaction for entering password when in batch mode.", "detail": "This option will enable interaction to enter password when in batch mode. That is useful when the template option has been specified." }, { "arg-name": "Cipher", "detail": "Cipher may be one of 3des, 3des-pkcs12, aes-128, aes-192, aes-256, rc2-40, arcfour.", "long-option": "pkcs-cipher", "desc": "Cipher to use for PKCS #8 and #12 operations", "arg-type": "string" }, { "arg-type": "string", "long-option": "provider", "detail": "This will override the default options in /etc/gnutls/pkcs11.conf", "desc": "Specify the PKCS #11 provider library" }, { "enabled": "", "long-option": "text", "disable-prefix": "no-", "desc": "Output textual information before PEM-encoded certificates, private keys, etc", "detail": "Output textual information before PEM-encoded data" } ] } ]