Archived
1
0
Fork 0

🐛 Fix certificate errors

This commit is contained in:
Simon V. Lejel 2024-02-11 22:36:58 +01:00
parent 8031543062
commit 23093b1505
Signed by: sl
GPG key ID: 6544A0430A2CFFAD
2 changed files with 6 additions and 8 deletions

View file

@ -36,8 +36,8 @@ int main() {
// Load the server's certificate into context
if (SSL_CTX_load_verify_locations(
ctx, "~/git/mogens_og_karen/ssl/server.crt", nullptr) <= 0) {
// TODO Handle error
ctx, "./ssl/server.crt", nullptr) <= 0) {
cout << "SSL load failed" << endl;
}
// Create SSL object
@ -81,7 +81,7 @@ int main() {
cout << endl;
message.username = "Client 1";
SSL_write(ssl, message.toString().data(), 0);
SSL_write(ssl, message.toString().data(), strlen(message.toString().data()));
}
// Clean up