Hi , I have coded ocsp client with openssl.But when I verify openssl ocsp
utility, it is throwing below error:
>openssl ocsp -reqin ocspreq.der -text
Error reading OCSP request
3078063752:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong
tag:tasn_dec.c:1319:
3078063752:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested
asn1 error:tasn_dec.c:381:Type=OCSP_REQUEST

And as well as, I have sent the request to ejbca CA server.

EJBCA also fails the message with below print:

2011-02-28 15:26:01,071 DEBUG [org.ejbca.ui.web.protocol.OCSPServletBase]
>checkAndGetRequestBytes. Received POST request with content length: 112
from 192.168.0.128
2011-02-28 15:26:01,196 INFO  [org.ejbca.ui.web.LimitLengthASN1Reader] Not a
sequence on top level. Tag was 13.
2011-02-28 15:26:01,196 INFO  [org.ejbca.ui.web.protocol.OCSPServletBase]
Error processing OCSP request. Message: Not a sequence on top level. Tag was
13..
2011-02-28 15:26:01,212 DEBUG [org.ejbca.ui.web.protocol.OCSPServletBase]
Error processing OCSP request. Message: Not a sequence on top level. Tag was
13..

In the code, After I built OCSP_REQUEST object I have used below function to
encode:

BIO *membio = NULL;
membio = BIO_new(BIO_s_mem());
i2d_OCSP_REQUEST_bio( membio,(OCSP_REQUEST *) req );
BIO_get_mem_ptr(membio, &buf_mem);


After this I have added http hearders  and sent the data with simple socket
write calls.

-- 
View this message in context: 
http://old.nabble.com/OCSP-request-failing-tp31030418p31030418.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to