2 * Copyright (C) 2002, 2003, 2004, 2005, 2008 Free Software Foundation
4 * Author: Nikos Mavrogiannopoulos
6 * This file is part of GNUTLS-EXTRA.
8 * GNUTLS-EXTRA is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 3 of the
11 * License, or (at your option) any later version.
13 * GNUTLS-EXTRA is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with GNUTLS-EXTRA; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 #ifndef GNUTLS_COMPAT8_H
26 # define GNUTLS_COMPAT8_H
28 /* Extra definitions */
29 #include <gnutls/openssl.h>
31 int gnutls_x509_extract_dn (const gnutls_datum_t
*, gnutls_x509_dn
*);
32 int gnutls_x509_extract_dn_string (const gnutls_datum_t
* idn
,
33 char *buf
, unsigned int sizeof_buf
);
34 int gnutls_x509_extract_certificate_dn (const gnutls_datum_t
*,
36 int gnutls_x509_extract_certificate_dn_string (char *buf
,
37 unsigned int sizeof_buf
,
38 const gnutls_datum_t
* cert
,
40 int gnutls_x509_extract_certificate_issuer_dn (const gnutls_datum_t
*,
42 int gnutls_x509_extract_certificate_version (const gnutls_datum_t
*);
43 int gnutls_x509_extract_certificate_serial (const gnutls_datum_t
* cert
,
44 char *result
, int *result_size
);
45 time_t gnutls_x509_extract_certificate_activation_time (const gnutls_datum_t
47 time_t gnutls_x509_extract_certificate_expiration_time (const gnutls_datum_t
49 int gnutls_x509_extract_certificate_subject_alt_name (const gnutls_datum_t
52 int gnutls_x509_pkcs7_extract_certificate (const gnutls_datum_t
*
53 pkcs7_struct
, int indx
,
55 int *certificate_size
);
56 int gnutls_x509_extract_certificate_pk_algorithm (const gnutls_datum_t
*
58 int gnutls_x509_extract_certificate_ca_status (const gnutls_datum_t
* cert
);
59 int gnutls_x509_extract_key_pk_algorithm (const gnutls_datum_t
* key
);
61 int gnutls_x509_verify_certificate (const gnutls_datum_t
* cert_list
,
63 const gnutls_datum_t
* CA_list
,
65 const gnutls_datum_t
* CRL_list
,
68 #define gnutls_x509_fingerprint gnutls_fingerprint
69 #define gnutls_x509_certificate_format gnutls_x509_crt_fmt_t
71 #define gnutls_certificate_set_rsa_params gnutls_certificate_set_rsa_export_params