1X509_CRL_GET0_BY_SERIAL(3)          OpenSSL         X509_CRL_GET0_BY_SERIAL(3)
2
3
4

NAME

6       X509_CRL_get0_by_serial, X509_CRL_get0_by_cert, X509_CRL_get_REVOKED,
7       X509_REVOKED_get0_serialNumber, X509_REVOKED_get0_revocationDate,
8       X509_REVOKED_set_serialNumber, X509_REVOKED_set_revocationDate,
9       X509_CRL_add0_revoked, X509_CRL_sort - CRL revoked entry utility
10       functions
11

SYNOPSIS

13        #include <openssl/x509.h>
14
15        int X509_CRL_get0_by_serial(X509_CRL *crl,
16                                    X509_REVOKED **ret, ASN1_INTEGER *serial);
17        int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
18
19        STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(X509_CRL *crl);
20
21        const ASN1_INTEGER *X509_REVOKED_get0_serialNumber(const X509_REVOKED *r);
22        const ASN1_TIME *X509_REVOKED_get0_revocationDate(const X509_REVOKED *r);
23
24        int X509_REVOKED_set_serialNumber(X509_REVOKED *r, ASN1_INTEGER *serial);
25        int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
26
27        int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
28
29        int X509_CRL_sort(X509_CRL *crl);
30

DESCRIPTION

32       X509_CRL_get0_by_serial() attempts to find a revoked entry in crl for
33       serial number serial. If it is successful it sets *ret to the internal
34       pointer of the matching entry, as a result *ret must not be freed up
35       after the call.
36
37       X509_CRL_get0_by_cert() is similar to X509_get0_by_serial() except it
38       looks for a revoked entry using the serial number of certificate x.
39
40       X509_CRL_get_REVOKED() returns an internal pointer to a stack of all
41       revoked entries for crl.
42
43       X509_REVOKED_get0_serialNumber() returns an internal pointer to the
44       serial number of r.
45
46       X509_REVOKED_get0_revocationDate() returns an internal pointer to the
47       revocation date of r.
48
49       X509_REVOKED_set_serialNumber() sets the serial number of r to serial.
50       The supplied serial pointer is not used internally so it should be
51       freed up after use.
52
53       X509_REVOKED_set_revocationDate() sets the revocation date of r to tm.
54       The supplied tm pointer is not used internally so it should be freed up
55       after use.
56
57       X509_CRL_add0_revoked() appends revoked entry rev to CRL crl. The
58       pointer rev is used internally so it must not be freed up after the
59       call: it is freed when the parent CRL is freed.
60
61       X509_CRL_sort() sorts the revoked entries of crl into ascending serial
62       number order.
63

NOTES

65       Applications can determine the number of revoked entries returned by
66       X509_CRL_get_revoked() using sk_X509_REVOKED_num() and examine each one
67       in turn using sk_X509_REVOKED_value().
68

RETURN VALUES

70       X509_CRL_get0_by_serial() and X509_CRL_get0_by_cert() return 0 for
71       failure, 1 on success except if the revoked entry has the reason
72       "removeFromCRL" (8), in which case 2 is returned.
73
74       X509_REVOKED_set_serialNumber(), X509_REVOKED_set_revocationDate(),
75       X509_CRL_add0_revoked() and X509_CRL_sort() return 1 for success and 0
76       for failure.
77
78       X509_REVOKED_get0_serialNumber() returns an ASN1_INTEGER pointer.
79
80       X509_REVOKED_get0_revocationDate() returns an ASN1_TIME value.
81
82       X509_CRL_get_REVOKED() returns a STACK of revoked entries.
83

SEE ALSO

85       d2i_X509(3), ERR_get_error(3), X509_get0_signature(3),
86       X509_get_ext_d2i(3), X509_get_extension_flags(3), X509_get_pubkey(3),
87       X509_get_subject_name(3), X509_get_version(3),
88       X509_NAME_add_entry_by_txt(3), X509_NAME_ENTRY_get_object(3),
89       X509_NAME_get_index_by_NID(3), X509_NAME_print_ex(3), X509_new(3),
90       X509_sign(3), X509V3_get_d2i(3), X509_verify_cert(3)
91
93       Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
94
95       Licensed under the OpenSSL license (the "License").  You may not use
96       this file except in compliance with the License.  You can obtain a copy
97       in the file LICENSE in the source distribution or at
98       <https://www.openssl.org/source/license.html>.
99
100
101
1021.1.1g                            2020-04-23        X509_CRL_GET0_BY_SERIAL(3)
Impressum