Skip to content

Commit ecb4e6c

Browse files
authored
[QUIC] Fix flags usage on Linux (#69874)
1 parent 84513a2 commit ecb4e6c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Interop/SafeMsQuicConfigurationHandle.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ public static SafeMsQuicConfigurationHandle Create(QuicClientConnectionOptions o
5151
}
5252
}
5353

54-
return Create(options, QUIC_CREDENTIAL_FLAGS.CLIENT | QUIC_CREDENTIAL_FLAGS.USE_SUPPLIED_CREDENTIALS, certificate: certificate, certificateContext: null, options.ClientAuthenticationOptions?.ApplicationProtocols, options.ClientAuthenticationOptions?.CipherSuitesPolicy);
54+
QUIC_CREDENTIAL_FLAGS flags = QUIC_CREDENTIAL_FLAGS.CLIENT;
55+
if (OperatingSystem.IsWindows())
56+
{
57+
flags |= QUIC_CREDENTIAL_FLAGS.USE_SUPPLIED_CREDENTIALS;
58+
}
59+
return Create(options, flags, certificate: certificate, certificateContext: null, options.ClientAuthenticationOptions?.ApplicationProtocols, options.ClientAuthenticationOptions?.CipherSuitesPolicy);
5560
}
5661

5762
public static SafeMsQuicConfigurationHandle Create(QuicOptions options, SslServerAuthenticationOptions? serverAuthenticationOptions, string? targetHost = null)

0 commit comments

Comments
 (0)