openssl: remove manual check for certificate expiration
[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 TIZEN_DEBUG
37 #include <dlog.h>
38
39 #ifdef LOG_TAG
40 #undef LOG_TAG
41 #endif
42
43 #define LOG_TAG "glib-networking"
44 #define TIZEN_LOGD(foramt, args...)     LOGD(format, ##args)
45 #define TIZEN_LOGI(format, args...)     LOGI(format, ##args)
46 #define TIZEN_LOGE(format, args...)     LOGE(format, ##args)
47 #else
48 #define TIZEN_LOGD(foramt, args...)
49 #define TIZEN_LOGI(format, args...)
50 #define TIZEN_LOGE(format, args...)
51 #endif
52
53 #ifdef G_OS_WIN32
54 #define WIN32_LEAN_AND_MEAN
55 #include <windows.h>
56 /* These are defined by the Windows headers, but clash with openssl */
57 #undef X509_NAME
58 #undef X509_CERT_PAIR
59 #undef X509_EXTENSIONS
60 #undef OCSP_REQUEST
61 #undef OCSP_RESPONSE
62 #endif
63
64 #include <openssl/ssl.h>
65 #include <openssl/bio.h>
66 #include <openssl/err.h>
67 #include <openssl/x509.h>
68 #include <openssl/x509_vfy.h>
69 #include <openssl/x509v3.h>
70 #include <openssl/crypto.h>
71 #if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_OCSP)
72 #include <openssl/ocsp.h>
73 #endif
74
75 #endif /* __G_TLS_OPENSSL_INCLUDE_H__ */