comparison src/event/ngx_event_openssl.c @ 108:cf3d6edb3ad6 NGINX_0_3_1

nginx 0.3.1 *) Bugfix: the segmentation fault occurred when the signal queue overflowed if the "rtsig" method was used; bug appeared in 0.2.0. *) Change: correct handling of the "\\", "\"", "\'", and "\$" pairs in SSI.
author Igor Sysoev <http://sysoev.ru>
date Mon, 10 Oct 2005 00:00:00 +0400
parents 8bf57caa374a
children 408f195b3482
comparison
equal deleted inserted replaced
107:495d867e35e8 108:cf3d6edb3ad6
142 142
143 143
144 ngx_int_t 144 ngx_int_t
145 ngx_ssl_generate_rsa512_key(ngx_ssl_t *ssl) 145 ngx_ssl_generate_rsa512_key(ngx_ssl_t *ssl)
146 { 146 {
147 if (SSL_CTX_need_tmp_RSA(ssl->ctx) == 0) {
148 return NGX_OK;
149 }
150
147 ssl->rsa512_key = RSA_generate_key(512, RSA_F4, NULL, NULL); 151 ssl->rsa512_key = RSA_generate_key(512, RSA_F4, NULL, NULL);
148 152
149 if (ssl->rsa512_key) { 153 if (ssl->rsa512_key) {
150 SSL_CTX_set_tmp_rsa(ssl->ctx, ssl->rsa512_key); 154 SSL_CTX_set_tmp_rsa(ssl->ctx, ssl->rsa512_key);
151 return NGX_OK; 155 return NGX_OK;
849 void 853 void
850 ngx_ssl_cleanup_ctx(void *data) 854 ngx_ssl_cleanup_ctx(void *data)
851 { 855 {
852 ngx_ssl_t *ssl = data; 856 ngx_ssl_t *ssl = data;
853 857
854 RSA_free(ssl->rsa512_key); 858 if (ssl->rsa512_key) {
859 RSA_free(ssl->rsa512_key);
860 }
861
855 SSL_CTX_free(ssl->ctx); 862 SSL_CTX_free(ssl->ctx);
856 } 863 }
857 864
858 865
859 static void * 866 static void *