]>
Commit | Line | Data |
---|---|---|
9a2f63e7 | 1 | /* |
f70aedc4 | 2 | * Copyright (C) 1996-2021 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 |
24b30fdc | 15 | #include "compat/openssl.h" |
5919df43 AJ |
16 | #if HAVE_OPENSSL_SSL_H |
17 | #include <openssl/ssl.h> | |
18 | #endif | |
5919df43 | 19 | |
eacc1666 | 20 | #elif USE_GNUTLS |
5919df43 AJ |
21 | #if HAVE_GNUTLS_GNUTLS_H |
22 | #include <gnutls/gnutls.h> | |
23 | #endif | |
9a2f63e7 AJ |
24 | #endif |
25 | ||
26 | namespace Security { | |
27 | ||
28 | #if USE_OPENSSL | |
1c1fae0f | 29 | typedef std::shared_ptr<SSL_CTX> ContextPointer; |
9a2f63e7 | 30 | |
5919df43 | 31 | #elif USE_GNUTLS |
1c1fae0f | 32 | typedef std::shared_ptr<struct gnutls_certificate_credentials_st> ContextPointer; |
5919df43 | 33 | |
9a2f63e7 | 34 | #else |
96993ee0 | 35 | // use void* so we can check against nullptr |
1c1fae0f | 36 | typedef std::shared_ptr<void> ContextPointer; |
eacc1666 | 37 | |
9a2f63e7 AJ |
38 | #endif |
39 | ||
40 | } // namespace Security | |
41 | ||
42 | #endif /* SQUID_SRC_SECURITY_CONTEXT_H */ | |
be75380c | 43 |