Error handling on SSL_new and SSL_connect

This commit is contained in:
Mark Janssen -- Sig-I/O Automatisering 2021-01-28 22:55:15 +01:00
parent ab33f01fbd
commit 69c48599e4
No known key found for this signature in database
GPG key ID: D8674D8FC4F69BD2
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Changed to proxytunnel 1.10.20210128 -- Thu 28 Jan 2021 10:23:24 PM CET
- Changed version to 1.10.20210128
- Applied 2 more debian patches by Julian Gilbey <jdg@debian.org>
- Error handling on SSL_new / SSL_connect
Changes to proxytunnel 1.10.20200507 -- Thu 07 May 2020 05:13:01 PM CEST
- Applied 3 patches from debian's package

View file

@ -309,6 +309,10 @@ int stream_enable_ssl(PTSTREAM *pts, const char *proxy_arg) {
}
ssl = SSL_new (ctx);
if ( ssl == NULL ) {
message("SSL_new failed\n");
goto fail;
}
SSL_set_rfd (ssl, stream_get_incoming_fd(pts));
SSL_set_wfd (ssl, stream_get_outgoing_fd(pts));
@ -334,7 +338,10 @@ int stream_enable_ssl(PTSTREAM *pts, const char *proxy_arg) {
exit( 1 );
}
SSL_connect (ssl);
if ( SSL_connect (ssl) <= 0) {
message( "SSL_connect failed\n");
goto fail;
}
if ( !args_info.no_check_cert_flag ) {
/* Make sure peer presented a certificate */