[PATCH] SSL: fix call to BIO_get_mem_data()

Maxim Dounin mdounin at mdounin.ru
Wed Dec 14 17:17:27 UTC 2016


Hello!

On Tue, Dec 13, 2016 at 02:20:40PM -0800, Piotr Sikora via nginx-devel wrote:

> # HG changeset patch
> # User Piotr Sikora <piotrsikora at google.com>
> # Date 1481667570 28800
> #      Tue Dec 13 14:19:30 2016 -0800
> # Node ID c0b6eef901895a4790db1e62d2822651977399a4
> # Parent  25a64c864f4d31761eb42d39cda8b0e80277816d
> SSL: fix call to BIO_get_mem_data().
> 
> Fixes build with BoringSSL.
> 
> Signed-off-by: Piotr Sikora <piotrsikora at google.com>
> 
> diff -r 25a64c864f4d -r c0b6eef90189 src/event/ngx_event_openssl.c
> --- a/src/event/ngx_event_openssl.c
> +++ b/src/event/ngx_event_openssl.c
> @@ -4069,7 +4069,7 @@ ngx_ssl_parse_time(
>  
>      BIO_write(bio, "Tue ", sizeof("Tue ") - 1);
>      ASN1_TIME_print(bio, asn1time);
> -    len = BIO_get_mem_data(bio, &value);
> +    len = BIO_get_mem_data(bio, (char **) &value);
>  
>      time = ngx_parse_http_time(value, len);
>  

If the goal is to fix the call, shouldn't identical one in 
src/event/ngx_event_openssl_stapling.c be fixed as well?

-- 
Maxim Dounin
http://nginx.org/


More information about the nginx-devel mailing list