Fossil SCM

Replaced a call to SSL_CTX_use_certificate_file() with SSL_CTX_use_certificate_chain_file(), per [forum:054f637e002683e3| forum post 054f637e002683e3].

stephan 2022-01-10 07:16 trunk
Commit 82c62e5f8dcef6057f6ac02207c9f6be897500564b8f8c3891a833e6625dd8aa
1 file changed +1 -1
+1 -1
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -714,11 +714,11 @@
714714
if( sslCtx==0 ){
715715
ERR_print_errors_fp(stderr);
716716
fossil_fatal("Error initializing the SSL server");
717717
}
718718
if( zCertFile && zCertFile[0] ){
719
- if( SSL_CTX_use_certificate_file(sslCtx,zCertFile,SSL_FILETYPE_PEM)<=0 ){
719
+ if( SSL_CTX_use_certificate_chain_file(sslCtx,zCertFile)!=1 ){
720720
ERR_print_errors_fp(stderr);
721721
fossil_fatal("Error loading CERT file \"%s\"", zCertFile);
722722
}
723723
if( zKeyFile==0 ) zKeyFile = zCertFile;
724724
if( SSL_CTX_use_PrivateKey_file(sslCtx, zKeyFile, SSL_FILETYPE_PEM)<=0 ){
725725
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -714,11 +714,11 @@
714 if( sslCtx==0 ){
715 ERR_print_errors_fp(stderr);
716 fossil_fatal("Error initializing the SSL server");
717 }
718 if( zCertFile && zCertFile[0] ){
719 if( SSL_CTX_use_certificate_file(sslCtx,zCertFile,SSL_FILETYPE_PEM)<=0 ){
720 ERR_print_errors_fp(stderr);
721 fossil_fatal("Error loading CERT file \"%s\"", zCertFile);
722 }
723 if( zKeyFile==0 ) zKeyFile = zCertFile;
724 if( SSL_CTX_use_PrivateKey_file(sslCtx, zKeyFile, SSL_FILETYPE_PEM)<=0 ){
725
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -714,11 +714,11 @@
714 if( sslCtx==0 ){
715 ERR_print_errors_fp(stderr);
716 fossil_fatal("Error initializing the SSL server");
717 }
718 if( zCertFile && zCertFile[0] ){
719 if( SSL_CTX_use_certificate_chain_file(sslCtx,zCertFile)!=1 ){
720 ERR_print_errors_fp(stderr);
721 fossil_fatal("Error loading CERT file \"%s\"", zCertFile);
722 }
723 if( zKeyFile==0 ) zKeyFile = zCertFile;
724 if( SSL_CTX_use_PrivateKey_file(sslCtx, zKeyFile, SSL_FILETYPE_PEM)<=0 ){
725

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button