Merge branch 'master' of git://repo.or.cz/gnutls
[gnutls.git] / libextra / openssl_compat.h
blobacbd7c309450747f5bfcda887e11e9b4fd9ab0aa
1 /*
2 * Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation
4 * Author: Nikos Mavroyanopoulos
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 2 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
21 * 02110-1301, USA.
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 *,
35 gnutls_x509_dn *);
36 int gnutls_x509_extract_certificate_dn_string (char *buf,
37 unsigned int sizeof_buf,
38 const gnutls_datum_t * cert,
39 int issuer);
40 int gnutls_x509_extract_certificate_issuer_dn (const gnutls_datum_t *,
41 gnutls_x509_dn *);
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
46 *);
47 time_t gnutls_x509_extract_certificate_expiration_time (const gnutls_datum_t
48 *);
49 int gnutls_x509_extract_certificate_subject_alt_name (const gnutls_datum_t
50 *, int seq, char *,
51 int *);
52 int gnutls_x509_pkcs7_extract_certificate (const gnutls_datum_t *
53 pkcs7_struct, int indx,
54 char *certificate,
55 int *certificate_size);
56 int gnutls_x509_extract_certificate_pk_algorithm (const gnutls_datum_t *
57 cert, int *bits);
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,
62 int cert_list_length,
63 const gnutls_datum_t * CA_list,
64 int CA_list_length,
65 const gnutls_datum_t * CRL_list,
66 int CRL_list_length);
68 #define gnutls_x509_fingerprint gnutls_fingerprint
69 #define gnutls_x509_certificate_format gnutls_x509_crt_fmt_t
71 int gnutls_x509_extract_key_pk_algorithm (const gnutls_datum_t * key);
73 #define gnutls_certificate_set_rsa_params gnutls_certificate_set_rsa_export_params
75 #endif