Loading...
Searching...
No Matches
mongocxx::v1::tls Class Reference

`#include <mongocxx/v1/tls.hpp>`

## Description

Options related to TLS configuration.

Supported fields include:

- allow_invalid_certificates ("weak_cert_validation")
- ca_dir
- ca_file
- crl_file
- pem_file
- pem_password ("pem_pwd")

See also
  - mongoc_ssl_opt_t (mongoc)
  - TLS/SSL (Transport Encryption) (MongoDB Manual)

## Public Member Functions

| tls ()
| Default initialization.
| tls (tls &&other) noexcept
| Move constructor.
| tls (tls const &other)
| Copy construction.
| ~tls ()
| Destroy this object.
bsoncxx::v1::stdx::optional< bool > | allow_invalid_certificates () const
| Return the current "weak_cert_validation" field.
tls & | allow_invalid_certificates (bool v)
| Set the "weak_cert_validation" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > | ca_dir () const
| Return the current "ca_dir" field.
tls & | ca_dir (std::string v)
| Set the "ca_dir" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > | ca_file () const
| Retur the current "ca_file" field.
tls & | ca_file (std::string v)
| Set the "ca_file" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > | crl_file () const
| Return the current "crl_file" field.
tls & | crl_file (std::string v)
| Set the "crl_file" field.
tls & | operator= (tls &&other) noexcept
| Move assignment.
tls & | operator= (tls const &other)
| Copy assignment.
bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > | pem_file () const
| Return the current "pem_file" field.
tls & | pem_file (std::string v)
| Set the "pem_file" field.
bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > | pem_password () const
| Return the current "pem_pwd" field.
tls & | pem_password (std::string v)
| Set the "pem_pwd" field.

## Constructor & Destructor Documentation

## ~tls()

mongocxx::v1::tls::~tls | ( |  | ) |

Destroy this object.

Warning
  Invalidates all associated views.

## tls() [1/3]

mongocxx::v1::tls::tls | ( | tls && | other | ) |

noexcept

Move constructor.

Postconditions:
  - other is in an assign-or-destroy-only state.

## tls() [2/3]

mongocxx::v1::tls::tls | ( | tls const & | other | ) |

Copy construction.

## tls() [3/3]

mongocxx::v1::tls::tls | ( |  | ) |

Default initialization.

Postconditions:
  - All supported fields are "unset" or zero-initialized.

## Member Function Documentation

## allow_invalid_certificates() [1/2]

bsoncxx::v1::stdx::optional< bool > mongocxx::v1::tls::allow_invalid_certificates | ( |  | ) | const

Return the current "weak_cert_validation" field.

## allow_invalid_certificates() [2/2]

tls & mongocxx::v1::tls::allow_invalid_certificates | ( | bool | v | ) |

Set the "weak_cert_validation" field.

## ca_dir() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > mongocxx::v1::tls::ca_dir | ( |  | ) | const

Return the current "ca_dir" field.

## ca_dir() [2/2]

tls & mongocxx::v1::tls::ca_dir | ( | std::string | v | ) |

Set the "ca_dir" field.

## ca_file() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > mongocxx::v1::tls::ca_file | ( |  | ) | const

Retur the current "ca_file" field.

## ca_file() [2/2]

tls & mongocxx::v1::tls::ca_file | ( | std::string | v | ) |

Set the "ca_file" field.

## crl_file() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > mongocxx::v1::tls::crl_file | ( |  | ) | const

Return the current "crl_file" field.

## crl_file() [2/2]

tls & mongocxx::v1::tls::crl_file | ( | std::string | v | ) |

Set the "crl_file" field.

## operator=() [1/2]

tls & mongocxx::v1::tls::operator= | ( | tls && | other | ) |

noexcept

Move assignment.

Postconditions:
  - other is in an assign-or-destroy-only state.

## operator=() [2/2]

tls & mongocxx::v1::tls::operator= | ( | tls const & | other | ) |

Copy assignment.

## pem_file() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > mongocxx::v1::tls::pem_file | ( |  | ) | const

Return the current "pem_file" field.

## pem_file() [2/2]

tls & mongocxx::v1::tls::pem_file | ( | std::string | v | ) |

Set the "pem_file" field.

## pem_password() [1/2]

bsoncxx::v1::stdx::optional< bsoncxx::v1::stdx::string_view > mongocxx::v1::tls::pem_password | ( |  | ) | const

Return the current "pem_pwd" field.

## pem_password() [2/2]

tls & mongocxx::v1::tls::pem_password | ( | std::string | v | ) |

Set the "pem_pwd" field.

The documentation for this class was generated from the following file:

- mongocxx/v1/tls.hpp