Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159335524
D55098.id171406.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55098.id171406.diff
View Options
diff --git a/lib/libfetch/common.h b/lib/libfetch/common.h
--- a/lib/libfetch/common.h
+++ b/lib/libfetch/common.h
@@ -56,7 +56,6 @@
SSL *ssl; /* SSL handle */
SSL_CTX *ssl_ctx; /* SSL context */
X509 *ssl_cert; /* server certificate */
- const SSL_METHOD *ssl_meth; /* SSL method */
#endif
int ref; /* reference count */
};
diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c
--- a/lib/libfetch/common.c
+++ b/lib/libfetch/common.c
@@ -1182,8 +1182,11 @@
X509_NAME *name;
char *str;
- conn->ssl_meth = SSLv23_client_method();
- conn->ssl_ctx = SSL_CTX_new(conn->ssl_meth);
+ if ((conn->ssl_ctx = SSL_CTX_new(TLS_client_method())) == NULL) {
+ fprintf(stderr, "SSL context creation failed\n");
+ ERR_print_errors_fp(stderr);
+ return (-1);
+ }
SSL_CTX_set_mode(conn->ssl_ctx, SSL_MODE_AUTO_RETRY);
fetch_ssl_setup_transport_layer(conn->ssl_ctx, verbose);
@@ -1194,7 +1197,8 @@
conn->ssl = SSL_new(conn->ssl_ctx);
if (conn->ssl == NULL) {
- fprintf(stderr, "SSL context creation failed\n");
+ fprintf(stderr, "SSL connection creation failed\n");
+ ERR_print_errors_fp(stderr);
return (-1);
}
SSL_set_fd(conn->ssl, conn->sd);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 13, 11:52 PM (4 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33936509
Default Alt Text
D55098.id171406.diff (1 KB)
Attached To
Mode
D55098: libfetch: Check for failure to create SSL context
Attached
Detach File
Event Timeline
Log In to Comment