Home | History | Annotate | Line # | Download | only in man3
      1      1.1  christos =pod
      2      1.1  christos 
      3      1.1  christos =head1 NAME
      4      1.1  christos 
      5      1.1  christos X509_get_serialNumber,
      6      1.1  christos X509_get0_serialNumber,
      7      1.1  christos X509_set_serialNumber
      8      1.1  christos - get or set certificate serial number
      9      1.1  christos 
     10      1.1  christos =head1 SYNOPSIS
     11      1.1  christos 
     12      1.1  christos  #include <openssl/x509.h>
     13      1.1  christos 
     14      1.1  christos  ASN1_INTEGER *X509_get_serialNumber(X509 *x);
     15      1.1  christos  const ASN1_INTEGER *X509_get0_serialNumber(const X509 *x);
     16      1.1  christos  int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
     17      1.1  christos 
     18      1.1  christos =head1 DESCRIPTION
     19      1.1  christos 
     20      1.1  christos X509_get_serialNumber() returns the serial number of certificate B<x> as an
     21      1.1  christos B<ASN1_INTEGER> structure which can be examined or initialised. The value
     22      1.1  christos returned is an internal pointer which B<MUST NOT> be freed up after the call.
     23      1.1  christos 
     24      1.1  christos X509_get0_serialNumber() is the same as X509_get_serialNumber() except it
     25      1.1  christos accepts a const parameter and returns a const result.
     26      1.1  christos 
     27      1.1  christos X509_set_serialNumber() sets the serial number of certificate B<x> to
     28      1.1  christos B<serial>. A copy of the serial number is used internally so B<serial> should
     29      1.1  christos be freed up after use.
     30      1.1  christos 
     31      1.1  christos =head1 RETURN VALUES
     32      1.1  christos 
     33      1.1  christos X509_get_serialNumber() and X509_get0_serialNumber() return an B<ASN1_INTEGER>
     34      1.1  christos structure.
     35      1.1  christos 
     36      1.1  christos X509_set_serialNumber() returns 1 for success and 0 for failure.
     37      1.1  christos 
     38      1.1  christos =head1 SEE ALSO
     39      1.1  christos 
     40      1.1  christos L<d2i_X509(3)>,
     41      1.1  christos L<ERR_get_error(3)>,
     42      1.1  christos L<X509_CRL_get0_by_serial(3)>,
     43      1.1  christos L<X509_get0_signature(3)>,
     44      1.1  christos L<X509_get_ext_d2i(3)>,
     45      1.1  christos L<X509_get_extension_flags(3)>,
     46      1.1  christos L<X509_get_pubkey(3)>,
     47      1.1  christos L<X509_get_subject_name(3)>,
     48      1.1  christos L<X509_NAME_add_entry_by_txt(3)>,
     49      1.1  christos L<X509_NAME_ENTRY_get_object(3)>,
     50      1.1  christos L<X509_NAME_get_index_by_NID(3)>,
     51      1.1  christos L<X509_NAME_print_ex(3)>,
     52      1.1  christos L<X509_new(3)>,
     53      1.1  christos L<X509_sign(3)>,
     54      1.1  christos L<X509V3_get_d2i(3)>,
     55      1.1  christos L<X509_verify_cert(3)>
     56      1.1  christos 
     57      1.1  christos =head1 HISTORY
     58      1.1  christos 
     59  1.1.1.2  christos The X509_get_serialNumber() and X509_set_serialNumber() functions are
     60  1.1.1.2  christos available in all versions of OpenSSL.
     61  1.1.1.2  christos The X509_get0_serialNumber() function was added in OpenSSL 1.1.0.
     62      1.1  christos 
     63      1.1  christos =head1 COPYRIGHT
     64      1.1  christos 
     65      1.1  christos Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
     66      1.1  christos 
     67  1.1.1.3  christos Licensed under the Apache License 2.0 (the "License").  You may not use
     68      1.1  christos this file except in compliance with the License.  You can obtain a copy
     69      1.1  christos in the file LICENSE in the source distribution or at
     70      1.1  christos L<https://www.openssl.org/source/license.html>.
     71      1.1  christos 
     72      1.1  christos =cut
     73