diff options
author | Rich Salz <rsalz@akamai.com> | 2016-02-25 00:56:35 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-02-25 11:57:42 -0500 |
commit | 5d3222876e7cbd8bf87fb3b9c951cba3c9be08eb (patch) | |
tree | 2cee29f363e8e3afc30640598c41e6eae12a53f5 /apps/apps.c | |
parent | f2adbd85ddb86e508efe84a85fb7a01aad4ea47a (diff) |
GH463: Fix OPENSSL_NO_OCSP build
Fixes github issue 463. Building the app without OPENSSL_NO_SOCK
isn't supported, so only do OPENSSL_NO_OCSP.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'apps/apps.c')
-rw-r--r-- | apps/apps.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/apps.c b/apps/apps.c index 34fd3914cd..5ad090a44c 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -627,7 +627,8 @@ static int load_pkcs12(BIO *in, const char *desc, return ret; } -int load_cert_crl_http(const char *url, X509 **pcert, X509_CRL **pcrl) +#ifndef OPENSSL_NO_OCSP +static int load_cert_crl_http(const char *url, X509 **pcert, X509_CRL **pcrl) { char *host = NULL, *port = NULL, *path = NULL; BIO *bio = NULL; @@ -673,6 +674,7 @@ int load_cert_crl_http(const char *url, X509 **pcert, X509_CRL **pcrl) } return rv; } +#endif X509 *load_cert(const char *file, int format, const char *cert_descrip) { @@ -680,7 +682,9 @@ X509 *load_cert(const char *file, int format, const char *cert_descrip) BIO *cert; if (format == FORMAT_HTTP) { +#ifndef OPENSSL_NO_OCSP load_cert_crl_http(file, &x, NULL); +#endif return x; } @@ -719,7 +723,9 @@ X509_CRL *load_crl(const char *infile, int format) BIO *in = NULL; if (format == FORMAT_HTTP) { +#ifndef OPENSSL_NO_OCSP load_cert_crl_http(infile, NULL, &x); +#endif return x; } |