changeset 7485:edf5cd6c56fa

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.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 03 Apr 2019 15:35:39 +0300
parents 65074e13f171
children 52d3600bc25e
files src/event/ngx_event_openssl_stapling.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);