summaryrefslogtreecommitdiffstats
path: root/src/Bindings/ManualBindings_Network.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2023-05-09 19:59:15 +0200
committerMattes D <github@xoft.cz>2023-05-19 16:25:12 +0200
commit97c49c6f294a0b7e931be2692c124bd78fc79946 (patch)
tree872fcdfbfc30ff0ed2e2e444bb965769ea147e60 /src/Bindings/ManualBindings_Network.cpp
parentcTCPLink: Use the original connection hostname for SNI. (diff)
downloadcuberite-97c49c6f294a0b7e931be2692c124bd78fc79946.tar
cuberite-97c49c6f294a0b7e931be2692c124bd78fc79946.tar.gz
cuberite-97c49c6f294a0b7e931be2692c124bd78fc79946.tar.bz2
cuberite-97c49c6f294a0b7e931be2692c124bd78fc79946.tar.lz
cuberite-97c49c6f294a0b7e931be2692c124bd78fc79946.tar.xz
cuberite-97c49c6f294a0b7e931be2692c124bd78fc79946.tar.zst
cuberite-97c49c6f294a0b7e931be2692c124bd78fc79946.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/ManualBindings_Network.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Bindings/ManualBindings_Network.cpp b/src/Bindings/ManualBindings_Network.cpp
index 67385cce6..c184821e9 100644
--- a/src/Bindings/ManualBindings_Network.cpp
+++ b/src/Bindings/ManualBindings_Network.cpp
@@ -546,7 +546,7 @@ static int tolua_cTCPLink_Shutdown(lua_State * L)
static int tolua_cTCPLink_StartTLSClient(lua_State * L)
{
// Function signature:
- // LinkInstance:StartTLSClient(OwnCert, OwnPrivKey, OwnPrivKeyPassword) -> [true] or [nil, ErrMsg]
+ // LinkInstance:StartTLSClient(OwnCert, OwnPrivKey, OwnPrivKeyPassword, TrustedRootCAs) -> [true] or [nil, ErrMsg]
// Get the link:
cLuaState S(L);
@@ -558,11 +558,11 @@ static int tolua_cTCPLink_StartTLSClient(lua_State * L)
ASSERT(Link != nullptr); // Checked by CheckParamSelf()
// Read the (optional) params:
- AString OwnCert, OwnPrivKey, OwnPrivKeyPassword;
- S.GetStackValues(2, OwnCert, OwnPrivKey, OwnPrivKeyPassword);
+ AString OwnCert, OwnPrivKey, OwnPrivKeyPassword, TrustedRootCAs;
+ S.GetStackValues(2, OwnCert, OwnPrivKey, OwnPrivKeyPassword, cLuaState::cOptionalParam<std::string>(TrustedRootCAs));
// Start the TLS handshake:
- AString res = Link->StartTLSClient(OwnCert, OwnPrivKey, OwnPrivKeyPassword);
+ AString res = Link->StartTLSClient(OwnCert, OwnPrivKey, OwnPrivKeyPassword, TrustedRootCAs);
if (!res.empty())
{
S.Push(cLuaState::Nil, fmt::format(