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

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



Hello,

> Can i use HTTPSUrlConnection to send ocsp request
> through a socket already opened by SSLSocket object ?
Not through an already opened SSLSocket. Please look
at demo.htpps.HttpsDemo for a sample on using HttpsURLConnection
with iSaSiLk and read our corresponding info page
(http://jcewww.iaik.at/products/isasilk/documentation/https/index.php).

>   dataoutputstream.write("Content-Type
> :application/ocsp-request\r\n".getBytes());
>  dataoutputstream.flush();
>  dataoutputstream.write(a_OCSPRequest.getEncoded());
>  dataoutputstream.write("\r\n".getBytes());
The empty line between content header and content may be missing here.

Regards,
Dieter Bratko


-----Ursprungliche Nachricht-----
Von: iaik-jce-owner@iaik.at [mailto:iaik-jce-owner@iaik.at]Im Auftrag
von Nick Karamer
Gesendet: Donnerstag, 07. Februar 2002 11:29
An: Dieter Bratko; iaik-jce@iaik.at; iaik-ssl@iaik.at
Betreff: Re: AW: [iaik-jce] OCSP data transfer on SSL


hi,
i m using following code
DataOutputStream dataoutputstream = new
DataOutputStream(new
BufferedOutputStream(sslSocket.getOutputStream()));
try
{
  dataoutputstream.write("Content-Type
:application/ocsp-request\r\n".getBytes());
 dataoutputstream.flush();
 dataoutputstream.write(a_OCSPRequest.getEncoded());
 dataoutputstream.write("\r\n".getBytes());
 }
 catch(Exception codingexception)
  {
    throw new IOException("Request encoding error: " +
codingexception.getMessage());
  }
  dataoutputstream.flush();

Can i use HTTPSUrlConnection to send ocsp request
through a socket already opened by SSLSocket object ?
if yes then how? When i send request like this, i do
not get the request properly on the other side.

Regards
Nick

--- Dieter Bratko <Dieter.Bratko@iaik.at> wrote:
> 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-jce/jcethreads.html
>
> To unsubscribe send an email to listserv@iaik.at
> with the folowing content: UNSUBSCRIBE iaik-jce
>


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.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