Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1 | /** |
| 2 | * \file x509.h |
Paul Bakker | e0ccd0a | 2009-01-04 16:27:10 +0000 | [diff] [blame] | 3 | * |
| 4 | * Based on XySSL: Copyright (C) 2006-2008 Christophe Devine |
| 5 | * |
Paul Bakker | 785a9ee | 2009-01-25 14:15:10 +0000 | [diff] [blame] | 6 | * Copyright (C) 2009 Paul Bakker <polarssl_maintainer at polarssl dot org> |
Paul Bakker | e0ccd0a | 2009-01-04 16:27:10 +0000 | [diff] [blame] | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License along |
| 19 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 21 | */ |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 22 | #ifndef POLARSSL_X509_H |
| 23 | #define POLARSSL_X509_H |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 24 | |
Paul Bakker | 8e831ed | 2009-01-03 21:24:11 +0000 | [diff] [blame] | 25 | #include "polarssl/rsa.h" |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 26 | |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame^] | 27 | /* |
| 28 | * ASN1 Error codes |
| 29 | * |
| 30 | * These error codes will be OR'ed to X509 error codes for |
| 31 | * higher error granularity. |
| 32 | */ |
Paul Bakker | b5bf176 | 2009-07-19 20:28:35 +0000 | [diff] [blame] | 33 | #define POLARSSL_ERR_ASN1_OUT_OF_DATA 0x0014 |
| 34 | #define POLARSSL_ERR_ASN1_UNEXPECTED_TAG 0x0016 |
| 35 | #define POLARSSL_ERR_ASN1_INVALID_LENGTH 0x0018 |
| 36 | #define POLARSSL_ERR_ASN1_LENGTH_MISMATCH 0x001A |
| 37 | #define POLARSSL_ERR_ASN1_INVALID_DATA 0x001C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 38 | |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame^] | 39 | /* |
| 40 | * X509 Error codes |
| 41 | */ |
Paul Bakker | b5bf176 | 2009-07-19 20:28:35 +0000 | [diff] [blame] | 42 | #define POLARSSL_ERR_X509_FEATURE_UNAVAILABLE 0x0020 |
| 43 | #define POLARSSL_ERR_X509_CERT_INVALID_PEM 0x0040 |
| 44 | #define POLARSSL_ERR_X509_CERT_INVALID_FORMAT 0x0060 |
| 45 | #define POLARSSL_ERR_X509_CERT_INVALID_VERSION 0x0080 |
| 46 | #define POLARSSL_ERR_X509_CERT_INVALID_SERIAL 0x00A0 |
| 47 | #define POLARSSL_ERR_X509_CERT_INVALID_ALG 0x00C0 |
| 48 | #define POLARSSL_ERR_X509_CERT_INVALID_NAME 0x00E0 |
| 49 | #define POLARSSL_ERR_X509_CERT_INVALID_DATE 0x0100 |
| 50 | #define POLARSSL_ERR_X509_CERT_INVALID_PUBKEY 0x0120 |
| 51 | #define POLARSSL_ERR_X509_CERT_INVALID_SIGNATURE 0x0140 |
| 52 | #define POLARSSL_ERR_X509_CERT_INVALID_EXTENSIONS 0x0160 |
| 53 | #define POLARSSL_ERR_X509_CERT_UNKNOWN_VERSION 0x0180 |
| 54 | #define POLARSSL_ERR_X509_CERT_UNKNOWN_SIG_ALG 0x01A0 |
| 55 | #define POLARSSL_ERR_X509_CERT_UNKNOWN_PK_ALG 0x01C0 |
| 56 | #define POLARSSL_ERR_X509_CERT_SIG_MISMATCH 0x01E0 |
| 57 | #define POLARSSL_ERR_X509_CERT_VERIFY_FAILED 0x0200 |
| 58 | #define POLARSSL_ERR_X509_KEY_INVALID_PEM 0x0220 |
| 59 | #define POLARSSL_ERR_X509_KEY_INVALID_VERSION 0x0240 |
| 60 | #define POLARSSL_ERR_X509_KEY_INVALID_FORMAT 0x0260 |
| 61 | #define POLARSSL_ERR_X509_KEY_INVALID_ENC_IV 0x0280 |
| 62 | #define POLARSSL_ERR_X509_KEY_UNKNOWN_ENC_ALG 0x02A0 |
| 63 | #define POLARSSL_ERR_X509_KEY_PASSWORD_REQUIRED 0x02C0 |
| 64 | #define POLARSSL_ERR_X509_KEY_PASSWORD_MISMATCH 0x02E0 |
| 65 | #define POLARSSL_ERR_X509_POINT_ERROR 0x0300 |
| 66 | #define POLARSSL_ERR_X509_VALUE_TO_LENGTH 0x0320 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 67 | |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame^] | 68 | /* |
| 69 | * X509 Verify codes |
| 70 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 71 | #define BADCERT_EXPIRED 1 |
| 72 | #define BADCERT_REVOKED 2 |
| 73 | #define BADCERT_CN_MISMATCH 4 |
| 74 | #define BADCERT_NOT_TRUSTED 8 |
Paul Bakker | 40ea7de | 2009-05-03 10:18:48 +0000 | [diff] [blame] | 75 | #define BADCRL_NOT_TRUSTED 16 |
| 76 | #define BADCRL_EXPIRED 32 |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 77 | |
| 78 | /* |
| 79 | * DER constants |
| 80 | */ |
| 81 | #define ASN1_BOOLEAN 0x01 |
| 82 | #define ASN1_INTEGER 0x02 |
| 83 | #define ASN1_BIT_STRING 0x03 |
| 84 | #define ASN1_OCTET_STRING 0x04 |
| 85 | #define ASN1_NULL 0x05 |
| 86 | #define ASN1_OID 0x06 |
| 87 | #define ASN1_UTF8_STRING 0x0C |
| 88 | #define ASN1_SEQUENCE 0x10 |
| 89 | #define ASN1_SET 0x11 |
| 90 | #define ASN1_PRINTABLE_STRING 0x13 |
| 91 | #define ASN1_T61_STRING 0x14 |
| 92 | #define ASN1_IA5_STRING 0x16 |
| 93 | #define ASN1_UTC_TIME 0x17 |
| 94 | #define ASN1_UNIVERSAL_STRING 0x1C |
| 95 | #define ASN1_BMP_STRING 0x1E |
| 96 | #define ASN1_PRIMITIVE 0x00 |
| 97 | #define ASN1_CONSTRUCTED 0x20 |
| 98 | #define ASN1_CONTEXT_SPECIFIC 0x80 |
| 99 | |
| 100 | /* |
| 101 | * various object identifiers |
| 102 | */ |
| 103 | #define X520_COMMON_NAME 3 |
| 104 | #define X520_COUNTRY 6 |
| 105 | #define X520_LOCALITY 7 |
| 106 | #define X520_STATE 8 |
| 107 | #define X520_ORGANIZATION 10 |
| 108 | #define X520_ORG_UNIT 11 |
| 109 | #define PKCS9_EMAIL 1 |
| 110 | |
| 111 | #define X509_OUTPUT_DER 0x01 |
| 112 | #define X509_OUTPUT_PEM 0x02 |
| 113 | #define PEM_LINE_LENGTH 72 |
| 114 | #define X509_ISSUER 0x01 |
| 115 | #define X509_SUBJECT 0x02 |
| 116 | |
| 117 | #define OID_X520 "\x55\x04" |
| 118 | #define OID_CN "\x55\x04\x03" |
| 119 | #define OID_PKCS1 "\x2A\x86\x48\x86\xF7\x0D\x01\x01" |
| 120 | #define OID_PKCS1_RSA "\x2A\x86\x48\x86\xF7\x0D\x01\x01\x01" |
| 121 | #define OID_PKCS1_RSA_SHA "\x2A\x86\x48\x86\xF7\x0D\x01\x01\x05" |
| 122 | #define OID_PKCS9 "\x2A\x86\x48\x86\xF7\x0D\x01\x09" |
| 123 | #define OID_PKCS9_EMAIL "\x2A\x86\x48\x86\xF7\x0D\x01\x09\x01" |
| 124 | |
| 125 | /* |
| 126 | * Structures for parsing X.509 certificates |
| 127 | */ |
| 128 | typedef struct _x509_buf |
| 129 | { |
| 130 | int tag; |
| 131 | int len; |
| 132 | unsigned char *p; |
| 133 | } |
| 134 | x509_buf; |
| 135 | |
| 136 | typedef struct _x509_name |
| 137 | { |
| 138 | x509_buf oid; |
| 139 | x509_buf val; |
| 140 | struct _x509_name *next; |
| 141 | } |
| 142 | x509_name; |
| 143 | |
| 144 | typedef struct _x509_time |
| 145 | { |
| 146 | int year, mon, day; |
| 147 | int hour, min, sec; |
| 148 | } |
| 149 | x509_time; |
| 150 | |
| 151 | typedef struct _x509_cert |
| 152 | { |
| 153 | x509_buf raw; |
| 154 | x509_buf tbs; |
| 155 | |
| 156 | int version; |
| 157 | x509_buf serial; |
| 158 | x509_buf sig_oid1; |
| 159 | |
| 160 | x509_buf issuer_raw; |
| 161 | x509_buf subject_raw; |
| 162 | |
| 163 | x509_name issuer; |
| 164 | x509_name subject; |
| 165 | |
| 166 | x509_time valid_from; |
| 167 | x509_time valid_to; |
| 168 | |
| 169 | x509_buf pk_oid; |
| 170 | rsa_context rsa; |
| 171 | |
| 172 | x509_buf issuer_id; |
| 173 | x509_buf subject_id; |
| 174 | x509_buf v3_ext; |
| 175 | |
| 176 | int ca_istrue; |
| 177 | int max_pathlen; |
| 178 | |
| 179 | x509_buf sig_oid2; |
| 180 | x509_buf sig; |
| 181 | |
| 182 | struct _x509_cert *next; |
| 183 | } |
| 184 | x509_cert; |
| 185 | |
Paul Bakker | d98030e | 2009-05-02 15:13:40 +0000 | [diff] [blame] | 186 | typedef struct _x509_crl_entry |
| 187 | { |
| 188 | x509_buf raw; |
| 189 | |
| 190 | x509_buf serial; |
| 191 | |
| 192 | x509_time revocation_date; |
| 193 | |
| 194 | x509_buf entry_ext; |
| 195 | |
| 196 | struct _x509_crl_entry *next; |
| 197 | } |
| 198 | x509_crl_entry; |
| 199 | |
| 200 | typedef struct _x509_crl |
| 201 | { |
| 202 | x509_buf raw; |
| 203 | x509_buf tbs; |
| 204 | |
| 205 | int version; |
| 206 | x509_buf sig_oid1; |
| 207 | |
| 208 | x509_buf issuer_raw; |
| 209 | |
| 210 | x509_name issuer; |
| 211 | |
| 212 | x509_time this_update; |
| 213 | x509_time next_update; |
| 214 | |
| 215 | x509_crl_entry entry; |
| 216 | |
| 217 | x509_buf crl_ext; |
| 218 | |
| 219 | x509_buf sig_oid2; |
| 220 | x509_buf sig; |
| 221 | |
| 222 | struct _x509_crl *next; |
| 223 | } |
| 224 | x509_crl; |
| 225 | |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 226 | /* |
| 227 | * Structures for writing X.509 certificates |
| 228 | */ |
| 229 | typedef struct _x509_node |
| 230 | { |
| 231 | unsigned char *data; |
| 232 | unsigned char *p; |
| 233 | unsigned char *end; |
| 234 | |
| 235 | size_t len; |
| 236 | } |
| 237 | x509_node; |
| 238 | |
| 239 | typedef struct _x509_raw |
| 240 | { |
| 241 | x509_node raw; |
| 242 | x509_node tbs; |
| 243 | |
| 244 | x509_node version; |
| 245 | x509_node serial; |
| 246 | x509_node tbs_signalg; |
| 247 | x509_node issuer; |
| 248 | x509_node validity; |
| 249 | x509_node subject; |
| 250 | x509_node subpubkey; |
| 251 | |
| 252 | x509_node signalg; |
| 253 | x509_node sign; |
| 254 | } |
| 255 | x509_raw; |
| 256 | |
| 257 | #ifdef __cplusplus |
| 258 | extern "C" { |
| 259 | #endif |
| 260 | |
| 261 | /** |
| 262 | * \brief Parse one or more certificates and add them |
| 263 | * to the chained list |
| 264 | * |
| 265 | * \param chain points to the start of the chain |
| 266 | * \param buf buffer holding the certificate data |
| 267 | * \param buflen size of the buffer |
| 268 | * |
| 269 | * \return 0 if successful, or a specific X509 error code |
| 270 | */ |
Paul Bakker | 592457c | 2009-04-01 19:01:43 +0000 | [diff] [blame] | 271 | int x509parse_crt( x509_cert *chain, unsigned char *buf, int buflen ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 272 | |
| 273 | /** |
| 274 | * \brief Load one or more certificates and add them |
| 275 | * to the chained list |
| 276 | * |
| 277 | * \param chain points to the start of the chain |
| 278 | * \param path filename to read the certificates from |
| 279 | * |
| 280 | * \return 0 if successful, or a specific X509 error code |
| 281 | */ |
Paul Bakker | 592457c | 2009-04-01 19:01:43 +0000 | [diff] [blame] | 282 | int x509parse_crtfile( x509_cert *chain, char *path ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 283 | |
| 284 | /** |
Paul Bakker | d98030e | 2009-05-02 15:13:40 +0000 | [diff] [blame] | 285 | * \brief Parse one or more CRLs and add them |
| 286 | * to the chained list |
| 287 | * |
| 288 | * \param chain points to the start of the chain |
| 289 | * \param buf buffer holding the CRL data |
| 290 | * \param buflen size of the buffer |
| 291 | * |
| 292 | * \return 0 if successful, or a specific X509 error code |
| 293 | */ |
| 294 | int x509parse_crl( x509_crl *chain, unsigned char *buf, int buflen ); |
| 295 | |
| 296 | /** |
| 297 | * \brief Load one or more CRLs and add them |
| 298 | * to the chained list |
| 299 | * |
| 300 | * \param chain points to the start of the chain |
| 301 | * \param path filename to read the CRLs from |
| 302 | * |
| 303 | * \return 0 if successful, or a specific X509 error code |
| 304 | */ |
| 305 | int x509parse_crlfile( x509_crl *chain, char *path ); |
| 306 | |
| 307 | /** |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 308 | * \brief Parse a private RSA key |
| 309 | * |
| 310 | * \param rsa RSA context to be initialized |
| 311 | * \param buf input buffer |
| 312 | * \param buflen size of the buffer |
| 313 | * \param pwd password for decryption (optional) |
| 314 | * \param pwdlen size of the password |
| 315 | * |
| 316 | * \return 0 if successful, or a specific X509 error code |
| 317 | */ |
| 318 | int x509parse_key( rsa_context *rsa, |
| 319 | unsigned char *buf, int buflen, |
| 320 | unsigned char *pwd, int pwdlen ); |
| 321 | |
| 322 | /** |
| 323 | * \brief Load and parse a private RSA key |
| 324 | * |
| 325 | * \param rsa RSA context to be initialized |
| 326 | * \param path filename to read the private key from |
| 327 | * \param pwd password to decrypt the file (can be NULL) |
| 328 | * |
| 329 | * \return 0 if successful, or a specific X509 error code |
| 330 | */ |
| 331 | int x509parse_keyfile( rsa_context *rsa, char *path, char *password ); |
| 332 | |
| 333 | /** |
| 334 | * \brief Store the certificate DN in printable form into buf; |
Paul Bakker | d98030e | 2009-05-02 15:13:40 +0000 | [diff] [blame] | 335 | * no more than size characters will be written. |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame^] | 336 | * |
| 337 | * \param buf Buffer to write to |
| 338 | * \param size Maximum size of buffer |
| 339 | * \param dn The X509 name to represent |
| 340 | * |
| 341 | * \return The amount of data written to the buffer, or -1 in |
| 342 | * case of an error. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 343 | */ |
Paul Bakker | d98030e | 2009-05-02 15:13:40 +0000 | [diff] [blame] | 344 | int x509parse_dn_gets( char *buf, size_t size, x509_name *dn ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 345 | |
| 346 | /** |
| 347 | * \brief Returns an informational string about the |
| 348 | * certificate. |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame^] | 349 | * |
| 350 | * \param buf Buffer to write to |
| 351 | * \param size Maximum size of buffer |
| 352 | * \param prefix A line prefix |
| 353 | * \param crt The X509 certificate to represent |
| 354 | * |
| 355 | * \return The amount of data written to the buffer, or -1 in |
| 356 | * case of an error. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 357 | */ |
Paul Bakker | d98030e | 2009-05-02 15:13:40 +0000 | [diff] [blame] | 358 | int x509parse_cert_info( char *buf, size_t size, char *prefix, x509_cert *crt ); |
| 359 | |
| 360 | /** |
| 361 | * \brief Returns an informational string about the |
| 362 | * CRL. |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame^] | 363 | * |
| 364 | * \param buf Buffer to write to |
| 365 | * \param size Maximum size of buffer |
| 366 | * \param prefix A line prefix |
| 367 | * \param crt The X509 CRL to represent |
| 368 | * |
| 369 | * \return The amount of data written to the buffer, or -1 in |
| 370 | * case of an error. |
Paul Bakker | d98030e | 2009-05-02 15:13:40 +0000 | [diff] [blame] | 371 | */ |
| 372 | int x509parse_crl_info( char *buf, size_t size, char *prefix, x509_crl *crl ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 373 | |
| 374 | /** |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame^] | 375 | * \brief Check a given x509_time against the system time and check |
| 376 | * if it is valid. |
| 377 | * |
| 378 | * \param time x509_time to check |
| 379 | * |
| 380 | * \return Return 0 if the x509_time is still valid, |
Paul Bakker | 40ea7de | 2009-05-03 10:18:48 +0000 | [diff] [blame] | 381 | * or 1 otherwise. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 382 | */ |
Paul Bakker | 40ea7de | 2009-05-03 10:18:48 +0000 | [diff] [blame] | 383 | int x509parse_time_expired( x509_time *time ); |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 384 | |
| 385 | /** |
| 386 | * \brief Verify the certificate signature |
| 387 | * |
| 388 | * \param crt a certificate to be verified |
| 389 | * \param trust_ca the trusted CA chain |
Paul Bakker | 40ea7de | 2009-05-03 10:18:48 +0000 | [diff] [blame] | 390 | * \param ca_crl the CRL chain for trusted CA's |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 391 | * \param cn expected Common Name (can be set to |
| 392 | * NULL if the CN must not be verified) |
| 393 | * \param flags result of the verification |
| 394 | * |
Paul Bakker | 40e4694 | 2009-01-03 21:51:57 +0000 | [diff] [blame] | 395 | * \return 0 if successful or POLARSSL_ERR_X509_SIG_VERIFY_FAILED, |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 396 | * in which case *flags will have one or more of |
| 397 | * the following values set: |
| 398 | * BADCERT_EXPIRED -- |
| 399 | * BADCERT_REVOKED -- |
| 400 | * BADCERT_CN_MISMATCH -- |
| 401 | * BADCERT_NOT_TRUSTED |
| 402 | * |
| 403 | * \note TODO: add two arguments, depth and crl |
| 404 | */ |
| 405 | int x509parse_verify( x509_cert *crt, |
| 406 | x509_cert *trust_ca, |
Paul Bakker | 40ea7de | 2009-05-03 10:18:48 +0000 | [diff] [blame] | 407 | x509_crl *ca_crl, |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 408 | char *cn, int *flags ); |
| 409 | |
| 410 | /** |
| 411 | * \brief Unallocate all certificate data |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame^] | 412 | * |
| 413 | * \param crt Certificate chain to free |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 414 | */ |
| 415 | void x509_free( x509_cert *crt ); |
| 416 | |
| 417 | /** |
Paul Bakker | d98030e | 2009-05-02 15:13:40 +0000 | [diff] [blame] | 418 | * \brief Unallocate all CRL data |
Paul Bakker | 13e2dfe | 2009-07-28 07:18:38 +0000 | [diff] [blame^] | 419 | * |
| 420 | * \param crt CRL chain to free |
Paul Bakker | d98030e | 2009-05-02 15:13:40 +0000 | [diff] [blame] | 421 | */ |
| 422 | void x509_crl_free( x509_crl *crl ); |
| 423 | |
| 424 | /** |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 425 | * \brief Checkup routine |
| 426 | * |
| 427 | * \return 0 if successful, or 1 if the test failed |
| 428 | */ |
| 429 | int x509_self_test( int verbose ); |
| 430 | |
| 431 | #ifdef __cplusplus |
| 432 | } |
| 433 | #endif |
| 434 | |
| 435 | #endif /* x509.h */ |