[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-ssl]cu|| AW: [iaik-jce] OCSP data transfer on SSL



Hello,

> The problem is that this loop never ends and also that it
> reads the request data within the loop and starts
> waiting at line.readLine() function call, i don't know
> for what data it does wait for.

Does your client print an empty line between headers and contents
as requested by HTTP?

Regards,
Dieter Bratko

-----Ursprungliche Nachricht-----
Von: iaik-jce-owner@iaik.at [mailto:iaik-jce-owner@iaik.at]Im Auftrag
von Nick Karamer
Gesendet: Mittwoch, 30. Janner 2002 12:30
An: iaik-jce@iaik.at; iaik-ssl@iaik.at
Betreff: [iaik-jce] OCSP data transfer on SSL


Hi all,

I am using OCSP over SSL. I am using the sample
SSLServer.java and SSLClient.java for this purpose.
Because eventually i have to read OCSP request from
the coming socket at Server side so i used the same
code as it is available in IAIK-JCE sample demo. I am
pasting that code here too.

      iaik.utils.LineInputStream in = new
iaik.utils.LineInputStream(new
BufferedInputStream(is));

      String line;
      line = in.readLine();
      StringTokenizer token = new
StringTokenizer(line, " ");
      String method = token.nextToken();
      System.out.println("Received request from " +
socket.getInetAddress() + ":");
      System.out.println(line);
      boolean invalidRequest = false;
      do
      {
        line = in.readLine();
        if (line != null)
        {
          System.out.println(line);
          line = line.toLowerCase();
          if (line.startsWith("content-type") &&
(line.indexOf("application/ocsp-request") == -1))
          {
            invalidRequest = true;
          }
          if (line.startsWith("http-version"))
          {
            str_ReturnProtocol =
line.substring(line.indexOf(":")+1).trim().toUpperCase();
            System.out.println("KNOCK KNOCK -> The
protocol is " + str_ReturnProtocol);
          }
        }
      }
      while( (line != null) && (line.length() != 0) );


But this is not working here in SSLserver.java when it
receives OCSP request from some client.[Currently i am
using SSLClient.java to send OCSP request]. The
problem is that this loop never ends and also that it
reads the request data within the loop and starts
waiting at line.readLine() function call, i don't know
for what data it does wait for. Any idea ? or any
working sample in which data being transfered over SSL
is OCSP request ??? ... Thanks in advance for your
help.


Best Regards
Nick Karamer
Senior Software Architect


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!
http://auctions.yahoo.com
--
Mailinglist-archive at
http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content:
UNSUBSCRIBE iaik-jce


--
Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-ssl/sslthreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content: UNSUBSCRIBE iaik-ssl