xref: /aosp_15_r20/external/cronet/net/ssl/ssl_server_config.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2015 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "net/ssl/ssl_server_config.h"
6 
7 #include "net/socket/ssl_client_socket.h"
8 #include "net/ssl/ssl_config.h"
9 #include "third_party/boringssl/src/include/openssl/ssl.h"
10 
11 namespace net {
12 
13 SSLServerConfig::SSLServerConfig() = default;
14 
15 SSLServerConfig::SSLServerConfig(const SSLServerConfig& other) = default;
16 
17 SSLServerConfig::~SSLServerConfig() = default;
18 
19 SSLServerConfig::ECHKeysContainer::ECHKeysContainer() = default;
20 
ECHKeysContainer(bssl::UniquePtr<SSL_ECH_KEYS> keys)21 SSLServerConfig::ECHKeysContainer::ECHKeysContainer(
22     bssl::UniquePtr<SSL_ECH_KEYS> keys)
23     : keys_(std::move(keys)) {}
24 
25 SSLServerConfig::ECHKeysContainer::~ECHKeysContainer() = default;
26 
ECHKeysContainer(const SSLServerConfig::ECHKeysContainer & other)27 SSLServerConfig::ECHKeysContainer::ECHKeysContainer(
28     const SSLServerConfig::ECHKeysContainer& other)
29     : keys_(bssl::UpRef(other.keys_)) {}
30 
operator =(const SSLServerConfig::ECHKeysContainer & other)31 SSLServerConfig::ECHKeysContainer& SSLServerConfig::ECHKeysContainer::operator=(
32     const SSLServerConfig::ECHKeysContainer& other) {
33   keys_ = bssl::UpRef(other.keys_);
34   return *this;
35 }
36 
reset(SSL_ECH_KEYS * keys)37 void SSLServerConfig::ECHKeysContainer::reset(SSL_ECH_KEYS* keys) {
38   keys_.reset(keys);
39 }
40 
41 }  // namespace net
42