68 #ifdef OPENSSL_SYS_SUNOS
69 #define strtoul (unsigned long)strtol
85 #define OCSP_MAX_REQUEST_LENGTH (100 * 1024)
86 #define OCSP_MAX_LINE_LEN 4096;
91 #define OHS_NOREAD 0x1000
93 #define OHS_ERROR (0 | OHS_NOREAD)
95 #define OHS_FIRSTLINE 1
99 #define OHS_ASN1_HEADER 3
101 #define OHS_ASN1_CONTENT 4
103 #define OHS_ASN1_WRITE (6 | OHS_NOREAD)
105 #define OHS_ASN1_FLUSH (7 | OHS_NOREAD)
107 #define OHS_DONE (8 | OHS_NOREAD)
110 static int parse_http_line1(
char *line);
123 static const char req_hdr[] =
124 "Content-Type: application/ocsp-request\r\n"
125 "Content-Length: %d\r\n\r\n";
126 if (
BIO_printf(rctx->
mem, req_hdr, i2d_OCSP_REQUEST(req, NULL)) <= 0)
136 const char *name,
const char *value)
157 static const char post_hdr[] =
"POST %s HTTP/1.0\r\n";
189 static int parse_http_line1(
char *line)
195 for(p = line; *p && !isspace((
unsigned char)*p); p++)
205 while(*p && isspace((
unsigned char)*p))
216 for(q = p; *q && !isspace((
unsigned char)*q); q++)
230 retcode = strtoul(p, &r, 10);
236 while(*q && isspace((
unsigned char)*q))
245 for(r = q + strlen(q) - 1; isspace((
unsigned char)*r); r--)
266 const unsigned char *
p;
341 if ((n <= 0) || !memchr(p,
'\n', n))
370 if (parse_http_line1((
char *)rctx->
iobuf))
384 for (p = rctx->
iobuf; *p; p++)
386 if ((*p !=
'\r') && (*p !=
'\n'))
432 for (i = 0; i < n; i++)
459 *presp = d2i_OCSP_RESPONSE(NULL, &p, rctx->
asn1_len);