Skip to content

Commit

Permalink
Remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-diewald committed Feb 11, 2023
1 parent 4ba64de commit 88ce93c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions include/boost/wintls/detail/sspi_handshake.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,11 @@ class sspi_handshake {
BOOST_UNREACHABLE_RETURN(0);
}();

auto server_cert = context_.server_cert();
if (handshake_type_ == handshake_type::server && server_cert != nullptr) {
creds.cCreds = 1;
creds.paCred = &server_cert;
}

// TODO: rename server_cert field since it is also used for client cert.
// Note: if client cert is set, sspi will auto validate server cert with it.
// Even though verify_server_certificate_ in context is set to false.
if (handshake_type_ == handshake_type::client && server_cert != nullptr) {
auto server_cert = context_.server_cert();
if (server_cert != nullptr) {
creds.cCreds = 1;
creds.paCred = &server_cert;
}
Expand Down

0 comments on commit 88ce93c

Please sign in to comment.