comparison src/event/ngx_event_openssl.c @ 1352:e958b3cab51a

--sysconfdir=DIR
author Igor Sysoev <igor@sysoev.ru>
date Sun, 29 Jul 2007 18:05:45 +0000
parents e5a3800c35cc
children f69d1aab6a0f
comparison
equal deleted inserted replaced
1351:9ca095d36863 1352:e958b3cab51a
196 196
197 ngx_int_t 197 ngx_int_t
198 ngx_ssl_certificate(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *cert, 198 ngx_ssl_certificate(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *cert,
199 ngx_str_t *key) 199 ngx_str_t *key)
200 { 200 {
201 if (ngx_conf_full_name(cf->cycle, cert) == NGX_ERROR) { 201 if (ngx_conf_full_name(cf->cycle, cert, 1) == NGX_ERROR) {
202 return NGX_ERROR; 202 return NGX_ERROR;
203 } 203 }
204 204
205 if (SSL_CTX_use_certificate_chain_file(ssl->ctx, (char *) cert->data) 205 if (SSL_CTX_use_certificate_chain_file(ssl->ctx, (char *) cert->data)
206 == 0) 206 == 0)
209 "SSL_CTX_use_certificate_chain_file(\"%s\") failed", 209 "SSL_CTX_use_certificate_chain_file(\"%s\") failed",
210 cert->data); 210 cert->data);
211 return NGX_ERROR; 211 return NGX_ERROR;
212 } 212 }
213 213
214 if (ngx_conf_full_name(cf->cycle, key) == NGX_ERROR) { 214 if (ngx_conf_full_name(cf->cycle, key, 1) == NGX_ERROR) {
215 return NGX_ERROR; 215 return NGX_ERROR;
216 } 216 }
217 217
218 if (SSL_CTX_use_PrivateKey_file(ssl->ctx, (char *) key->data, 218 if (SSL_CTX_use_PrivateKey_file(ssl->ctx, (char *) key->data,
219 SSL_FILETYPE_PEM) 219 SSL_FILETYPE_PEM)
240 240
241 if (cert->len == 0) { 241 if (cert->len == 0) {
242 return NGX_OK; 242 return NGX_OK;
243 } 243 }
244 244
245 if (ngx_conf_full_name(cf->cycle, cert) == NGX_ERROR) { 245 if (ngx_conf_full_name(cf->cycle, cert, 1) == NGX_ERROR) {
246 return NGX_ERROR; 246 return NGX_ERROR;
247 } 247 }
248 248
249 if (SSL_CTX_load_verify_locations(ssl->ctx, (char *) cert->data, NULL) 249 if (SSL_CTX_load_verify_locations(ssl->ctx, (char *) cert->data, NULL)
250 == 0) 250 == 0)