DTLS Client retry ClientHello
westhawk <[email protected]>
| Newsgroups | gmane.comp.encryption.bouncy-castle.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, I now need to have BouncyCastle DTLS act as a DTLS client (after years of just being a server).
I’m at a loss to know how to deal with the case where the ClientHello gets dropped.
this code snippet illustrates the issue:
import org.bouncycastle.crypto.tls.DTLSClientProtocol;
import org.bouncycastle.crypto.tls.DTLSTransport;
….
SecureRandom sec = new SecureRandom();
DTLSClientProtocol protocol = new DTLSClientProtocol(sec);
Log.debug("DTLS client protocol created " + _verified);
TimerTask kill = new TimerTask() {
@Override
public void run() {
Log.error("would resend DTLS hello - If we knew how.");
}
};
this.deadmanwalking.schedule(kill, 100 * n);
DTLSTransport dtls = protocol.connect(this, _dt);
In essence I have 2 problems:
1) protocol.connect never times out
2) I can’t see an external method to prod protocol into resending.
I could hack something up with the Transport I pass in, but that seems ugly.
Thanks in advance for any hints.
T.
(P.S. keep up the great work!)