🚧 Print errors
This commit is contained in:
parent
23093b1505
commit
cba0ae1da3
2 changed files with 24 additions and 12 deletions
|
@ -31,7 +31,7 @@ int main() {
|
|||
// Create new SSL context
|
||||
SSL_CTX *ctx = SSL_CTX_new(TLS_client_method());
|
||||
if (!ctx) {
|
||||
// TODO Handle error
|
||||
cout << "Creation of SSL context failed" << endl;
|
||||
}
|
||||
|
||||
// Load the server's certificate into context
|
||||
|
@ -43,7 +43,7 @@ int main() {
|
|||
// Create SSL object
|
||||
SSL *ssl = SSL_new(ctx);
|
||||
if (!ssl) {
|
||||
// TODO Handle error
|
||||
cout << "Failed to create SSL object" << endl;
|
||||
}
|
||||
|
||||
int clientSocket = socket(AF_INET, SOCK_STREAM, 0);
|
||||
|
@ -65,7 +65,7 @@ int main() {
|
|||
|
||||
// Perform SSL handshake
|
||||
if (SSL_connect(ssl) != 1) {
|
||||
// TODO Handle error
|
||||
cout << "SSL Handshake error" << endl;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
|
|
Reference in a new issue