5 X509_get_serialNumber, X509_set_serialNumber - get or set certificate serial
10 #include <openssl/x509.h>
12 ASN1_INTEGER *X509_get_serialNumber(X509 *x);
13 int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
17 X509_get_serialNumber() returns the serial number of certificate B<x> as an
18 B<ASN1_INTEGER> structure which can be examined or initialised. The value
19 returned is an internal pointer which B<MUST NOT> be freed up after the call.
21 X509_set_serialNumber() sets the serial number of certificate B<x> to
22 B<serial>. A copy of the serial number is used internally so B<serial> should
23 be freed up after use.
27 X509_get_serialNumber() returns an B<ASN1_INTEGER> structure.
29 X509_set_serialNumber() returns 1 for success and 0 for failure.
35 L<X509_CRL_get0_by_serial(3)>,
36 L<X509_get0_signature(3)>,
37 L<X509_get_ext_d2i(3)>,
38 L<X509_get_extension_flags(3)>,
39 L<X509_get_pubkey(3)>,
40 L<X509_get_subject_name(3)>,
41 L<X509_NAME_add_entry_by_txt(3)>,
42 L<X509_NAME_ENTRY_get_object(3)>,
43 L<X509_NAME_get_index_by_NID(3)>,
44 L<X509_NAME_print_ex(3)>,
48 L<X509_verify_cert(3)>
52 X509_get_serialNumber() and X509_set_serialNumber() are available in
53 all versions of OpenSSL.
57 Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
59 Licensed under the OpenSSL license (the "License"). You may not use
60 this file except in compliance with the License. You can obtain a copy
61 in the file LICENSE in the source distribution or at
62 L<https://www.openssl.org/source/license.html>.