MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
tls.hpp
Go to the documentation of this file.
1// Copyright 2009-present MongoDB, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <mongocxx/v1/tls-fwd.hpp> // IWYU pragma: export
18
19//
20
22
25
27
28#include <string>
29
30namespace mongocxx {
31namespace v1 {
32
48class tls {
49 private:
50 class impl;
51 void* _impl;
52
53 public:
60
67 MONGOCXX_ABI_EXPORT_CDECL() tls(tls&& other) noexcept;
68
75 MONGOCXX_ABI_EXPORT_CDECL(tls&) operator=(tls&& other) noexcept;
76
81
85 MONGOCXX_ABI_EXPORT_CDECL(tls&) operator=(tls const& other);
86
94
99
103 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::stdx::string_view>) pem_file() const;
104
109
113 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::stdx::string_view>) pem_password() const;
114
119
123 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::stdx::string_view>) ca_file() const;
124
129
133 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::stdx::string_view>) ca_dir() const;
134
139
143 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::stdx::string_view>) crl_file() const;
144
149
154
155 class internal;
156};
157
158} // namespace v1
159} // namespace mongocxx
160
161#include <mongocxx/v1/detail/postlude.hpp>
162
tls & ca_file(std::string v)
Set the "ca_file" field.
~tls()
Destroy this object.
tls & allow_invalid_certificates(bool v)
Set the "weak_cert_validation" field.
tls & crl_file(std::string v)
Set the "crl_file" field.
tls & ca_dir(std::string v)
Set the "ca_dir" field.
tls & pem_file(std::string v)
Set the "pem_file" field.
tls(tls &&other) noexcept
Move constructor.
tls & pem_password(std::string v)
Set the "pem_pwd" field.
Provides macros to control the set of symbols exported in the ABI.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v1 macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
Declares entities whose ABI stability is guaranteed for documented symbols.
The top-level namespace within which all mongocxx library entities are declared.
Provides std::optional-related polyfills for library API usage.
Provides std::string_view-related polyfills for library API usage.
Declares mongocxx::v1::tls.