comparison src/event/ngx_event_openssl_stapling.c @ 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 e3723f2a11b7
children dbebbb25ae92
comparison
equal deleted inserted replaced
7484:65074e13f171 7485:edf5cd6c56fa
225 225
226 if (ngx_conf_full_name(cf->cycle, file, 1) != NGX_OK) { 226 if (ngx_conf_full_name(cf->cycle, file, 1) != NGX_OK) {
227 return NGX_ERROR; 227 return NGX_ERROR;
228 } 228 }
229 229
230 bio = BIO_new_file((char *) file->data, "r"); 230 bio = BIO_new_file((char *) file->data, "rb");
231 if (bio == NULL) { 231 if (bio == NULL) {
232 ngx_ssl_error(NGX_LOG_EMERG, ssl->log, 0, 232 ngx_ssl_error(NGX_LOG_EMERG, ssl->log, 0,
233 "BIO_new_file(\"%s\") failed", file->data); 233 "BIO_new_file(\"%s\") failed", file->data);
234 return NGX_ERROR; 234 return NGX_ERROR;
235 } 235 }