]>
Commit | Line | Data |
---|---|---|
9a2f63e7 | 1 | /* |
5b74111a | 2 | * Copyright (C) 1996-2018 The Squid Software Foundation and contributors |
9a2f63e7 AJ |
3 | * |
4 | * Squid software is distributed under GPLv2+ license and includes | |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
7 | */ | |
8 | ||
9 | #ifndef SQUID_SRC_SECURITY_CONTEXT_H | |
10 | #define SQUID_SRC_SECURITY_CONTEXT_H | |
11 | ||
fad72647 AJ |
12 | #include <memory> |
13 | ||
9a2f63e7 | 14 | #if USE_OPENSSL |
5919df43 AJ |
15 | #if HAVE_OPENSSL_SSL_H |
16 | #include <openssl/ssl.h> | |
17 | #endif | |
5919df43 | 18 | |
eacc1666 | 19 | #elif USE_GNUTLS |
5919df43 AJ |
20 | #if HAVE_GNUTLS_GNUTLS_H |
21 | #include <gnutls/gnutls.h> | |
22 | #endif | |
9a2f63e7 AJ |
23 | #endif |
24 | ||
25 | namespace Security { | |
26 | ||
27 | #if USE_OPENSSL | |
1c1fae0f | 28 | typedef std::shared_ptr<SSL_CTX> ContextPointer; |
9a2f63e7 | 29 | |
5919df43 | 30 | #elif USE_GNUTLS |
1c1fae0f | 31 | typedef std::shared_ptr<struct gnutls_certificate_credentials_st> ContextPointer; |
5919df43 | 32 | |
9a2f63e7 | 33 | #else |
96993ee0 | 34 | // use void* so we can check against nullptr |
1c1fae0f | 35 | typedef std::shared_ptr<void> ContextPointer; |
eacc1666 | 36 | |
9a2f63e7 AJ |
37 | #endif |
38 | ||
39 | } // namespace Security | |
40 | ||
41 | #endif /* SQUID_SRC_SECURITY_CONTEXT_H */ | |
be75380c | 42 |