7a6a4600dfbf83aea2d28630f84a6fdfdfd54fa7
[platform/upstream/glib-networking.git] / tls / openssl / openssl-include.h
1 /*
2  * gtlscertificate-openssl.h
3  *
4  * Copyright (C) 2015 NICE s.r.l.
5  *
6  * This file is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This file is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * In addition, when the library is used with OpenSSL, a special
20  * exception applies. Refer to the LICENSE_EXCEPTION file for details.
21  *
22  * Authors: Ignacio Casal Quinteiro
23  *          Christoph Reiter
24  */
25
26 /* Due to name clashes between Windows and openssl headers we have to
27  * make sure windows.h is included before openssl and that we undef the
28  * clashing macros.
29  */
30
31 #ifndef __G_TLS_OPENSSL_INCLUDE_H__
32 #define __G_TLS_OPENSSL_INCLUDE_H__
33
34 #include "glib.h"
35
36 #ifdef G_OS_WIN32
37 #define WIN32_LEAN_AND_MEAN
38 #include <windows.h>
39 /* These are defined by the Windows headers, but clash with openssl */
40 #undef X509_NAME
41 #undef X509_CERT_PAIR
42 #undef X509_EXTENSIONS
43 #undef OCSP_REQUEST
44 #undef OCSP_RESPONSE
45 #endif
46
47 #include <openssl/ssl.h>
48 #include <openssl/bio.h>
49 #include <openssl/err.h>
50 #include <openssl/x509.h>
51 #include <openssl/x509_vfy.h>
52 #include <openssl/x509v3.h>
53 #include <openssl/crypto.h>
54 #if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_OCSP)
55 #include <openssl/ocsp.h>
56 #endif
57
58 #endif /* __G_TLS_OPENSSL_INCLUDE_H__ */