• Last 5 Forum Topics
    Last post

The Web Only This Site



  • MARC

    Mailing list ARChives
    - Search by -


    Computing Dictionary

  • Text Link Ads

  • LINUX man pages
  • Linux Man Page Viewer

    The following form allows you to view linux man pages.





           certtool [-flag [value]]... [--opt-name[[=| ]value]]...
           All arguments must be options.


           Tool  to  parse  and  generate X.509 certificates, requests and private
           keys.  It can be used interactively or non interactively by  specifying
           the template command line option.


           -d number, --debug=number
                  Enable  debugging.   This  option takes an integer number as its
                  argument.  The value of number is constrained to being:
                      in the range  0 through 9999
                  Specifies the debug level.
           -V, --verbose
                  More verbose output.  This option may appear an unlimited number
                  of times.
                  Input file.
                  Output file.
           -s, --generate-self-signed
                  Generate a self-signed certificate.
           -c, --generate-certificate
                  Generate a signed certificate.
                  Generates a proxy certificate.
                  Generate a CRL.
           -u, --update-certificate
                  Update a signed certificate.
                  The last certificate in the chain must be a self signed one.
                  Verify a PEM encoded certificate chain using a trusted list.
                  The trusted certificate list can be loaded with --load-ca-cer-
                  tificate. If no certificate list is provided, then the system's
                  certificate list is used.
                  Verify a CRL using a trusted list.  This option must appear in
                  combination with the following options: load-ca-certificate.
                  The trusted certificate list must be loaded with --load-ca-cer-
                  Generate PKCS #3 encoded Diffie-Hellman parameters.
                  Get the included PKCS #3 encoded Diffie-Hellman parameters.
                  Returns stored DH parameters in GnuTLS. Those parameters are
                  used in the SRP protocol. The parameters returned by fresh gen-
                  eration are more efficient since GnuTLS 3.0.9.
                  Print information PKCS #3 encoded Diffie-Hellman parameters.
                  Loads a private key file.
                  This can be either a file or a PKCS #11 URL
                  Loads a public key file.
                  This can be either a file or a PKCS #11 URL
                  Loads a certificate request file.
                  Loads a certificate file.
                  This can be either a file or a PKCS #11 URL
                  Loads the certificate authority's private key file.
                  In certain operations it prints the information in C-friendly
                  In certain operations it prints the information in C-friendly
                  format, suitable for including into C programs.
                  Enforce a NULL password.
                  This option enforces a NULL password. This may be different than
                  the empty password in some schemas.
           -i, --certificate-info
                  Print information on the given certificate.
                  Print certificate's public key.
                  Print information on the given OpenPGP certificate.
                  Print information on the given OpenPGP keyring structure.
           -l, --crl-info
                  Print information on the given CRL structure.
                  Print information on the given certificate request.
                  Do not use extensions in certificate requests.
                  Print information on a PKCS #12 structure.
                  Print information on a PKCS #7 structure.
                  The option combined with --load-request, --load-pubkey, --load-
                  privkey and --load-certificate will extract the public key of
                  the object in question.
           --v1   Generate an X.509 version 1 certificate (with no extensions).
                  Generate a PKCS #12 structure.  This option must appear in com-
                  bination with the following options: load-certificate.
                  It requires a certificate, a private key and possibly a CA cer-
                  tificate to be specified.
                  Generate a PKCS #8 structure.
           -8, --pkcs8
                  Use PKCS #8 format for private keys.
           --rsa  Generate RSA key.
                  When combined with --generate-privkey generates an RSA private
           --dsa  Generate DSA key.
                  When combined with --generate-privkey generates a DSA private
           --ecc  Generate ECC (ECDSA) key.
                  When combined with --generate-privkey generates an elliptic
                  curve private key to be used with ECDSA.
                  This is an alias for the --ecc option.
                  Hash algorithm to use for signing.
                  Available hash functions are SHA1, RMD160, SHA256, SHA384,
           --inder, --no-inder
                  Use DER format for input certificates, private keys, and DH
                  parameters .  The no-inder form will disable the option.
                  The input files will be assumed to be in DER or RAW format.
                  Unlike options that in PEM input would allow multiple input data
                  Specify the number of bits for key generate.  This option takes
                  an integer number as its argument.
           --sec-param=security parameter
                  Specify the security level [low, legacy, normal, high, ultra].
                  This is alternative to the bits option.
                  No effect.
                  Template file to use for non-interactive operation.
                  Enable interaction for entering password when in batch mode..
                  This option will enable interaction to enter password when in
                  batch mode. That is useful when the template option has been
                  Cipher to use for PKCS #8 and #12 operations.
                  Cipher may be one of 3des, 3des-pkcs12, aes-128, aes-192,
                  aes-256, rc2-40, arcfour.
           -h, --help
                  Display usage information and exit.
           -!, --more-help
                  Pass the extended usage information through a pager.
           -v [{v|c|n}], --version[={v|c|n}]
                  Output version of program and exit.  The default mode is 'v', a
                  simple version.  The 'c' mode will print copyright information
                  and 'n' will print the full copyright notice.


           Certtool's template file format
           A template file can be used to avoid the interactive questions of cert-
           tool. Initially create a file named 'cert.cfg' that contains the infor-
           mation about the certificate. The template can be used as below:
               $ certtool --generate-certificate --load-privkey key.pem     --template cert.cfg --outfile cert.pem    --load-ca-certificate ca-cert.pem --load-ca-privkey ca-key.pem
           An example certtool template file that can be used to generate a cer-
               # The state of the certificate owner.
               state = "Attiki"
               # The country of the subject. Two letter code.
               country = GR
               # The common name of the certificate owner.
               cn = "Cindy Lauper"
               # A user id of the certificate owner.
               #uid = "clauper"
               # Set domain components
               #dc = "name"
               #dc = "domain"
               # If the supported DN OIDs are not adequate you can set
               # any OID here.
               # For example set the X.520 Title and the X.520 Pseudonym
               # by using OID and string pairs.
               #dn_oid = Dr.
               #dn_oid = jackal
               # This is deprecated and should not be used in new
               # certificates.
               # pkcs9_email = ""
               # An alternative way to set the certificate's distinguished name directly
               # is with the "dn" option. The attribute names allowed are:
               # C (country), street, O (organization), OU (unit), title, CN (common name),
               # L (locality), ST (state), placeOfBirth, gender, countryOfCitizenship,
               # countryOfResidence, serialNumber, telephoneNumber, surName, initials,
               # generationQualifier, givenName, pseudonym, dnQualifier, postalCode, name,
               # businessCategory, DC, UID, jurisdictionOfIncorporationLocalityName,
               # jurisdictionOfIncorporationStateOrProvinceName,
               # jurisdictionOfIncorporationCountryName, XmppAddr, and numeric OIDs.
               #dn = "cn=Nik,st=Attiki,C=GR,surName=Mavrogiannopoulos,"
               # The serial number of the certificate
               # Comment the field for a time-based serial number.
               serial = 007
               # In how many days, counting from today, this certificate will expire.
               # Use -1 if there is no expiration date.
               expiration_days = 700
               # Alternatively you may set concrete dates and time. The GNU date string
               # formats are accepted. See:
               # An email in case of a person
               email = ""
               # Challenge password used in certificate requests
               challenge_password = 123456
               # Password when encrypting a private key
               #password = secret
               # An URL that has CRLs (certificate revocation lists)
               # available. Needed in CA certificates.
               #crl_dist_points = "http://www.getcrl.crl/getcrl/"
               # Whether this is a CA certificate or not
               # for microsoft smart card logon
               # key_purpose_oid =
               ### Other predefined key purpose OIDs
               # Whether this certificate will be used for a TLS client
               # Whether this certificate will be used for a TLS server
               # Whether this certificate will be used to sign data (needed
               # in TLS DHE ciphersuites).
               # Whether this certificate will be used to encrypt data (needed
               # in TLS RSA ciphersuites). Note that it is preferred to use different
               # keys for encryption and signing.
               # Whether this key will be used to sign other certificates.
               # Whether this key will be used to sign CRLs.
               # Whether this key will be used to sign code.
               # Whether this key will be used to sign OCSP data.
               # Whether this key will be used for time stamping.
               #path_len = 2
               # OCSP URI
               # ocsp_uri = http://my.ocsp.server/ocsp
               # CA issuers URI
               # ca_issuers_uri =
               # Certificate policies
               # policy1 =
               # policy1_txt = "This is a long policy to summarize"
               # policy1_url =
               # policy2 =
               # policy2_txt = "This is a short policy"
               # policy2_url =
               # Options for proxy certificates
               # proxy_policy_language =
               # Options for generating a CRL
               # next CRL update will be in 43 days (wow)
               #crl_next_update = 43
               # this is the 5th CRL by this CA
               #crl_number = 5


           Generating private keys
           To create an RSA private key, run:
               $ certtool --generate-privkey --outfile key.pem --rsa
           To create a DSA or elliptic curves (ECDSA) private key use the above
           command combined with 'dsa' or 'ecc' options.
           Generating certificate requests
           To create a certificate request (needed when the certificate is  issued
           by another party), run:
               certtool --generate-request --load-privkey key.pem    --outfile request.pem
           If the private key is stored in a smart card you can generate a request
           by specifying the private key object URL.
               $ ./certtool --generate-request --load-privkey "pkcs11:..."   --load-pubkey "pkcs11:..." --outfile request.pem
           Generating a self-signed certificate
           To create a self signed certificate, use the command:
           To view the certificate information, use:
               $ certtool --certificate-info --infile cert.pem
           PKCS #12 structure generation
           To generate a PKCS #12 structure using the previous key and certifi-
           cate, use the command:
               $ certtool --load-certificate cert.pem --load-privkey key.pem    --to-p12 --outder --outfile key.p12
           Some tools (reportedly web browsers) have problems with that file
           because it does not contain the CA certificate for the certificate.  To
           work around that problem in the tool, you can use the --load-ca-cer-
           tificate parameter as follows:
               $ certtool --load-ca-certificate ca.pem   --load-certificate cert.pem --load-privkey key.pem   --to-p12 --outder --outfile key.p12
           Diffie-Hellman parameter generation
           To generate parameters for Diffie-Hellman key exchange, use the com-
               $ certtool --generate-dh-params --outfile dh.pem --sec-param normal
           Proxy certificate generation
           Proxy certificate can be used to delegate your credential to a tempo-
           rary, typically short-lived, certificate.  To create one from the pre-
           viously created certificate, first create a temporary key and then gen-
           erate a proxy certificate for it, using the commands:
               $ certtool --generate-privkey > proxy-key.pem
               $ certtool --generate-proxy --load-ca-privkey key.pem   --load-privkey proxy-key.pem --load-certificate cert.pem   --outfile proxy-cert.pem
           Certificate revocation list generation
           To create an empty Certificate Revocation List (CRL) do:
               $ certtool --generate-crl --load-ca-privkey x509-ca-key.pem            --load-ca-certificate x509-ca.pem
           To create a CRL that contains some revoked certificates, place the cer-
           tificates in a file and use --load-certificate as follows:
               $ certtool --generate-crl --load-ca-privkey x509-ca-key.pem   --load-ca-certificate x509-ca.pem --load-certificate revoked-certs.pem
           To verify a Certificate Revocation List (CRL) do:
               $ certtool --verify-crl --load-ca-certificate x509-ca.pem < crl.pem


           One of the following exit values will be returned:
           0 (EXIT_SUCCESS)
                  Successful program execution.
           1 (EXIT_FAILURE)
                  The operation failed or the command syntax was not valid.
           Public License, version 3 or later.


           Please send bug reports to:


           This manual page was AutoGen-erated from the certtool option defini-

    3.2.12 02 Mar 2014 certtool(1)


  • Linux

    The Distributions


    The Software


    The News


  • Toll Free
Copyright © 1999 - 2016 by LinuxGuruz