712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
|
OpenSSL_add_all_algorithms();
sslCtx = SSL_CTX_new(SSLv23_server_method());
if( sslCtx==0 ){
ERR_print_errors_fp(stderr);
fossil_fatal("Error initializing the SSL server");
}
if( zCertFile && zCertFile[0] ){
if( SSL_CTX_use_certificate_file(sslCtx,zCertFile,SSL_FILETYPE_PEM)<=0 ){
ERR_print_errors_fp(stderr);
fossil_fatal("Error loading CERT file \"%s\"", zCertFile);
}
if( zKeyFile==0 ) zKeyFile = zCertFile;
if( SSL_CTX_use_PrivateKey_file(sslCtx, zKeyFile, SSL_FILETYPE_PEM)<=0 ){
ERR_print_errors_fp(stderr);
fossil_fatal("Error loading PRIVATE KEY from file \"%s\"", zKeyFile);
|
|
|
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
|
OpenSSL_add_all_algorithms();
sslCtx = SSL_CTX_new(SSLv23_server_method());
if( sslCtx==0 ){
ERR_print_errors_fp(stderr);
fossil_fatal("Error initializing the SSL server");
}
if( zCertFile && zCertFile[0] ){
if( SSL_CTX_use_certificate_chain_file(sslCtx,zCertFile)!=1 ){
ERR_print_errors_fp(stderr);
fossil_fatal("Error loading CERT file \"%s\"", zCertFile);
}
if( zKeyFile==0 ) zKeyFile = zCertFile;
if( SSL_CTX_use_PrivateKey_file(sslCtx, zKeyFile, SSL_FILETYPE_PEM)<=0 ){
ERR_print_errors_fp(stderr);
fossil_fatal("Error loading PRIVATE KEY from file \"%s\"", zKeyFile);
|