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

Re: [iaik-ssl] Configuration options on closure alert



I do not think you have iSaSiLk 3.0beta2 yet ;-) Anyway, the behaviour in
beta2 (which is very slightly different than in beta1) is:

 . closure alerts are always sent (except in some error cases)
 . after a closure alert is received the connection is treated as
shutdown (reads return EOF)
 . if the TCP connection is closed by the remote peer without sending a
closure alert an EOFException is raised
 . if an error occurs reading/writing the original exception is passed
through. In case of a network error (connection reset, etc.) this will
typically be a SocketException (see JDK docs)
 . invalid received messages (MAC errors, message format errors, etc.) or
internal/cofiguration errors cause SSLExceptions to be raised.

To avoid problems with implementation not sending closure alerts there is
a setting setCacheTerminatedSessions() in SSLContext. If set to true,
connections closed on the TCP level without sending a closure alert first
are treated the same as correctly closed sessions, i.e. no exception is
raised at all. It is possible that there will be a change in this respect
before 3.0 release. Suggestions welcome.

Regards,

 Andreas Sterbenz              mailto:Andreas.Sterbenz@iaik.tu-graz.ac.at

-----Ursprüngliche Nachricht-----
Von: Roger Bodén (QTX) <Roger.Boden@etx.ericsson.se>
An: <iaik-ssl@iaik.tu-graz.ac.at>
Gesendet: Freitag, 24. September 1999 09:10
Betreff: [iaik-ssl] Configuration options on closure alert


According to the TLS 1.0 spec the side initiating the closing of an
connection must send a closure alert. The end receiving a closure alert
MAY send an acknowledgement closure alert before the TCP connection is
shutdown.

Unfortunately there are a number of implementations around that violate
the spec, i.e. no closure alert is sent before the TCP-connection is
shutdown. Most notably are perhaps Microsoft IIS and Netscape Enterprise
server.

iSaSiLk 3.0 beta 2 throws a java.io.EOFException if the peer closes the
TCP connection without sending a closure alert. Presently there is no way
in the iSaSiLk API to differentiate between the cases when the TCP
connection was shutdown gracefully but no closure alert was sent, and
when the TCP circuit was reset. This makes the error handling very
difficult in environments were for instance IIS or netscape enterprise
server are present.

I would prefer that a different exception was thrown if no closure alert
was sent before a connection is closed. For instance one could introduce
a subclass to iaik.security.ssl.SSLException.

--
Roger




 <<Roger Bodén (QTX).vcf>>



smime.p7s