Fix Client Hello version to work with static RSA

This commit is contained in:
Sean Parkinson
2018-05-02 10:20:55 +10:00
parent 65eb79e5cd
commit 996ee78d50

View File

@@ -2779,6 +2779,8 @@ int DoTls13ServerHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
#else #else
if (pv.major == ssl->version.major && pv.minor < TLSv1_2_MINOR && if (pv.major == ssl->version.major && pv.minor < TLSv1_2_MINOR &&
ssl->options.downgrade) { ssl->options.downgrade) {
/* Force client hello version 1.2 to work for static RSA. */
ssl->chVersion.minor = TLSv1_2_MINOR;
ssl->version.minor = TLSv1_2_MINOR; ssl->version.minor = TLSv1_2_MINOR;
return DoServerHello(ssl, input, inOutIdx, helloSz); return DoServerHello(ssl, input, inOutIdx, helloSz);
} }
@@ -2895,6 +2897,8 @@ int DoTls13ServerHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
ssl->options.haveSessionId = 1; ssl->options.haveSessionId = 1;
} }
/* Force client hello version 1.2 to work for static RSA. */
ssl->chVersion.minor = TLSv1_2_MINOR;
/* Complete TLS v1.2 processing of ServerHello. */ /* Complete TLS v1.2 processing of ServerHello. */
ret = CompleteServerHello(ssl); ret = CompleteServerHello(ssl);