static DTLSTransport createClientTransport(final DatagramTransport transport) throws IOException { final DefaultTlsClient defaultTlsClient = new DefaultTlsClient() { @Override public ProtocolVersion getClientVersion() { return ProtocolVersion.DTLSv10; } @Override public ProtocolVersion getMinimumVersion() { return ProtocolVersion.DTLSv10; } @Override public TlsAuthentication getAuthentication() throws IOException { return new ServerOnlyTlsAuthentication() { @Override public void notifyServerCertificate(final Certificate serverCertificate) throws IOException { //TODO Check if certificate is signed by a trusted party. } }; } }; return new DTLSClientProtocol(SECURE_RANDOM).connect(defaultTlsClient, transport); }