Skip to content

Commit 89f0bce

Browse files
committed
Fix ver_set_condition call
1 parent 567b37d commit 89f0bce

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/libmongoc/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,10 +562,8 @@ if (WIN32 AND MONGOC_ENABLE_SSL_SECURE_CHANNEL)
562562
endif()
563563

564564
if (HAVE_SCH_CREDENTIALS)
565-
message(STATUS "SCH_CREDENTIALS symbol found.")
566565
set (MONGOC_HAVE_SCH_CREDENTIALS 1)
567566
else ()
568-
message(STATUS "SCH_CREDENTIALS symbol not found. Using SCHANNEL_CRED.")
569567
set (MONGOC_HAVE_SCH_CREDENTIALS 0)
570568
endif ()
571569

src/libmongoc/src/mongoc/mongoc-stream-tls-secure-channel-private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ typedef struct {
5454

5555
// `mongoc_secure_channel_cred` may be shared on multiple connections.
5656
typedef struct _mongoc_secure_channel_cred {
57-
PCCERT_CONTEXT cert; /* Owning. Optional client cert. */
57+
PCCERT_CONTEXT cert; /* Owning. Optional client cert. */
5858
#ifdef MONGOC_HAVE_SCH_CREDENTIALS
5959
SCH_CREDENTIALS *cred;
6060
#else

src/libmongoc/src/mongoc/mongoc-stream-tls-secure-channel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,7 @@ mongoc_secure_channel_cred_new(const mongoc_ssl_opt_t *opt)
918918
if ((is_server && _mongoc_verify_windows_version(10, 0, 19044, false)) ||
919919
(!is_server && _mongoc_verify_windows_version(10, 0, 22000, false))) {
920920
enabled_protocols |= SP_PROT_TLS1_3_CLIENT;
921+
printf("Enabling TLS 1.3 with Secure Channel \n");
921922
}
922923
cred->cred->pTlsParameters->grbitDisabledProtocols = (DWORD)~enabled_protocols;
923924
#else

src/libmongoc/src/mongoc/mongoc-version-functions.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ _mongoc_verify_windows_version(int major_version, int minor_version, int build_n
107107
osvi.dwMinorVersion = minor_version;
108108

109109
ULONGLONG mask = 0;
110-
mask = VER_SET_CONDITION(mask, VER_MAJORVERSION, op);
111-
mask = VER_SET_CONDITION(mask, VER_MINORVERSION, op);
110+
VER_SET_CONDITION(mask, VER_MAJORVERSION, op);
111+
VER_SET_CONDITION(mask, VER_MINORVERSION, op);
112112

113113
matched = VerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION, mask);
114114

@@ -119,7 +119,7 @@ _mongoc_verify_windows_version(int major_version, int minor_version, int build_n
119119
osvi.dwBuildNumber = build_number;
120120

121121
mask = 0;
122-
mask = VER_SET_CONDITION(mask, VER_BUILDNUMBER, op);
122+
VER_SET_CONDITION(mask, VER_BUILDNUMBER, op);
123123

124124
matched = VerifyVersionInfo(&osvi, VER_BUILDNUMBER, mask);
125125
}

0 commit comments

Comments
 (0)