Massimiliano Pala writes:
> So.. is the problem related to the fact that the CISCO IOS does not recognize
> the Content-Type: or more on the CISCO side (so that we have to send 
> 'Content-type'
> instead of 'Content-Type') ?
>
> One small note: it seems that the patch you sent is related to the
> 'Content-Length:' > header instead...

Oops, it's been too late (local time) when I sent out the bug report. :)
"Content-Length" was the string i wanted to talk about.

The problem is not that Cisco side, but on the ocspd-side.
The parser should ignore case when the Cisco sends his initial headers.
The parser expects "Content-Length" exactly as its upper and lower cases,
but i think the RFC draft of OCSP says you should ignore the case when
parsing the HTTP headers of the client side, so, the cisco is conformative
to the RFC draft, but the ocspd is not. As a result, the "Content-length:"
header of the Cisco router isn't parsed as it should be, so the needed
patch is:

diff -ru openca-ocspd-1.5.1-rc1/src/ocsp_request.c openca-ocspd-1.5.1-rc1-patche
d/src/ocsp_request.c
--- openca-ocspd-1.5.1-rc1/src/ocsp_request.c   2006-10-21 18:39:24.000000000 +0
200
+++ openca-ocspd-1.5.1-rc1-patched/src/ocsp_request.c   2010-05-21 17:10:42.0000
00000 +0200
@@ -162,7 +162,7 @@

                        /* Check for headers */
                        if( (!cont_len) &&
-                               ((pnt = strstr(buf, "Content-Length: " )) != NUL
L) ) {
+                               (((pnt = strstr(buf, "Content-Length: " )) != NU
LL) || ((pnt = strstr(buf, "Content-length: " )) != NULL)) ) {
                                if((pnt_end = strstr(pnt, "\r\n")) != NULL )
                                        sscanf((char *) (pnt+16), "%d", &cont_le
n );
                                if(ocspd_conf->debug) {

Greetings
        -Achim
--
 Joachim Astel | ac...@astel.de | OpenXPKI + OpenCA-OCSP + OpenCA-Tools

------------------------------------------------------------------------------

_______________________________________________
Openca-Users mailing list
Openca-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openca-users

Reply via email to