blob: 0d77fb64db127ac005fc99f52b88b06344cee0bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
#ifndef ICESSL_OPENSSL_ENGINE_H
#define ICESSL_OPENSSL_ENGINE_H
#include <IceSSL/SSLEngine.h>
#include <IceSSL/InstanceF.h>
#include <IceSSL/OpenSSLUtil.h>
#include <Ice/BuiltinSequences.h>
namespace IceSSL
{
namespace OpenSSL
{
class SSLEngine : public IceSSL::SSLEngine
{
public:
SSLEngine(const Ice::CommunicatorPtr&);
~SSLEngine();
virtual void initialize();
virtual void destroy();
virtual void verifyPeer(const std::string&, const IceSSL::ConnectionInfoPtr&, const std::string&);
virtual IceInternal::TransceiverPtr
createTransceiver(const IceSSL::InstancePtr&, const IceInternal::TransceiverPtr&, const std::string&, bool);
#ifndef OPENSSL_NO_DH
DH* dhParams(int);
#endif
SSL_CTX* context() const;
void context(SSL_CTX*);
std::string sslErrors() const;
private:
void cleanup();
SSL_METHOD* getMethod(int);
void setOptions(int);
enum Protocols { SSLv3 = 1, TLSv1_0 = 2, TLSv1_1 = 4, TLSv1_2 = 8, TLSv1_3 = 16 };
int parseProtocols(const Ice::StringSeq&) const;
SSL_CTX* _ctx;
#ifndef OPENSSL_NO_DH
IceSSL::OpenSSL::DHParamsPtr _dhParams;
#endif
};
} // OpenSSL namespace end
} // IceSSL namespace endif
#endif
|