Merge pull request #224 from gasbytes/patch-nullhostnamefix
Erroring out on invalid port during the creation of a SSLEnginepull/225/head
commit
cfbc118cc7
|
@ -137,7 +137,7 @@ public class WolfSSLEngineHelper {
|
|||
WolfSSLParameters params, int port, String hostname)
|
||||
throws WolfSSLException {
|
||||
|
||||
if (params == null || ssl == null || store == null) {
|
||||
if (params == null || ssl == null || store == null || port < 0) {
|
||||
throw new WolfSSLException("Bad argument");
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ public class WolfSSLEngineHelper {
|
|||
throws WolfSSLException {
|
||||
|
||||
if (params == null || ssl == null || store == null ||
|
||||
peerAddr == null) {
|
||||
peerAddr == null || port < 0) {
|
||||
throw new WolfSSLException("Bad argument");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue