comparison src/event/ngx_event_openssl.c @ 382:984bb0b1399b NGINX_0_7_3

nginx 0.7.3 *) Change: the "rss" extension MIME type has been changed to "application/rss+xml". *) Change: now the "gzip_vary" directive turned on issues a "Vary: Accept-Encoding" header line for uncompressed responses too. *) Feature: now the "rewrite" directive does a redirect automatically if the "https://" protocol is used. *) Bugfix: the "proxy_pass" directive did not work with the HTTPS protocol; the bug had appeared in 0.6.9.
author Igor Sysoev <http://sysoev.ru>
date Mon, 23 Jun 2008 00:00:00 +0400
parents bc21d9cd9c54
children 0b6053502c55
comparison
equal deleted inserted replaced
381:23d1555141d9 382:984bb0b1399b
672 672
673 continue; 673 continue;
674 } 674 }
675 675
676 if (bytes) { 676 if (bytes) {
677
678 if (n == 0 || n == NGX_ERROR) {
679 c->read->ready = 1;
680 }
681
677 return bytes; 682 return bytes;
678 } 683 }
679 684
680 return n; 685 return n;
681 } 686 }
1905 } 1910 }
1906 1911
1907 len = BIO_pending(bio); 1912 len = BIO_pending(bio);
1908 s->len = len; 1913 s->len = len;
1909 1914
1910 s->data = ngx_palloc(pool, len); 1915 s->data = ngx_pnalloc(pool, len);
1911 if (s->data == NULL) { 1916 if (s->data == NULL) {
1912 goto failed; 1917 goto failed;
1913 } 1918 }
1914 1919
1915 BIO_read(bio, s->data, len); 1920 BIO_read(bio, s->data, len);
1952 p = X509_NAME_oneline(name, NULL, 0); 1957 p = X509_NAME_oneline(name, NULL, 0);
1953 1958
1954 for (len = 0; p[len]; len++) { /* void */ } 1959 for (len = 0; p[len]; len++) { /* void */ }
1955 1960
1956 s->len = len; 1961 s->len = len;
1957 s->data = ngx_palloc(pool, len); 1962 s->data = ngx_pnalloc(pool, len);
1958 if (s->data == NULL) { 1963 if (s->data == NULL) {
1959 OPENSSL_free(p); 1964 OPENSSL_free(p);
1960 X509_free(cert); 1965 X509_free(cert);
1961 return NGX_ERROR; 1966 return NGX_ERROR;
1962 } 1967 }
1994 p = X509_NAME_oneline(name, NULL, 0); 1999 p = X509_NAME_oneline(name, NULL, 0);
1995 2000
1996 for (len = 0; p[len]; len++) { /* void */ } 2001 for (len = 0; p[len]; len++) { /* void */ }
1997 2002
1998 s->len = len; 2003 s->len = len;
1999 s->data = ngx_palloc(pool, len); 2004 s->data = ngx_pnalloc(pool, len);
2000 if (s->data == NULL) { 2005 if (s->data == NULL) {
2001 OPENSSL_free(p); 2006 OPENSSL_free(p);
2002 X509_free(cert); 2007 X509_free(cert);
2003 return NGX_ERROR; 2008 return NGX_ERROR;
2004 } 2009 }
2034 2039
2035 i2a_ASN1_INTEGER(bio, X509_get_serialNumber(cert)); 2040 i2a_ASN1_INTEGER(bio, X509_get_serialNumber(cert));
2036 len = BIO_pending(bio); 2041 len = BIO_pending(bio);
2037 2042
2038 s->len = len; 2043 s->len = len;
2039 s->data = ngx_palloc(pool, len); 2044 s->data = ngx_pnalloc(pool, len);
2040 if (s->data == NULL) { 2045 if (s->data == NULL) {
2041 BIO_free(bio); 2046 BIO_free(bio);
2042 X509_free(cert); 2047 X509_free(cert);
2043 return NGX_ERROR; 2048 return NGX_ERROR;
2044 } 2049 }