Skip to content

Commit

Permalink
OCSP stapling: open ssl_stapling_file in binary-mode.
Browse files Browse the repository at this point in the history
OCSP response uses the DER format and as such needs to be opened in binary-mode.
This only has any effect under Win32.
  • Loading branch information
pluknet committed Apr 3, 2019
1 parent 52d9da8 commit db5c307
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/event/ngx_event_openssl_stapling.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ ngx_ssl_stapling_file(ngx_conf_t *cf, ngx_ssl_t *ssl,
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);
Expand Down

0 comments on commit db5c307

Please sign in to comment.