Class DTLSVerifier
java.lang.Object
org.bouncycastle.tls.DTLSVerifier
Implements cookie generation/verification for a DTLS server as described in RFC 4347,
4.2.1. Denial of Service Countermeasures.
RFC 4347 4.2.1 additionally recommends changing the secret frequently. This class does not handle that
internally, so the instance should be replaced instead.
DTLS 1.2 and earlier only. DTLS 1.3 removed the HelloVerifyRequest and carries its cookie in a
HelloRetryRequest instead (RFC 9147 5.1), which is part of the handshake transcript and so needs the first
ClientHello's hash and the selected parameters stored in the cookie. This class does not implement that
exchange yet, so a server reached through it cannot negotiate DTLS 1.3: DTLSServerProtocol fails
such a handshake with an internal_error alert at the ServerHello rather than let the client abort it. A
server offering ProtocolVersion.DTLSv13 therefore has to accept connections without this front end,
and without any stateless denial-of-service countermeasure, until a HelloRetryRequest cookie exchange is
added here.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionverifyRequest(byte[] clientID, byte[] data, int dataOff, int dataLen, DatagramSender sender)
-
Constructor Details
-
DTLSVerifier
-
-
Method Details
-
verifyRequest
public DTLSRequest verifyRequest(byte[] clientID, byte[] data, int dataOff, int dataLen, DatagramSender sender)
-