Enabled protocols question
Running the code below I get as a return from getEnabledProtocols SSLv2Hello, SSLv3 and TLSv1.
Since I have set TLSv1 in the context, shouldn磘 it return only this protocol? I understand it is possible to send TLS Client Hello messages wrapped in SSLv2, but I don磘 want it to happen.
Are there any way to remove the other protocols from the created socket other than calling setEnabledProtocols()?
Thanks in advance.
import javax.net.ssl.*;
publicclass SSLTest{
publicstaticvoid main(String[] args){
try{
SSLContext ctx = SSLContext.getInstance("TLSv1");
ctx.init(null, null,null);
SSLSocketFactory f = ctx.getSocketFactory();
SSLSocket s = (SSLSocket) f.createSocket("<aHost>", <aPort>);
String[] ps = s.getEnabledProtocols();
for (int i = 0; i < ps.length; i++){
System.out.println("Proto: " + ps[i]);
}
}catch (Exception e){
e.printStackTrace();
}
}
}

