forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathssl_integration_test.h
44 lines (32 loc) · 1.2 KB
/
ssl_integration_test.h
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
#pragma once
#include <memory>
#include <string>
#include "test/integration/http_integration.h"
#include "test/integration/server.h"
#include "test/mocks/runtime/mocks.h"
#include "test/mocks/secret/mocks.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
using testing::NiceMock;
namespace Envoy {
namespace Ssl {
class SslIntegrationTest : public HttpIntegrationTest,
public testing::TestWithParam<Network::Address::IpVersion> {
public:
SslIntegrationTest()
: HttpIntegrationTest(Http::CodecClient::Type::HTTP1, GetParam(), realTime()) {}
void initialize() override;
void TearDown() override;
Network::ClientConnectionPtr makeSslConn() { return makeSslClientConnection(false, false); }
Network::ClientConnectionPtr makeSslClientConnection(bool alpn, bool san);
void checkStats();
private:
std::unique_ptr<Runtime::Loader> runtime_;
std::unique_ptr<ContextManager> context_manager_;
Network::TransportSocketFactoryPtr client_ssl_ctx_plain_;
Network::TransportSocketFactoryPtr client_ssl_ctx_alpn_;
Network::TransportSocketFactoryPtr client_ssl_ctx_san_;
Network::TransportSocketFactoryPtr client_ssl_ctx_alpn_san_;
};
} // namespace Ssl
} // namespace Envoy