96 throw new Exception(
"At least one SslApplicationProtocol value must be present in SslClientAuthenticationOptions or SslServerAuthenticationOptions.");
98 if (
options.MaxBidirectionalStreams > 65535)
100 throw new Exception(
"MaxBidirectionalStreams overflow.");
102 if (
options.MaxBidirectionalStreams > 65535)
104 throw new Exception(
"MaxBidirectionalStreams overflow.");
110 throw new Exception(
"Server must provide certificate");
115 flags |= QUIC_CREDENTIAL_FLAGS.NO_CERTIFICATE_VALIDATION |
QUIC_CREDENTIAL_FLAGS.INDICATE_CERTIFICATE_RECEIVED;
123 quicSettings.PeerBidiStreamCount = (ushort)
options.MaxBidirectionalStreams;
124 quicSettings.PeerUnidiStreamCount = (ushort)
options.MaxUnidirectionalStreams;
130 throw new Exception(
"IdleTimeout must not be negative.");
132 ulong num = (ulong)
options.IdleTimeout.Ticks / 10000
uL;
133 if (num > 4611686018427387903
L)
135 throw new Exception(
"IdleTimeout is too large (max 2^62-1 milliseconds)");
138 settings.IdleTimeoutMs = (ulong)
options.IdleTimeout.TotalMilliseconds;
158 credConfig.Flags = flags;
183 for (
int i = 0; i <
array?.Length; i++)
197 credentialConfigCertificatePkcs.Asn1Blob = (
IntPtr)
ptr2;
198 credentialConfigCertificatePkcs.Asn1BlobLength = (uint)
array2.Length;
199 credentialConfigCertificatePkcs.PrivateKeyPassword =
IntPtr.
Zero;
212 return configuration;