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

AW: [iaik-ssl]cu|| SSLSocket timeout doesn't work



Hello,

when using HTTPS over the URL framework please set the timeout
via W3C System property:

System.getProperties().put(org.w3c.www.protocol.http.HttpManager.TIMEOUT_P,
"..." );

No operations other than SSL status query calls should be executed
on the socket returned by getSSLSocket().
(See
http://jce.iaik.tugraz.at/products/02_isasilk/documentation/https/index.php)
.

Regards,
Dieter Bratko

-----Ursprüngliche Nachricht-----
Von: iaik-ssl-owner@iaik.at [mailto:iaik-ssl-owner@iaik.at]Im Auftrag
von LAZARO PORTUGAL, MARIA T.
Gesendet: Dienstag, 01. Oktober 2002 18:42
An: IAIK-SSL@IAIK.AT
Betreff: [iaik-ssl]cu|| SSLSocket timeout doesn't work


--- Recibido de   BBVINFOR.D350MLY 91-5375741                01-10-02 18.42

  -> IAIK-SSL@IAIK.AT

Hi,

I have a problem with timeout of SSLSocket.
I'm trying to use the "setSoTimeout" method of an SSLSocket. And I want to
return an error message to my main program if the timeout arrives. I use a
value of 1 millisecond, because I want to force the timeout.
I have read in the "isasilk" javadoc that when timeout arrives, throws an
exception "SocketException"

This is my code:
......
URL u  = new URL(null,
TLPVSvGestorFileProperties.getInstance(rutaFichProperties).getMensaje(HTTPS
_TPV_URL), new iaik.protocol.https.Handler());
..........
con = (HttpsURLConnection) u.openConnection();
SSLSocket socket_conexion = con.getSSLSocket();
con.getSSLSocket().setSoTimeout(Integer.parseInt("1"));
.....
out = con.getOutputStream();
in = con.getInputStream();
...

Writer wout = new OutputStreamWriter(out);
BufferedWriter bw = new BufferedWriter(wout);
bw.write(mensajeXml);
bw.flush();

.....
byte[] mensaje = new byte[in.available()];
in.read(mensaje);


But timeout is never reached. The server allways responds me even if I put
one millisecond as timeout.

Do you know something about this?
Any help would be apreciated.

Thank's
Maite
************************************  DISCLAIMER
*****************************************
This message is intended exclusively for the named person. It may contain
confidential, propietary or legally privileged information. No
confidentiality or
privilege is waived or lost by any mistransmission. If you receive this
message in
error, please immediately delete it and all copies of it from your system,
destroy any
hard copies of it an notify the sender. Your must not, directly or
indirectly, use,
disclose, distribute, print, or copy any part of this message if you are not
the
intended recipient. Any views expressed in this message are those of the
individual
sender, except where the message states otherwise and the sender is
authorised
to state them to be the views of 'GrupoBBVA'. Please note that internet
e-mail neither
guarantees the confidentiality nor the proper receipt of the message sent.
If the
addressee of this message does not consent to the use of internet e-mail,
please
communicate it to us immediately.

******************************  AVISO LEGAL
***********************************************
Este mensaje es solamente para la persona a la que va dirigido. Puede
contener
información  confidencial  o  legalmente  protegida.  No  hay  renuncia  a
la
confidencialidad o privilegio por cualquier transmisión mala/errónea. Si
usted
ha recibido este mensaje por error,  le rogamos que borre de su sistema
inmediatamente el mensaje asi como todas sus copias, destruya todas las
copias
del mismo de su disco duro y notifique al remitente.  No debe,  directa o
indirectamente, usar, revelar, distribuir, imprimir o copiar ninguna de las
partes de
este mensaje si no es usted el destinatario. Cualquier opinión expresada en
este
mensaje proviene del remitente, excepto cuando el mensaje establezca lo
contrario
y el remitente esté autorizado para establecer que dichas opiniones
provienen de
'GrupoBBVA'. Nótese que el correo electrónico via Internet no permite
asegurar ni la
confidencialidad de los mensajes que se transmiten ni la correcta recepción
de los
mismos. En el caso de que el destinatario de este mensaje no consintiera la
utilización del correo electrónico via Internet, rogamos lo ponga en nuestro
conocimiento de manera inmediata.
****************************************************************************
*******************

--
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


--
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