From 1ff5a07a1f8ceb7f26548b03f0a3d3a420f6e07b Mon Sep 17 00:00:00 2001 From: "Simon V. Lejel" Date: Mon, 12 Feb 2024 17:57:40 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A1=20Expolain=20what=20happens=20when?= =?UTF-8?q?=20cert=20files=20are=20loaded?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/main.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/main.cc b/src/server/main.cc index f3031da..cb9f775 100644 --- a/src/server/main.cc +++ b/src/server/main.cc @@ -59,13 +59,15 @@ int main() { cout << "Creation of SSL context failed: " << getCtxError() << endl; } - // Load certificate + // Load certificate into the context + // Returns 1 on success, otherwise check error stack if (SSL_CTX_use_certificate_file(ctx, "./ssl/server.crt", SSL_FILETYPE_PEM) <= 0) { cout << "Certificate load failed: " << getCtxError() << endl; } - // Load certificate private key + // Load certificate private key into the context + // Returns 1 on success, otherwise check error stack if (SSL_CTX_use_PrivateKey_file(ctx, "./ssl/server.key", SSL_FILETYPE_PEM) <= 0) { cout << "Private key load failed: " << getCtxError() << endl;