gnutls_x509_crt_set_version3
Api function
Arguments
- gnutls_x509_crt_t crt
-
a certificate of type
gnutls_x509_crt_t
- unsigned int version
-
holds the version number. For X.509v1 certificates must be 1.
Overview
This function will set the version of the certificate. This must be one for X.509 version 1, and so on. Plain certificates without extensions must have version set to one.
To create well-formed certificates, you must specify version 3 if you use any certificate extensions. Extensions are created by functions such as gnutls_x509_crt_set_subject_alt_name() or gnutls_x509_crt_set_key_usage().
Returns
On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value.
History
- Arch Linux 2026-11-01: the text shown here
- Debian 13 (Trixie)
- Debian 12 (Bookworm)
- Debian 11 (Bullseye)
- Debian 10 (Buster)
- Debian 9 (Stretch)
- Debian 8 (Jessie)
- Debian 6.0 (Squeeze)
- Debian 5.0 (Lenny)
- Debian 4.0 (Etch)