summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/ocsp
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2003-10-01 12:32:41 +0000
committernectar <nectar@FreeBSD.org>2003-10-01 12:32:41 +0000
commitee25ce74b3f6742c1079590363995e56ff51b014 (patch)
tree69b3ffc611270d72c473248fe700c2942eb5e6b5 /crypto/openssl/crypto/ocsp
parent5d79b842c13e718f85a9f2e1676e361b6fc55367 (diff)
downloadFreeBSD-src-ee25ce74b3f6742c1079590363995e56ff51b014.zip
FreeBSD-src-ee25ce74b3f6742c1079590363995e56ff51b014.tar.gz
Vendor import of OpenSSL 0.9.7c
Diffstat (limited to 'crypto/openssl/crypto/ocsp')
-rw-r--r--crypto/openssl/crypto/ocsp/ocsp_ht.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/crypto/openssl/crypto/ocsp/ocsp_ht.c b/crypto/openssl/crypto/ocsp/ocsp_ht.c
index 357709a..9213e58 100644
--- a/crypto/openssl/crypto/ocsp/ocsp_ht.c
+++ b/crypto/openssl/crypto/ocsp/ocsp_ht.c
@@ -110,7 +110,7 @@ Content-Length: %d\r\n\r\n";
}
/* Parse the HTTP response. This will look like this:
* "HTTP/1.0 200 OK". We need to obtain the numeric code and
- * informational message.
+ * (optional) informational message.
*/
/* Skip to first white space (passed protocol info) */
@@ -138,13 +138,19 @@ Content-Length: %d\r\n\r\n";
if(*r) goto err;
/* Skip over any leading white space in message */
while(*q && isspace((unsigned char)*q)) q++;
- if(!*q) goto err;
+ if(*q) {
/* Finally zap any trailing white space in message (include CRLF) */
/* We know q has a non white space character so this is OK */
- for(r = q + strlen(q) - 1; isspace((unsigned char)*r); r--) *r = 0;
+ for(r = q + strlen(q) - 1; isspace((unsigned char)*r); r--) *r = 0;
+ }
if(retcode != 200) {
OCSPerr(OCSP_F_OCSP_SENDREQ_BIO,OCSP_R_SERVER_RESPONSE_ERROR);
- ERR_add_error_data(4, "Code=", p, ",Reason=", q);
+ if(!*q) {
+ ERR_add_error_data(2, "Code=", p);
+ }
+ else {
+ ERR_add_error_data(4, "Code=", p, ",Reason=", q);
+ }
goto err;
}
/* Find blank line marking beginning of content */
OpenPOWER on IntegriCloud