Mercurial > hg > nginx-vendor-1-0
comparison src/event/ngx_event_openssl.c @ 454:a8424ffa495c NGINX_0_7_39
nginx 0.7.39
*) Bugfix: large response with SSI might hang, if gzipping was enabled;
the bug had appeared in 0.7.28.
Thanks to Artem Bokhan.
*) Bugfix: a segmentation fault might occur in worker process, if short
static variants are used in a "try_files" directive.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 02 Mar 2009 00:00:00 +0300 |
parents | 15a022ee809b |
children | 56baf312c1b5 |
comparison
equal
deleted
inserted
replaced
453:9ef0e36f3cd5 | 454:a8424ffa495c |
---|---|
187 | 187 |
188 ngx_int_t | 188 ngx_int_t |
189 ngx_ssl_certificate(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *cert, | 189 ngx_ssl_certificate(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *cert, |
190 ngx_str_t *key) | 190 ngx_str_t *key) |
191 { | 191 { |
192 if (ngx_conf_full_name(cf->cycle, cert, 1) == NGX_ERROR) { | 192 if (ngx_conf_full_name(cf->cycle, cert, 1) != NGX_OK) { |
193 return NGX_ERROR; | 193 return NGX_ERROR; |
194 } | 194 } |
195 | 195 |
196 if (SSL_CTX_use_certificate_chain_file(ssl->ctx, (char *) cert->data) | 196 if (SSL_CTX_use_certificate_chain_file(ssl->ctx, (char *) cert->data) |
197 == 0) | 197 == 0) |
200 "SSL_CTX_use_certificate_chain_file(\"%s\") failed", | 200 "SSL_CTX_use_certificate_chain_file(\"%s\") failed", |
201 cert->data); | 201 cert->data); |
202 return NGX_ERROR; | 202 return NGX_ERROR; |
203 } | 203 } |
204 | 204 |
205 if (ngx_conf_full_name(cf->cycle, key, 1) == NGX_ERROR) { | 205 if (ngx_conf_full_name(cf->cycle, key, 1) != NGX_OK) { |
206 return NGX_ERROR; | 206 return NGX_ERROR; |
207 } | 207 } |
208 | 208 |
209 if (SSL_CTX_use_PrivateKey_file(ssl->ctx, (char *) key->data, | 209 if (SSL_CTX_use_PrivateKey_file(ssl->ctx, (char *) key->data, |
210 SSL_FILETYPE_PEM) | 210 SSL_FILETYPE_PEM) |
231 | 231 |
232 if (cert->len == 0) { | 232 if (cert->len == 0) { |
233 return NGX_OK; | 233 return NGX_OK; |
234 } | 234 } |
235 | 235 |
236 if (ngx_conf_full_name(cf->cycle, cert, 1) == NGX_ERROR) { | 236 if (ngx_conf_full_name(cf->cycle, cert, 1) != NGX_OK) { |
237 return NGX_ERROR; | 237 return NGX_ERROR; |
238 } | 238 } |
239 | 239 |
240 if (SSL_CTX_load_verify_locations(ssl->ctx, (char *) cert->data, NULL) | 240 if (SSL_CTX_load_verify_locations(ssl->ctx, (char *) cert->data, NULL) |
241 == 0) | 241 == 0) |
389 DH_free(dh); | 389 DH_free(dh); |
390 | 390 |
391 return NGX_OK; | 391 return NGX_OK; |
392 } | 392 } |
393 | 393 |
394 if (ngx_conf_full_name(cf->cycle, file, 1) == NGX_ERROR) { | 394 if (ngx_conf_full_name(cf->cycle, file, 1) != NGX_OK) { |
395 return NGX_ERROR; | 395 return NGX_ERROR; |
396 } | 396 } |
397 | 397 |
398 bio = BIO_new_file((char *) file->data, "r"); | 398 bio = BIO_new_file((char *) file->data, "r"); |
399 if (bio == NULL) { | 399 if (bio == NULL) { |