]> git.kaiwu.me - nginx.git/commitdiff
add OpenSSL_add_all_algorithms(), this fixes the error
authorIgor Sysoev <igor@sysoev.ru>
Wed, 3 Mar 2010 16:23:14 +0000 (16:23 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 3 Mar 2010 16:23:14 +0000 (16:23 +0000)
"ASN1_item_verify:unknown message digest algorithm" occurred if
client certificate is signed using sha256WithRSAEncryption

src/event/ngx_event_openssl.c
src/event/ngx_event_openssl.h

index 134b361f62f9f8222ed273b8a2fa28c9493f4951..4a05444a0d4bbc16d0817ad43ca8d242e417ced7 100644 (file)
@@ -106,6 +106,8 @@ ngx_ssl_init(ngx_log_t *log)
 
     ENGINE_load_builtin_engines();
 
+    OpenSSL_add_all_algorithms();
+
     ngx_ssl_connection_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL);
 
     if (ngx_ssl_connection_index == -1) {
@@ -2315,5 +2317,6 @@ ngx_openssl_engine(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 static void
 ngx_openssl_exit(ngx_cycle_t *cycle)
 {
+    EVP_cleanup();
     ENGINE_cleanup();
 }
index f3b5a2558eec315088caed5d7099188a1216bf57..a8f9d8757fa905707bcf3314395f2491c71c1f7e 100644 (file)
@@ -15,6 +15,7 @@
 #include <openssl/err.h>
 #include <openssl/conf.h>
 #include <openssl/engine.h>
+#include <openssl/evp.h>
 
 #define NGX_SSL_NAME     "OpenSSL"