Skip to content

Commit

Permalink
Fix enum comparison not working in tls_credentials.cc.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewstevenson88 committed Feb 2, 2024
1 parent a9c8f94 commit 6b9ab26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/lib/security/credentials/tls/tls_credentials.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ bool CredentialOptionSanityCheck(grpc_tls_credentials_options* options,
return false;
}
// In this case, there will be non-retriable handshake errors.
if (options->min_tls_version() > options->max_tls_version()) {
if (options->min_tls_version() == grpc_tls_version::TLS1_3 &&
options->max_tls_version() == grpc_tls_version::TLS1_2) {
gpr_log(GPR_ERROR, "TLS min version must not be higher than max version.");
return false;
}
Expand Down

0 comments on commit 6b9ab26

Please sign in to comment.