mbed TLS v2.23.0: x509_crl.h Source File

mbed TLS v2.23.0

x509_crl.h
Go to the documentation of this file.
1
6 /*
7 * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
8 * SPDX-License-Identifier: Apache-2.0
9 *
10 * Licensed under the Apache License, Version 2.0 (the "License"); you may
11 * not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
18 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 *
22 * This file is part of mbed TLS (https://tls.mbed.org)
23 */
24 #ifndef MBEDTLS_X509_CRL_H
25 #define MBEDTLS_X509_CRL_H
26
27 #if !defined(MBEDTLS_CONFIG_FILE)
28 #include "mbedtls/config.h"
29 #else
30 #include MBEDTLS_CONFIG_FILE
31 #endif
32
33 #include "mbedtls/x509.h"
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
52 typedef struct mbedtls_x509_crl_entry
53 {
54 mbedtls_x509_buf raw;
55
56 mbedtls_x509_buf serial;
57
58 mbedtls_x509_time revocation_date;
59
60 mbedtls_x509_buf entry_ext;
61
62 struct mbedtls_x509_crl_entry *next;
63 }
64 mbedtls_x509_crl_entry;
65
70 typedef struct mbedtls_x509_crl
71 {
72 mbedtls_x509_buf raw;
73 mbedtls_x509_buf tbs;
75 int version;
76 mbedtls_x509_buf sig_oid;
78 mbedtls_x509_buf issuer_raw;
80 mbedtls_x509_name issuer;
82 mbedtls_x509_time this_update;
83 mbedtls_x509_time next_update;
84
85 mbedtls_x509_crl_entry entry;
87 mbedtls_x509_buf crl_ext;
88
89 mbedtls_x509_buf sig_oid2;
90 mbedtls_x509_buf sig;
91 mbedtls_md_type_t sig_md;
92 mbedtls_pk_type_t sig_pk;
93 void *sig_opts;
95 struct mbedtls_x509_crl *next;
96 }
97 mbedtls_x509_crl;
98
109 int mbedtls_x509_crl_parse_der( mbedtls_x509_crl *chain,
110 const unsigned char *buf, size_t buflen );
123 int mbedtls_x509_crl_parse( mbedtls_x509_crl *chain, const unsigned char *buf, size_t buflen );
124
125 #if defined(MBEDTLS_FS_IO)
126
136 int mbedtls_x509_crl_parse_file( mbedtls_x509_crl *chain, const char *path );
137 #endif /* MBEDTLS_FS_IO */
138
150 int mbedtls_x509_crl_info( char *buf, size_t size, const char *prefix,
151 const mbedtls_x509_crl *crl );
152
158 void mbedtls_x509_crl_init( mbedtls_x509_crl *crl );
159
165 void mbedtls_x509_crl_free( mbedtls_x509_crl *crl );
166
167 /* \} name */
168 /* \} addtogroup x509_module */
169
170 #ifdef __cplusplus
171 }
172 #endif
173
174 #endif /* mbedtls_x509_crl.h */
mbedtls_x509_crl
struct mbedtls_x509_crl mbedtls_x509_crl
mbedtls_x509_crl::sig_oid
mbedtls_x509_buf sig_oid
Definition: x509_crl.h:76
mbedtls_x509_crl::issuer_raw
mbedtls_x509_buf issuer_raw
Definition: x509_crl.h:78
mbedtls_x509_crl::issuer
mbedtls_x509_name issuer
Definition: x509_crl.h:80
mbedtls_x509_crl_entry::serial
mbedtls_x509_buf serial
Definition: x509_crl.h:56
mbedtls_md_type_t
mbedtls_md_type_t
Supported message digests.
Definition: md.h:58
mbedtls_x509_crl::sig_opts
void * sig_opts
Definition: x509_crl.h:93
mbedtls_x509_crl::sig_pk
mbedtls_pk_type_t sig_pk
Definition: x509_crl.h:92
mbedtls_x509_crl_entry
struct mbedtls_x509_crl_entry mbedtls_x509_crl_entry
mbedtls_x509_crl::entry
mbedtls_x509_crl_entry entry
Definition: x509_crl.h:85
mbedtls_asn1_named_data
Definition: asn1.h:184
mbedtls_x509_crl
Definition: x509_crl.h:71
mbedtls_x509_crl::next
struct mbedtls_x509_crl * next
Definition: x509_crl.h:95
mbedtls_x509_time
Definition: x509.h:233
mbedtls_x509_crl_entry::revocation_date
mbedtls_x509_time revocation_date
Definition: x509_crl.h:58
mbedtls_x509_crl_free
void mbedtls_x509_crl_free(mbedtls_x509_crl *crl)
Unallocate all CRL data.
mbedtls_x509_crl::next_update
mbedtls_x509_time next_update
Definition: x509_crl.h:83
mbedtls_x509_crl_info
int mbedtls_x509_crl_info(char *buf, size_t size, const char *prefix, const mbedtls_x509_crl *crl)
Returns an informational string about the CRL.
mbedtls_x509_crl::raw
mbedtls_x509_buf raw
Definition: x509_crl.h:72
mbedtls_x509_crl_init
void mbedtls_x509_crl_init(mbedtls_x509_crl *crl)
Initialize a CRL (chain)
mbedtls_x509_crl::sig
mbedtls_x509_buf sig
Definition: x509_crl.h:90
mbedtls_x509_crl_entry
Definition: x509_crl.h:53
mbedtls_pk_type_t
mbedtls_pk_type_t
Public key types.
Definition: pk.h:82
mbedtls_x509_crl_entry::entry_ext
mbedtls_x509_buf entry_ext
Definition: x509_crl.h:60
mbedtls_x509_crl::tbs
mbedtls_x509_buf tbs
Definition: x509_crl.h:73
mbedtls_x509_crl_parse
int mbedtls_x509_crl_parse(mbedtls_x509_crl *chain, const unsigned char *buf, size_t buflen)
Parse one or more CRLs and append them to the chained list.
mbedtls_x509_crl_entry::next
struct mbedtls_x509_crl_entry * next
Definition: x509_crl.h:62
mbedtls_x509_crl::version
int version
Definition: x509_crl.h:75
mbedtls_x509_crl_parse_der
int mbedtls_x509_crl_parse_der(mbedtls_x509_crl *chain, const unsigned char *buf, size_t buflen)
Parse a DER-encoded CRL and append it to the chained list.
mbedtls_x509_crl_parse_file
int mbedtls_x509_crl_parse_file(mbedtls_x509_crl *chain, const char *path)
Load one or more CRLs and append them to the chained list.
mbedtls_x509_crl::sig_oid2
mbedtls_x509_buf sig_oid2
Definition: x509_crl.h:89
config.h
Configuration options (set of defines)
mbedtls_asn1_buf
Definition: asn1.h:152
mbedtls_x509_crl::crl_ext
mbedtls_x509_buf crl_ext
Definition: x509_crl.h:87
mbedtls_x509_crl::this_update
mbedtls_x509_time this_update
Definition: x509_crl.h:82
mbedtls_x509_crl_entry::raw
mbedtls_x509_buf raw
Definition: x509_crl.h:54
mbedtls_x509_crl::sig_md
mbedtls_md_type_t sig_md
Definition: x509_crl.h:91
x509.h
X.509 generic defines and structures.