Welcome! Log In Create A New Profile

Advanced

avoid crash in case of plain http

Robert
May 11, 2011 06:06AM
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
index 0527c9c..822d7ba 100644
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -2198,8 +2198,7 @@ ngx_ssl_get_serial_number(ngx_connection_t *c,
ngx_pool_t *pool, ngx_str_t *s)

s->len = 0;

- cert = SSL_get_peer_certificate(c->ssl->connection);
- if (cert == NULL) {
+ if ( NULL == c->ssl || NULL == ( cert =
SSL_get_peer_certificate(c->ssl->connection))) {
return NGX_OK;
}


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

avoid crash in case of plain http

Robert 1586 May 11, 2011 06:06AM

Re: avoid crash in case of plain http

Igor Sysoev 774 May 11, 2011 06:10AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 98
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready