Handle DTLS explicitly in getEquivalentTLSVersion
@@ -141,16 +141,18 @@ public boolean isTLS()
public ProtocolVersion getEquivalentTLSVersion()
{
- if (isTLS())
+ switch (getMajorVersion())
{
- return this;
- }
+ case 0x03: return this;
+ case 0xFE:
switch(getMinorVersion())
{
case 0xFF: return TLSv11;
case 0xFD: return TLSv12;
default: return null;
}
+ default: return null;
+ }
}
public ProtocolVersion getPreviousVersion()
