Coverage Report

Created: 2025-03-18 06:55

/src/gnutls/lib/x509/common.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright (C) 2003-2012 Free Software Foundation, Inc.
3
 * Copyright (C) 2017 Red Hat, Inc.
4
 *
5
 * Author: Nikos Mavrogiannopoulos
6
 *
7
 * This file is part of GnuTLS.
8
 *
9
 * The GnuTLS is free software; you can redistribute it and/or
10
 * modify it under the terms of the GNU Lesser General Public License
11
 * as published by the Free Software Foundation; either version 2.1 of
12
 * the License, or (at your option) any later version.
13
 *
14
 * This library is distributed in the hope that it will be useful, but
15
 * WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
 * Lesser General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU Lesser General Public License
20
 * along with this program.  If not, see <https://www.gnu.org/licenses/>
21
 *
22
 */
23
24
#ifndef GNUTLS_LIB_X509_COMMON_H
25
#define GNUTLS_LIB_X509_COMMON_H
26
27
#include "algorithms.h"
28
#include "abstract_int.h"
29
#include "x509/x509_int.h"
30
#include "fips.h"
31
32
#define MAX_STRING_LEN 512
33
34
#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
35
#define MAX_ITER_COUNT 10 * 1024
36
#else
37
/* Set a maximum iteration count over which we refuse to
38
 * decode a file. That is to prevent DoS. */
39
0
#define MAX_ITER_COUNT (10 * 1024 * 1024)
40
#endif
41
42
#define GNUTLS_XML_SHOW_ALL 1
43
44
0
#define PEM_CRL "X509 CRL"
45
0
#define PEM_X509_CERT "X509 CERTIFICATE"
46
0
#define PEM_X509_CERT2 "CERTIFICATE"
47
#define PEM_PKCS7 "PKCS7"
48
0
#define PEM_PKCS12 "PKCS12"
49
0
#define PEM_PK "PUBLIC KEY"
50
51
/* public key algorithm's OIDs
52
 */
53
0
#define PK_PKIX1_RSA_OID "1.2.840.113549.1.1.1"
54
0
#define PK_PKIX1_RSA_PSS_OID "1.2.840.113549.1.1.10"
55
0
#define PK_PKIX1_RSA_OAEP_OID "1.2.840.113549.1.1.7"
56
#define PK_X509_RSA_OID "2.5.8.1.1"
57
#define PK_DSA_OID "1.2.840.10040.4.1"
58
#define PK_GOST_R3410_94_OID "1.2.643.2.2.20"
59
#define PK_GOST_R3410_2001_OID "1.2.643.2.2.19"
60
#define PK_GOST_R3410_2012_256_OID "1.2.643.7.1.1.1.1"
61
#define PK_GOST_R3410_2012_512_OID "1.2.643.7.1.1.1.2"
62
63
/* signature OIDs
64
 */
65
#define SIG_DSA_SHA1_OID "1.2.840.10040.4.3"
66
/* those two from draft-ietf-pkix-sha2-dsa-ecdsa-06 */
67
#define SIG_DSA_SHA224_OID "2.16.840.1.101.3.4.3.1"
68
#define SIG_DSA_SHA256_OID "2.16.840.1.101.3.4.3.2"
69
#define SIG_DSA_SHA384_OID "2.16.840.1.101.3.4.3.3"
70
#define SIG_DSA_SHA512_OID "2.16.840.1.101.3.4.3.4"
71
72
#define SIG_RSA_MD5_OID "1.2.840.113549.1.1.4"
73
#define SIG_RSA_MD2_OID "1.2.840.113549.1.1.2"
74
#define SIG_RSA_SHA1_OID "1.2.840.113549.1.1.5"
75
#define SIG_RSA_SHA224_OID "1.2.840.113549.1.1.14"
76
#define SIG_RSA_SHA256_OID "1.2.840.113549.1.1.11"
77
#define SIG_RSA_SHA384_OID "1.2.840.113549.1.1.12"
78
#define SIG_RSA_SHA512_OID "1.2.840.113549.1.1.13"
79
#define SIG_RSA_RMD160_OID "1.3.36.3.3.1.2"
80
#define SIG_GOST_R3410_94_OID "1.2.643.2.2.4"
81
#define SIG_GOST_R3410_2001_OID "1.2.643.2.2.3"
82
#define SIG_GOST_R3410_2012_256_OID "1.2.643.7.1.1.3.2"
83
#define SIG_GOST_R3410_2012_512_OID "1.2.643.7.1.1.3.3"
84
#define ISO_SIG_RSA_SHA1_OID "1.3.14.3.2.29"
85
86
#define SIG_DSA_SHA3_224_OID "2.16.840.1.101.3.4.3.5"
87
#define SIG_DSA_SHA3_256_OID "2.16.840.1.101.3.4.3.6"
88
#define SIG_DSA_SHA3_384_OID "2.16.840.1.101.3.4.3.7"
89
#define SIG_DSA_SHA3_512_OID "2.16.840.1.101.3.4.3.8"
90
91
#define SIG_ECDSA_SHA3_224_OID "2.16.840.1.101.3.4.3.9"
92
#define SIG_ECDSA_SHA3_256_OID "2.16.840.1.101.3.4.3.10"
93
#define SIG_ECDSA_SHA3_384_OID "2.16.840.1.101.3.4.3.11"
94
#define SIG_ECDSA_SHA3_512_OID "2.16.840.1.101.3.4.3.12"
95
96
#define SIG_RSA_SHA3_224_OID "2.16.840.1.101.3.4.3.13"
97
#define SIG_RSA_SHA3_256_OID "2.16.840.1.101.3.4.3.14"
98
#define SIG_RSA_SHA3_384_OID "2.16.840.1.101.3.4.3.15"
99
#define SIG_RSA_SHA3_512_OID "2.16.840.1.101.3.4.3.16"
100
101
#define ECDH_X25519_OID "1.3.101.110"
102
#define ECDH_X448_OID "1.3.101.111"
103
104
#define SIG_EDDSA_SHA512_OID "1.3.101.112"
105
#define SIG_ED448_OID "1.3.101.113"
106
107
0
#define XMPP_OID "1.3.6.1.5.5.7.8.5"
108
0
#define KRB5_PRINCIPAL_OID "1.3.6.1.5.2.2"
109
0
#define MSUSER_PRINCIPAL_NAME_OID "1.3.6.1.4.1.311.20.2.3"
110
0
#define PKIX1_RSA_PSS_MGF1_OID "1.2.840.113549.1.1.8"
111
0
#define PKIX1_RSA_OAEP_P_SPECIFIED_OID "1.9"
112
113
0
#define GOST28147_89_OID "1.2.643.2.2.21"
114
0
#define GOST28147_89_TC26Z_OID "1.2.643.7.1.2.5.1.1"
115
0
#define GOST28147_89_CPA_OID "1.2.643.2.2.31.1"
116
0
#define GOST28147_89_CPB_OID "1.2.643.2.2.31.2"
117
0
#define GOST28147_89_CPC_OID "1.2.643.2.2.31.3"
118
0
#define GOST28147_89_CPD_OID "1.2.643.2.2.31.4"
119
120
#define MLDSA44_OID "2.16.840.1.101.3.4.3.17"
121
#define MLDSA65_OID "2.16.840.1.101.3.4.3.18"
122
#define MLDSA87_OID "2.16.840.1.101.3.4.3.19"
123
124
0
#define ASN1_NULL "\x05\x00"
125
0
#define ASN1_NULL_SIZE 2
126
127
struct oid_to_string {
128
  const char *oid;
129
  unsigned oid_size;
130
  const char *name_desc;
131
  unsigned name_desc_size;
132
  const char *asn_desc; /* description in the pkix file if complex type */
133
  unsigned int etype; /* the libtasn1 ASN1_ETYPE or INVALID
134
         * if cannot be simply parsed */
135
};
136
137
const struct oid_to_string *
138
_gnutls_oid_get_entry(const struct oid_to_string *ots, const char *oid);
139
140
const char *_gnutls_oid_get_asn_desc(const char *oid);
141
142
int _gnutls_x509_set_time(asn1_node c2, const char *where, time_t tim,
143
        int force_general);
144
int _gnutls_x509_set_raw_time(asn1_node c2, const char *where, time_t tim);
145
146
int _gnutls_x509_decode_string(unsigned int etype, const uint8_t *der,
147
             size_t der_size, gnutls_datum_t *output,
148
             unsigned allow_ber);
149
150
int _gnutls_x509_encode_string(unsigned int etype, const void *input_data,
151
             size_t input_size, gnutls_datum_t *output);
152
153
int _gnutls_x509_dn_to_string(const char *OID, void *value, int value_size,
154
            gnutls_datum_t *out);
155
const char *_gnutls_ldap_string_to_oid(const char *str, unsigned str_len);
156
157
time_t _gnutls_x509_get_time(asn1_node c2, const char *when, int general);
158
159
gnutls_x509_subject_alt_name_t _gnutls_x509_san_find_type(char *str_type);
160
161
int _gnutls_x509_der_encode_and_copy(asn1_node src, const char *src_name,
162
             asn1_node dest, const char *dest_name,
163
             int str);
164
int _gnutls_x509_der_encode(asn1_node src, const char *src_name,
165
          gnutls_datum_t *res, int str);
166
167
#define _gnutls_x509_export_int(asn1, format, header, out, out_size) \
168
0
  _gnutls_x509_export_int_named(asn1, "", format, header, out, out_size)
169
170
int _gnutls_x509_export_int_named(asn1_node asn1_data, const char *name,
171
          gnutls_x509_crt_fmt_t format,
172
          const char *pem_header,
173
          unsigned char *output_data,
174
          size_t *output_data_size);
175
176
#define _gnutls_x509_export_int2(asn1, format, header, out) \
177
0
  _gnutls_x509_export_int_named2(asn1, "", format, header, out)
178
int _gnutls_x509_export_int_named2(asn1_node asn1_data, const char *name,
179
           gnutls_x509_crt_fmt_t format,
180
           const char *pem_header, gnutls_datum_t *out);
181
182
int _gnutls_x509_read_value(asn1_node c, const char *root, gnutls_datum_t *ret);
183
int _gnutls_x509_read_null_value(asn1_node c, const char *root,
184
         gnutls_datum_t *ret);
185
int _gnutls_x509_read_string(asn1_node c, const char *root, gnutls_datum_t *ret,
186
           unsigned int etype, unsigned allow_ber);
187
int _gnutls_x509_write_value(asn1_node c, const char *root,
188
           const gnutls_datum_t *data);
189
190
int _gnutls_x509_write_string(asn1_node c, const char *root,
191
            const gnutls_datum_t *data, unsigned int etype);
192
193
int _gnutls_x509_encode_and_write_attribute(const char *given_oid,
194
              asn1_node asn1_struct,
195
              const char *where, const void *data,
196
              int sizeof_data, int multi);
197
int _gnutls_x509_decode_and_read_attribute(asn1_node asn1_struct,
198
             const char *where, char *oid,
199
             int oid_size, gnutls_datum_t *value,
200
             int multi, int octet);
201
202
int _gnutls_x509_get_pk_algorithm(asn1_node src, const char *src_name,
203
          gnutls_ecc_curve_t *curve,
204
          unsigned int *bits);
205
206
int _gnutls_x509_get_signature_algorithm(asn1_node src, const char *src_name);
207
208
int _gnutls_x509_encode_and_copy_PKI_params(asn1_node dst, const char *dst_name,
209
              const gnutls_pk_params_st *params);
210
int _gnutls_x509_encode_PKI_params(gnutls_datum_t *der,
211
           const gnutls_pk_params_st *params);
212
int _gnutls_asn1_copy_node(asn1_node *dst, const char *dst_name, asn1_node src,
213
         const char *src_name);
214
215
int _gnutls_x509_get_signed_data(asn1_node src, const gnutls_datum_t *der,
216
         const char *src_name,
217
         gnutls_datum_t *signed_data);
218
int _gnutls_x509_get_signature(asn1_node src, const char *src_name,
219
             gnutls_datum_t *signature);
220
221
int _gnutls_get_asn_mpis(asn1_node asn, const char *root,
222
       gnutls_pk_params_st *params);
223
224
int _gnutls_get_key_id(gnutls_pk_params_st *, unsigned char *output_data,
225
           size_t *output_data_size, unsigned flags);
226
227
void _asnstr_append_name(char *name, size_t name_size, const char *part1,
228
       const char *part2);
229
230
/* Given a @c2 which it returns an allocated DER encoding of @whom in @out */
231
inline static int _gnutls_x509_get_raw_field(asn1_node c2, const char *whom,
232
               gnutls_datum_t *out)
233
0
{
234
0
  return _gnutls_x509_der_encode(c2, whom, out, 0);
235
0
}
Unexecuted instantiation: cert-cred.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: profiles.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: cert-cred-x509.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: pcert.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: pubkey.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: common.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: crl.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: crq.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: dn.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: extensions.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: hostname-verify.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: key_decode.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: key_encode.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: mpi.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: ocsp.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: output.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: pkcs12.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: pkcs12_bag.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: pkcs7-crypt.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: privkey.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: privkey_openssl.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: privkey_pkcs8.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: privkey_pkcs8_pbes1.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: prov-seed.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: sign.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: spki.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: time.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: tls_features.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: verify-high.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: verify-high2.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: verify.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: virt-san.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: x509.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: x509_dn.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: x509_ext.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: x509_write.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: cert_types.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: ciphers.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: ciphersuites.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: ecc.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: groups.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: kx.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: mac.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: protocols.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: publickey.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: secparams.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: pk.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: dh.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: tls-sig.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: attributes.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: email-verify.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: krb5.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: name_constraints.c:_gnutls_x509_get_raw_field
Unexecuted instantiation: vko.c:_gnutls_x509_get_raw_field
236
237
int _gnutls_x509_get_raw_field2(asn1_node c2, const gnutls_datum_t *raw,
238
        const char *whom, gnutls_datum_t *dn);
239
240
unsigned _gnutls_check_if_same_key(gnutls_x509_crt_t cert1,
241
           gnutls_x509_crt_t cert2, unsigned is_ca);
242
243
unsigned _gnutls_check_if_same_key2(gnutls_x509_crt_t cert1,
244
            gnutls_datum_t *cert2bin);
245
246
unsigned _gnutls_check_valid_key_id(const gnutls_datum_t *key_id,
247
            gnutls_x509_crt_t cert, time_t now,
248
            unsigned *has_ski);
249
250
unsigned _gnutls_check_key_purpose(gnutls_x509_crt_t cert, const char *purpose,
251
           unsigned no_any);
252
253
time_t _gnutls_x509_generalTime2gtime(const char *ttime);
254
time_t _gnutls_utcTime2gtime(const char *ttime);
255
256
int _gnutls_get_extension(asn1_node asn, const char *root,
257
        const char *extension_id, int indx,
258
        gnutls_datum_t *ret, unsigned int *_critical);
259
260
int _gnutls_set_extension(asn1_node asn, const char *root, const char *ext_id,
261
        const gnutls_datum_t *ext_data,
262
        unsigned int critical);
263
264
int _gnutls_strdatum_to_buf(gnutls_datum_t *d, void *buf, size_t *sizeof_buf);
265
266
unsigned _gnutls_is_same_dn(gnutls_x509_crt_t cert1, gnutls_x509_crt_t cert2);
267
268
int _gnutls_copy_string(const gnutls_datum_t *str, uint8_t *out,
269
      size_t *out_size);
270
int _gnutls_copy_data(const gnutls_datum_t *str, uint8_t *out,
271
          size_t *out_size);
272
273
int _gnutls_x509_decode_ext(const gnutls_datum_t *der, gnutls_x509_ext_st *out);
274
int _gnutls_x509_raw_crt_to_raw_pubkey(const gnutls_datum_t *cert,
275
               gnutls_datum_t *rpubkey);
276
277
int _gnutls_x509_get_version(asn1_node root, const char *name);
278
279
int x509_crt_to_raw_pubkey(gnutls_x509_crt_t crt, gnutls_datum_t *rpubkey);
280
281
typedef void (*gnutls_cert_vfunc)(gnutls_x509_crt_t);
282
283
unsigned int _gnutls_sort_clist(gnutls_x509_crt_t *clist,
284
        unsigned int clist_size);
285
286
int _gnutls_check_if_sorted(gnutls_x509_crt_t *crt, int nr);
287
288
inline static int _asn1_strict_der_decode(asn1_node *element, const void *ider,
289
            int len, char *errorDescription)
290
0
{
291
0
#if defined(STRICT_DER_TIME) || !defined(ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME)
292
0
#define _ASN1_DER_FLAGS ASN1_DECODE_FLAG_STRICT_DER
293
#else
294
#define _ASN1_DER_FLAGS \
295
  (ASN1_DECODE_FLAG_ALLOW_INCORRECT_TIME | ASN1_DECODE_FLAG_STRICT_DER)
296
#endif
297
0
  return asn1_der_decoding2(element, ider, &len, _ASN1_DER_FLAGS,
298
0
          errorDescription);
299
0
}
Unexecuted instantiation: cert-cred.c:_asn1_strict_der_decode
Unexecuted instantiation: profiles.c:_asn1_strict_der_decode
Unexecuted instantiation: cert-cred-x509.c:_asn1_strict_der_decode
Unexecuted instantiation: pcert.c:_asn1_strict_der_decode
Unexecuted instantiation: pubkey.c:_asn1_strict_der_decode
Unexecuted instantiation: common.c:_asn1_strict_der_decode
Unexecuted instantiation: crl.c:_asn1_strict_der_decode
Unexecuted instantiation: crq.c:_asn1_strict_der_decode
Unexecuted instantiation: dn.c:_asn1_strict_der_decode
Unexecuted instantiation: extensions.c:_asn1_strict_der_decode
Unexecuted instantiation: hostname-verify.c:_asn1_strict_der_decode
Unexecuted instantiation: key_decode.c:_asn1_strict_der_decode
Unexecuted instantiation: key_encode.c:_asn1_strict_der_decode
Unexecuted instantiation: mpi.c:_asn1_strict_der_decode
Unexecuted instantiation: ocsp.c:_asn1_strict_der_decode
Unexecuted instantiation: output.c:_asn1_strict_der_decode
Unexecuted instantiation: pkcs12.c:_asn1_strict_der_decode
Unexecuted instantiation: pkcs12_bag.c:_asn1_strict_der_decode
Unexecuted instantiation: pkcs7-crypt.c:_asn1_strict_der_decode
Unexecuted instantiation: privkey.c:_asn1_strict_der_decode
Unexecuted instantiation: privkey_openssl.c:_asn1_strict_der_decode
Unexecuted instantiation: privkey_pkcs8.c:_asn1_strict_der_decode
Unexecuted instantiation: privkey_pkcs8_pbes1.c:_asn1_strict_der_decode
Unexecuted instantiation: prov-seed.c:_asn1_strict_der_decode
Unexecuted instantiation: sign.c:_asn1_strict_der_decode
Unexecuted instantiation: spki.c:_asn1_strict_der_decode
Unexecuted instantiation: time.c:_asn1_strict_der_decode
Unexecuted instantiation: tls_features.c:_asn1_strict_der_decode
Unexecuted instantiation: verify-high.c:_asn1_strict_der_decode
Unexecuted instantiation: verify-high2.c:_asn1_strict_der_decode
Unexecuted instantiation: verify.c:_asn1_strict_der_decode
Unexecuted instantiation: virt-san.c:_asn1_strict_der_decode
Unexecuted instantiation: x509.c:_asn1_strict_der_decode
Unexecuted instantiation: x509_dn.c:_asn1_strict_der_decode
Unexecuted instantiation: x509_ext.c:_asn1_strict_der_decode
Unexecuted instantiation: x509_write.c:_asn1_strict_der_decode
Unexecuted instantiation: cert_types.c:_asn1_strict_der_decode
Unexecuted instantiation: ciphers.c:_asn1_strict_der_decode
Unexecuted instantiation: ciphersuites.c:_asn1_strict_der_decode
Unexecuted instantiation: ecc.c:_asn1_strict_der_decode
Unexecuted instantiation: groups.c:_asn1_strict_der_decode
Unexecuted instantiation: kx.c:_asn1_strict_der_decode
Unexecuted instantiation: mac.c:_asn1_strict_der_decode
Unexecuted instantiation: protocols.c:_asn1_strict_der_decode
Unexecuted instantiation: publickey.c:_asn1_strict_der_decode
Unexecuted instantiation: secparams.c:_asn1_strict_der_decode
Unexecuted instantiation: pk.c:_asn1_strict_der_decode
Unexecuted instantiation: dh.c:_asn1_strict_der_decode
Unexecuted instantiation: tls-sig.c:_asn1_strict_der_decode
Unexecuted instantiation: attributes.c:_asn1_strict_der_decode
Unexecuted instantiation: email-verify.c:_asn1_strict_der_decode
Unexecuted instantiation: krb5.c:_asn1_strict_der_decode
Unexecuted instantiation: name_constraints.c:_asn1_strict_der_decode
Unexecuted instantiation: vko.c:_asn1_strict_der_decode
300
301
#endif /* GNUTLS_LIB_X509_COMMON_H */