GnuTLS: Difference between revisions

From ArchWiki
(Update Interlanguage link)
(→‎Usage: Add an example of viewing a certificate file)
 
(4 intermediate revisions by 3 users not shown)
Line 4: Line 4:
[[zh-hans:GnuTLS]]
[[zh-hans:GnuTLS]]
According to [[Wikipedia:GnuTLS|Wikipedia]]:
According to [[Wikipedia:GnuTLS|Wikipedia]]:
:'''GnuTLS''' (the '''GNU Transport Layer Security Library''') is a free software implementation of the TLS, SSL and DTLS protocols. It offers an application programming interface (API) for applications to enable secure communication over the network transport layer, as well as interfaces to access X.509, PKCS #12, OpenPGP and other structures.
:'''GnuTLS''' (the '''GNU Transport Layer Security Library''') is a free software implementation of the TLS, SSL and DTLS protocols. It offers an application programming interface (API) for applications to enable secure communication over the network transport layer, as well as interfaces to access X.509, PKCS #12 and other structures.


== Installation ==
== Installation ==
Line 10: Line 10:
[[Install]] the {{Pkg|gnutls}} package.
[[Install]] the {{Pkg|gnutls}} package.


For integration with the [[Apache HTTP Server]] install [[mod_gnutls]].  
For integration with the [[Apache HTTP Server]] install [[mod_gnutls]].


== Usage ==
== Usage ==
Line 16: Line 16:
See {{man|1|certtool}} for the command used in the following sections and the [https://www.gnutls.org/manual/html_node/index.html info document] for the API documentation.
See {{man|1|certtool}} for the command used in the following sections and the [https://www.gnutls.org/manual/html_node/index.html info document] for the API documentation.


=== Generate an RSA private key ===
=== Generate a private key ===


  $ certtool -p --rsa --bits=''keysize''
  $ certtool --generate-privkey --outfile ''private_key''


=== Generate a certificate signing request ===
=== Generate a certificate signing request ===


  $ certtool -q --load-privkey ''private_key'' --outfile ''file''
  $ certtool --generate-request --load-privkey ''private_key'' --outfile ''file''


=== Generate a self-signed certificate ===
=== Generate a self-signed certificate ===


  $ certtool -s --load-privkey ''private_key'' --outfile ''file''
  $ certtool --generate-self-signed --load-privkey ''private_key'' --outfile ''file''
 
=== Inspect a certificate ===
 
$ certtool --certificate-info --infile ''file''


== See also ==
== See also ==


* [https://www.gnutls.org/ Official website]
* [https://www.gnutls.org/ Official website]

Latest revision as of 12:09, 23 February 2024

According to Wikipedia:

GnuTLS (the GNU Transport Layer Security Library) is a free software implementation of the TLS, SSL and DTLS protocols. It offers an application programming interface (API) for applications to enable secure communication over the network transport layer, as well as interfaces to access X.509, PKCS #12 and other structures.

Installation

Install the gnutls package.

For integration with the Apache HTTP Server install mod_gnutls.

Usage

See certtool(1) for the command used in the following sections and the info document for the API documentation.

Generate a private key

$ certtool --generate-privkey --outfile private_key

Generate a certificate signing request

$ certtool --generate-request --load-privkey private_key --outfile file

Generate a self-signed certificate

$ certtool --generate-self-signed --load-privkey private_key --outfile file

Inspect a certificate

$ certtool --certificate-info --infile file

See also