1gnutls_x509_crt_set_version(3)      gnutls      gnutls_x509_crt_set_version(3)
2
3
4

NAME

6       gnutls_x509_crt_set_version - API function
7

SYNOPSIS

9       #include <gnutls/x509.h>
10
11       int  gnutls_x509_crt_set_version(gnutls_x509_crt_t  crt,  unsigned  int
12       version);
13

ARGUMENTS

15       gnutls_x509_crt_t crt
16                   a certificate of type gnutls_x509_crt_t
17
18       unsigned int version
19                   holds the version number. For X.509v1 certificates must  be
20                   1.
21

DESCRIPTION

23       This  function  will  set the version of the certificate.  This must be
24       one for X.509 version 1, and so on.  Plain certificates without  exten‐
25       sions must have version set to one.
26
27       To  create  well-formed certificates, you must specify version 3 if you
28       use any certificate extensions.  Extensions are  created  by  functions
29       such         as        gnutls_x509_crt_set_subject_alt_name()        or
30       gnutls_x509_crt_set_key_usage().
31

RETURNS

33       On success, GNUTLS_E_SUCCESS is returned, otherwise  a  negative  error
34       value.
35

REPORTING BUGS

37       Report    bugs    to    <bug-gnutls@gnu.org>.     GnuTLS   home   page:
38       http://www.gnu.org/software/gnutls/ General help  using  GNU  software:
39       http://www.gnu.org/gethelp/
40
42       Copyright © 2008 Free Software Foundation.
43       Copying  and  distribution  of this file, with or without modification,
44       are permitted in any medium  without  royalty  provided  the  copyright
45       notice and this notice are preserved.
46

SEE ALSO

48       The  full  documentation  for gnutls is maintained as a Texinfo manual.
49       If the info and gnutls programs are properly installed  at  your  site,
50       the command
51
52              info gnutls
53
54       should give you access to the complete manual.
55
56
57
58gnutls                             2.12.6.1     gnutls_x509_crt_set_version(3)
Impressum