diff options
| author | Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | 2015-05-06 09:49:41 -0400 |
|---|---|---|
| committer | Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | 2015-05-06 09:49:41 -0400 |
| commit | a14921c5944c340056312f2f5b1728d698f628b1 (patch) | |
| tree | 110242b91b3ade02e586bd65b9aedb05511bd34a /Cryptlib/OpenSSL/crypto/ocsp | |
| parent | 72bb39c0237f8bcc3afa8b623e8b097eec6d69cd (diff) | |
| parent | 7361f67dbd7f7fe98a807d3d12f90a87262124d6 (diff) | |
| download | efi-boot-shim-a14921c5944c340056312f2f5b1728d698f628b1.tar.gz efi-boot-shim-a14921c5944c340056312f2f5b1728d698f628b1.zip | |
Import upstream version 0.8
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/ocsp')
| -rw-r--r--[-rwxr-xr-x] | Cryptlib/OpenSSL/crypto/ocsp/ocsp_asn.c | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | Cryptlib/OpenSSL/crypto/ocsp/ocsp_cl.c | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | Cryptlib/OpenSSL/crypto/ocsp/ocsp_err.c | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | Cryptlib/OpenSSL/crypto/ocsp/ocsp_ext.c | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | Cryptlib/OpenSSL/crypto/ocsp/ocsp_ht.c | 3 | ||||
| -rw-r--r--[-rwxr-xr-x] | Cryptlib/OpenSSL/crypto/ocsp/ocsp_lib.c | 13 | ||||
| -rw-r--r--[-rwxr-xr-x] | Cryptlib/OpenSSL/crypto/ocsp/ocsp_prn.c | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | Cryptlib/OpenSSL/crypto/ocsp/ocsp_srv.c | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | Cryptlib/OpenSSL/crypto/ocsp/ocsp_vfy.c | 10 |
9 files changed, 22 insertions, 4 deletions
diff --git a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_asn.c b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_asn.c index bfe892ac..bfe892ac 100755..100644 --- a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_asn.c +++ b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_asn.c diff --git a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_cl.c b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_cl.c index 17bab5fc..17bab5fc 100755..100644 --- a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_cl.c +++ b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_cl.c diff --git a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_err.c b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_err.c index d2f2e79f..d2f2e79f 100755..100644 --- a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_err.c +++ b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_err.c diff --git a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_ext.c b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_ext.c index 815cc29d..815cc29d 100755..100644 --- a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_ext.c +++ b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_ext.c diff --git a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_ht.c b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_ht.c index 92aba08c..fb87cd76 100755..100644 --- a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_ht.c +++ b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_ht.c @@ -464,6 +464,9 @@ OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, char *path, OCSP_REQUEST *req) ctx = OCSP_sendreq_new(b, path, req, -1); + if (!ctx) + return NULL; + do { rv = OCSP_sendreq_nbio(&resp, ctx); diff --git a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_lib.c b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_lib.c index 441ccb7a..5883b4e0 100755..100644 --- a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_lib.c +++ b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_lib.c @@ -220,8 +220,19 @@ int OCSP_parse_url(char *url, char **phost, char **pport, char **ppath, int *pss if (!*ppath) goto mem_err; + p = host; + if(host[0] == '[') + { + /* ipv6 literal */ + host++; + p = strchr(host, ']'); + if(!p) goto parse_err; + *p = '\0'; + p++; + } + /* Look for optional ':' for port number */ - if ((p = strchr(host, ':'))) + if ((p = strchr(p, ':'))) { *p = 0; port = p + 1; diff --git a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_prn.c b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_prn.c index b8b7871d..b8b7871d 100755..100644 --- a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_prn.c +++ b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_prn.c diff --git a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_srv.c b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_srv.c index 1c606dd0..1c606dd0 100755..100644 --- a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_srv.c +++ b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_srv.c diff --git a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_vfy.c b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_vfy.c index 4a0c3870..f24080fa 100755..100644 --- a/Cryptlib/OpenSSL/crypto/ocsp/ocsp_vfy.c +++ b/Cryptlib/OpenSSL/crypto/ocsp/ocsp_vfy.c @@ -91,9 +91,12 @@ int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs, { EVP_PKEY *skey; skey = X509_get_pubkey(signer); - ret = OCSP_BASICRESP_verify(bs, skey, 0); - EVP_PKEY_free(skey); - if(ret <= 0) + if (skey) + { + ret = OCSP_BASICRESP_verify(bs, skey, 0); + EVP_PKEY_free(skey); + } + if(!skey || ret <= 0) { OCSPerr(OCSP_F_OCSP_BASIC_VERIFY, OCSP_R_SIGNATURE_FAILURE); goto end; @@ -108,6 +111,7 @@ int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs, init_res = X509_STORE_CTX_init(&ctx, st, signer, bs->certs); if(!init_res) { + ret = -1; OCSPerr(OCSP_F_OCSP_BASIC_VERIFY,ERR_R_X509_LIB); goto end; } |
