MCPcopy Create free account
hub / github.com/SFML/SFML / setupTlsServer

Method setupTlsServer

src/SFML/Network/TcpSocket.cpp:1017–1040  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1015
1016////////////////////////////////////////////////////////////
1017TcpSocket::TlsStatus TcpSocket::setupTlsServer(
1018 const std::byte* certificateChainData,
1019 std::size_t certificateChainSize,
1020 const std::byte* privateKeyData,
1021 std::size_t privateKeySize,
1022 const std::byte* privateKeyPasswordData,
1023 std::size_t privateKeyPasswordSize)
1024{
1025 assert(certificateChainData != nullptr && certificateChainSize > 0 && "Certificate chain data not valid");
1026 assert(privateKeyData != nullptr && privateKeySize > 0 && "Private key data not valid");
1027
1028 if (certificateChainData == nullptr || certificateChainSize == 0 || privateKeyData == nullptr || privateKeySize == 0)
1029 return TlsStatus::Error;
1030
1031 return m_impl->setupTls(*this,
1032 {},
1033 false,
1034 certificateChainData,
1035 certificateChainSize,
1036 privateKeyData,
1037 privateKeySize,
1038 privateKeyPasswordData,
1039 privateKeyPasswordSize);
1040}
1041
1042
1043////////////////////////////////////////////////////////////

Callers 3

TcpSocket.test.cppFile · 0.80
runTcpServerFunction · 0.80

Calls 1

setupTlsMethod · 0.80

Tested by

no test coverage detected