# HG changeset patch # User Sergey Kandaurov # Date 1554294939 -10800 # Node ID edf5cd6c56fada9f97b53a7a32f63000e308eac5 # Parent 65074e13f1716e09c28d730586babad7930b7a98 OCSP stapling: open ssl_stapling_file in binary-mode. OCSP response uses the DER format and as such needs to be opened in binary-mode. This only has any effect under Win32. diff --git a/src/event/ngx_event_openssl_stapling.c b/src/event/ngx_event_openssl_stapling.c --- a/src/event/ngx_event_openssl_stapling.c +++ b/src/event/ngx_event_openssl_stapling.c @@ -227,7 +227,7 @@ ngx_ssl_stapling_file(ngx_conf_t *cf, ng return NGX_ERROR; } - bio = BIO_new_file((char *) file->data, "r"); + bio = BIO_new_file((char *) file->data, "rb"); if (bio == NULL) { ngx_ssl_error(NGX_LOG_EMERG, ssl->log, 0, "BIO_new_file(\"%s\") failed", file->data);