SetOptions is effective after creating context

pull/42/head
kojo1 2020-05-13 05:55:51 +09:00
parent 3748eac1c0
commit 140f2eb78d
1 changed files with 4 additions and 8 deletions

View File

@ -82,20 +82,16 @@ public class WolfSSLContext extends SSLContextSpi {
method = WolfSSL.NOT_COMPILED_IN;
switch (this.currentVersion) {
case TLSv1:
if((ctxAttr.noOptions & WolfSSL.SSL_OP_NO_TLSv1) == 0)
method = WolfSSL.TLSv1_Method();
method = WolfSSL.TLSv1_Method();
break;
case TLSv1_1:
if((ctxAttr.noOptions & WolfSSL.SSL_OP_NO_TLSv1_1) == 0)
method = WolfSSL.TLSv1_1_Method();
method = WolfSSL.TLSv1_1_Method();
break;
case TLSv1_2:
if((ctxAttr.noOptions & WolfSSL.SSL_OP_NO_TLSv1_2) == 0)
method = WolfSSL.TLSv1_2_Method();
method = WolfSSL.TLSv1_2_Method();
break;
case TLSv1_3:
if((ctxAttr.noOptions & WolfSSL.SSL_OP_NO_TLSv1_3) == 0)
method = WolfSSL.TLSv1_3_Method();
method = WolfSSL.TLSv1_3_Method();
break;
case SSLv23:
method = WolfSSL.SSLv23_Method();