diff options
author | marha <marha@users.sourceforge.net> | 2011-01-23 19:50:13 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-01-23 19:50:13 +0000 |
commit | b680cf39ed5bc37e0eb7eb86ad8599bf92df3f2b (patch) | |
tree | 4722cd31e41fdda28e5c2b37bdf8500d27868384 /openssl/crypto/ocsp | |
parent | 8cd59857a99c534c560f58c931f5c2466d4c1f9b (diff) | |
download | vcxsrv-b680cf39ed5bc37e0eb7eb86ad8599bf92df3f2b.tar.gz vcxsrv-b680cf39ed5bc37e0eb7eb86ad8599bf92df3f2b.tar.bz2 vcxsrv-b680cf39ed5bc37e0eb7eb86ad8599bf92df3f2b.zip |
Updated to openssl-1.0.0c
Diffstat (limited to 'openssl/crypto/ocsp')
-rw-r--r-- | openssl/crypto/ocsp/ocsp_ht.c | 12 | ||||
-rw-r--r-- | openssl/crypto/ocsp/ocsp_prn.c | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/openssl/crypto/ocsp/ocsp_ht.c b/openssl/crypto/ocsp/ocsp_ht.c index 12bbfcffd..af5fc1669 100644 --- a/openssl/crypto/ocsp/ocsp_ht.c +++ b/openssl/crypto/ocsp/ocsp_ht.c @@ -397,11 +397,12 @@ int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx) case OHS_ASN1_HEADER: - /* Now reading ASN1 header: can read at least 6 bytes which - * is more than enough for any valid ASN1 SEQUENCE header + /* Now reading ASN1 header: can read at least 2 bytes which + * is enough for ASN1 SEQUENCE header and either length field + * or at least the length of the length field. */ n = BIO_get_mem_data(rctx->mem, &p); - if (n < 6) + if (n < 2) goto next_io; /* Check it is an ASN1 SEQUENCE */ @@ -414,6 +415,11 @@ int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx) /* Check out length field */ if (*p & 0x80) { + /* If MSB set on initial length octet we can now + * always read 6 octets: make sure we have them. + */ + if (n < 6) + goto next_io; n = *p & 0x7F; /* Not NDEF or excessive length */ if (!n || (n > 4)) diff --git a/openssl/crypto/ocsp/ocsp_prn.c b/openssl/crypto/ocsp/ocsp_prn.c index 1695c9c4a..87608ff39 100644 --- a/openssl/crypto/ocsp/ocsp_prn.c +++ b/openssl/crypto/ocsp/ocsp_prn.c @@ -182,7 +182,6 @@ int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE* o, unsigned long flags) { int i, ret = 0; long l; - unsigned char *p; OCSP_CERTID *cid = NULL; OCSP_BASICRESP *br = NULL; OCSP_RESPID *rid = NULL; @@ -207,7 +206,6 @@ int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE* o, unsigned long flags) return 1; } - p = ASN1_STRING_data(rb->response); i = ASN1_STRING_length(rb->response); if (!(br = OCSP_response_get1_basic(o))) goto err; rd = br->tbsResponseData; |