1 /*
2  * Copyright (C) 2000-2012 Free Software Foundation, Inc.
3  *
4  * Author: Nikos Mavrogiannopoulos
5  *
6  * This file is part of GnuTLS.
7  *
8  * The GnuTLS is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version 2.1 of
11  * the License, or (at your option) any later version.
12  *
13  * This library 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  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program.  If not, see <https://www.gnu.org/licenses/>
20  *
21  */
22 
23 #ifndef GNUTLS_LIB_X509_H
24 #define GNUTLS_LIB_X509_H
25 
26 #include <libtasn1.h>
27 
28 
29 int _gnutls_x509_cert_verify_peers(gnutls_session_t session,
30 				   gnutls_typed_vdata_st * data,
31 				   unsigned int elements,
32 				   unsigned int *status);
33 
34 #define PEM_CERT_SEP2 "-----BEGIN X509 CERTIFICATE"
35 #define PEM_CERT_SEP "-----BEGIN CERTIFICATE"
36 #define PEM_OCSP_RESPONSE "-----BEGIN OCSP RESPONSE"
37 #define BARE_PEM_OCSP_RESPONSE "OCSP RESPONSE"
38 
39 #define PEM_CRL_SEP "-----BEGIN X509 CRL"
40 
41 
42 int _gnutls_x509_raw_privkey_to_gkey(gnutls_privkey_t * privkey,
43 				     const gnutls_datum_t * raw_key,
44 				     gnutls_x509_crt_fmt_t type);
45 
46 #endif /* GNUTLS_LIB_X509_H */
47