Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cf-dev] CoAP retransmission on DTLS Fatal Alert ?

Hi,
Currently, when we use Californium and try to send a request through DTLSConnector, if the request failed because of DTLS Fatal Alert (e.g. bad certificate), this is not visible at californium level. I mean Californium will never know thats something goes wrong, so at CoAP level we don't get a response for the request and we try to retransmit it until CoAP timeout or manual cancellation.

  I suppose this not really, the expected behavior.

With the ErrorHandler class added by Kai in scandium, we can workaround the problem with some gymnastic by cancelling the request when we receive an Alert from the peer we requested. But this could make sense if that was managed by Californium. I think we should not try to retransmit request after a DTLS fatal error and we should add something like onError(String) method on MessageObserver to inform sender that the request failed.

   I looked at the code the main issues was :
  1) add a way to get error from RawDataChannel.
2) retrieve exchange(s?) from address/port only ( we don't have message ID because we don't have CoAP message :p)
  3) notify all MessageObserver that the request failed
  4) set the exchange(s?) as completed

  Does it make sense ?

Simon



Back to the top