diff options
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; } |
