Context.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
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 
12 #include <memory>
13 
14 #if USE_OPENSSL
15 #include "compat/openssl.h"
16 #if HAVE_OPENSSL_SSL_H
17 #include <openssl/ssl.h>
18 #endif
19 
20 #elif USE_GNUTLS
21 #if HAVE_GNUTLS_GNUTLS_H
22 #include <gnutls/gnutls.h>
23 #endif
24 #endif
25 
26 namespace Security {
27 
28 #if USE_OPENSSL
29 typedef std::shared_ptr<SSL_CTX> ContextPointer;
30 
31 #elif USE_GNUTLS
32 typedef std::shared_ptr<struct gnutls_certificate_credentials_st> ContextPointer;
33 
34 #else
35 // use void* so we can check against nullptr
36 typedef std::shared_ptr<void> ContextPointer;
37 
38 #endif
39 
40 } // namespace Security
41 
42 #endif /* SQUID_SRC_SECURITY_CONTEXT_H */
43 
std::shared_ptr< SSL_CTX > ContextPointer
Definition: Context.h:29

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors