Greetings openca-ocspd users,

I've recognized a problem with Cisco and newer IOS versions
together with OCSPD-1.5.1-rc1.

OCSPD parses the HTML header against:

        Content-Type: 
                ^  with a uppercase 'T'

But Cisco routers would need:

        Content-type: 
                ^  with a lowercase 't'


I would suggest to fix this before release of OCSP-1.5.1-final.

As a "quick hack", I developed the following patch which recognizes both of
the above formats -- in fact, to be fully RFC conformant, you would need a
'strnstr' function call matching any upper and lower case scenarios:

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


# diff -u openca-ocspd-1.5.1-rc1/src/ocsp_request.c 
openca-ocspd-1.5.1-rc1-patched/src/ocsp_request.c
--- openca-ocspd-1.5.1-rc1/src/ocsp_request.c   2006-10-21 18:39:24.000000000 
+0200
+++ openca-ocspd-1.5.1-rc1-patched/src/ocsp_request.c   2010-04-16 
07:43:44.000000000 +0200
@@ -162,7 +162,7 @@

                        /* Check for headers */
                        if( (!cont_len) &&
-                               ((pnt = strstr(buf, "Content-Length: " )) != 
NULL) ) {
+                               (((pnt = strstr(buf, "Content-Length: " )) != 
NULL) || ((pnt = strstr(buf, "Content-Length: " )) != NULL)) ) {
                                if((pnt_end = strstr(pnt, "\r\n")) != NULL )
                                        sscanf((char *) (pnt+16), "%d", 
&cont_len );
                                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