Renegotiate,
}
- [DllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslCreateContext")]
- internal static extern System.Net.SafeSslHandle SslCreateContext(int isServer);
+ [GeneratedDllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslCreateContext")]
+ internal static partial System.Net.SafeSslHandle SslCreateContext(int isServer);
- [DllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslSetConnection")]
- internal static extern int SslSetConnection(
++ [GeneratedDllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslSetConnection")]
++ internal static partial int SslSetConnection(
+ SafeSslHandle sslHandle,
+ IntPtr sslConnection);
+
- [DllImport(Interop.Libraries.AppleCryptoNative)]
- private static extern int AppleCryptoNative_SslSetMinProtocolVersion(
+ [GeneratedDllImport(Interop.Libraries.AppleCryptoNative)]
+ private static partial int AppleCryptoNative_SslSetMinProtocolVersion(
SafeSslHandle sslHandle,
SslProtocols minProtocolId);
int cbTargetName,
out int osStatus);
- [DllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SSLSetALPNProtocols")]
- internal static extern int SSLSetALPNProtocols(SafeSslHandle ctx, SafeCreateHandle cfProtocolsRefs, out int osStatus);
+ [GeneratedDllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SSLSetALPNProtocols")]
+ internal static partial int SSLSetALPNProtocols(SafeSslHandle ctx, SafeCreateHandle cfProtocolsRefs, out int osStatus);
- [DllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslGetAlpnSelected")]
- internal static extern int SslGetAlpnSelected(SafeSslHandle ssl, out SafeCFDataHandle protocol);
+ [GeneratedDllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslGetAlpnSelected")]
+ internal static partial int SslGetAlpnSelected(SafeSslHandle ssl, out SafeCFDataHandle protocol);
- [DllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslHandshake")]
- internal static extern PAL_TlsHandshakeState SslHandshake(SafeSslHandle sslHandle);
+ [GeneratedDllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslHandshake")]
+ internal static partial PAL_TlsHandshakeState SslHandshake(SafeSslHandle sslHandle);
- [DllImport(Interop.Libraries.AppleCryptoNative)]
- private static extern int AppleCryptoNative_SslSetAcceptClientCert(SafeSslHandle sslHandle);
+ [GeneratedDllImport(Interop.Libraries.AppleCryptoNative)]
+ private static partial int AppleCryptoNative_SslSetAcceptClientCert(SafeSslHandle sslHandle);
- [DllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslSetIoCallbacks")]
- internal static extern unsafe int SslSetIoCallbacks(
+ [GeneratedDllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslSetIoCallbacks")]
- internal static partial int SslSetIoCallbacks(
++ internal static unsafe partial int SslSetIoCallbacks(
SafeSslHandle sslHandle,
- SSLReadFunc readCallback,
- SSLWriteFunc writeCallback);
+ delegate* unmanaged<IntPtr, byte*, void**, int> readCallback,
+ delegate* unmanaged<IntPtr, byte*, void**, int> writeCallback);
- [DllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslWrite")]
- internal static extern unsafe PAL_TlsIo SslWrite(SafeSslHandle sslHandle, byte* writeFrom, int count, out int bytesWritten);
+ [GeneratedDllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslWrite")]
+ internal static unsafe partial PAL_TlsIo SslWrite(SafeSslHandle sslHandle, byte* writeFrom, int count, out int bytesWritten);
- [DllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslRead")]
- internal static extern unsafe PAL_TlsIo SslRead(SafeSslHandle sslHandle, byte* writeFrom, int count, out int bytesWritten);
+ [GeneratedDllImport(Interop.Libraries.AppleCryptoNative, EntryPoint = "AppleCryptoNative_SslRead")]
+ internal static unsafe partial PAL_TlsIo SslRead(SafeSslHandle sslHandle, byte* writeFrom, int count, out int bytesWritten);
- [DllImport(Interop.Libraries.AppleCryptoNative)]
- private static extern int AppleCryptoNative_SslIsHostnameMatch(
+ [GeneratedDllImport(Interop.Libraries.AppleCryptoNative)]
+ private static partial int AppleCryptoNative_SslIsHostnameMatch(
SafeSslHandle handle,
SafeCreateHandle cfHostname,
SafeCFDateHandle cfValidTime,
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslDestroy")]
internal static extern void SslDestroy(IntPtr ssl);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSetConnectState")]
- internal static extern void SslSetConnectState(SafeSslHandle ssl);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSetConnectState")]
+ internal static partial void SslSetConnectState(SafeSslHandle ssl);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSetAcceptState")]
- internal static extern void SslSetAcceptState(SafeSslHandle ssl);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSetAcceptState")]
+ internal static partial void SslSetAcceptState(SafeSslHandle ssl);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSetAlpnProtos")]
- internal static extern int SslSetAlpnProtos(SafeSslHandle ssl, IntPtr protos, int len);
++ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSetAlpnProtos")]
++ internal static partial int SslSetAlpnProtos(SafeSslHandle ssl, IntPtr protos, int len);
+
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetVersion")]
- internal static extern IntPtr SslGetVersion(SafeSslHandle ssl);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetVersion")]
+ internal static partial IntPtr SslGetVersion(SafeSslHandle ssl);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSetTlsExtHostName")]
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSetTlsExtHostName", CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Bool)]
- internal static extern bool SslSetTlsExtHostName(SafeSslHandle ssl, string host);
+ internal static partial bool SslSetTlsExtHostName(SafeSslHandle ssl, string host);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGet0AlpnSelected")]
- internal static extern void SslGetAlpnSelected(SafeSslHandle ssl, out IntPtr protocol, out int len);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGet0AlpnSelected")]
+ internal static partial void SslGetAlpnSelected(SafeSslHandle ssl, out IntPtr protocol, out int len);
internal static byte[]? SslGetAlpnSelected(SafeSslHandle ssl)
{
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslShutdown")]
internal static extern int SslShutdown(IntPtr ssl);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslShutdown")]
- internal static extern int SslShutdown(SafeSslHandle ssl);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslShutdown")]
+ internal static partial int SslShutdown(SafeSslHandle ssl);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSetBio")]
- internal static extern void SslSetBio(SafeSslHandle ssl, SafeBioHandle rbio, SafeBioHandle wbio);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSetBio")]
+ internal static partial void SslSetBio(SafeSslHandle ssl, SafeBioHandle rbio, SafeBioHandle wbio);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslDoHandshake", SetLastError = true)]
- internal static extern int SslDoHandshake(SafeSslHandle ssl);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslDoHandshake", SetLastError = true)]
+ internal static partial int SslDoHandshake(SafeSslHandle ssl);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_IsSslStateOK")]
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_IsSslStateOK")]
[return: MarshalAs(UnmanagedType.Bool)]
- internal static extern bool IsSslStateOK(SafeSslHandle ssl);
+ internal static partial bool IsSslStateOK(SafeSslHandle ssl);
// NOTE: this is just an (unsafe) overload to the BioWrite method from Interop.Bio.cs.
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_BioWrite")]
- internal static extern unsafe int BioWrite(SafeBioHandle b, byte* data, int len);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_BioWrite")]
+ internal static unsafe partial int BioWrite(SafeBioHandle b, byte* data, int len);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_BioWrite")]
- internal static extern int BioWrite(SafeBioHandle b, ref byte data, int len);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_BioWrite")]
+ internal static partial int BioWrite(SafeBioHandle b, ref byte data, int len);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetPeerCertificate")]
- internal static extern SafeX509Handle SslGetPeerCertificate(SafeSslHandle ssl);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetPeerCertificate")]
+ internal static partial SafeX509Handle SslGetPeerCertificate(SafeSslHandle ssl);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetPeerCertChain")]
- internal static extern SafeSharedX509StackHandle SslGetPeerCertChain(SafeSslHandle ssl);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetPeerCertChain")]
+ internal static partial SafeSharedX509StackHandle SslGetPeerCertChain(SafeSslHandle ssl);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetPeerFinished")]
- internal static extern int SslGetPeerFinished(SafeSslHandle ssl, IntPtr buf, int count);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetPeerFinished")]
+ internal static partial int SslGetPeerFinished(SafeSslHandle ssl, IntPtr buf, int count);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetFinished")]
- internal static extern int SslGetFinished(SafeSslHandle ssl, IntPtr buf, int count);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetFinished")]
+ internal static partial int SslGetFinished(SafeSslHandle ssl, IntPtr buf, int count);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSessionReused")]
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSessionReused")]
[return: MarshalAs(UnmanagedType.Bool)]
- internal static extern bool SslSessionReused(SafeSslHandle ssl);
+ internal static partial bool SslSessionReused(SafeSslHandle ssl);
- [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslAddExtraChainCert")]
- internal static partial bool SslAddExtraChainCert(SafeSslHandle ssl, SafeX509Handle x509);
-
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetClientCAList")]
- private static extern SafeSharedX509NameStackHandle SslGetClientCAList_private(SafeSslHandle ssl);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetClientCAList")]
+ private static partial SafeSharedX509NameStackHandle SslGetClientCAList_private(SafeSslHandle ssl);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetCurrentCipherId")]
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetCurrentCipherId")]
[return: MarshalAs(UnmanagedType.Bool)]
- internal static extern bool SslGetCurrentCipherId(SafeSslHandle ssl, out int cipherId);
+ internal static partial bool SslGetCurrentCipherId(SafeSslHandle ssl, out int cipherId);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_GetOpenSslCipherSuiteName")]
- private static extern IntPtr GetOpenSslCipherSuiteName(SafeSslHandle ssl, int cipherSuite, out int isTls12OrLower);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_GetOpenSslCipherSuiteName")]
+ private static partial IntPtr GetOpenSslCipherSuiteName(SafeSslHandle ssl, int cipherSuite, out int isTls12OrLower);
- internal static string? GetOpenSslCipherSuiteName(SafeSslHandle ssl, TlsCipherSuite cipherSuite, out bool isTls12OrLower)
- {
- string? ret = Marshal.PtrToStringAnsi(GetOpenSslCipherSuiteName(ssl, (int)cipherSuite, out int isTls12OrLowerInt));
- isTls12OrLower = isTls12OrLowerInt != 0;
- return ret;
- }
+ [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SetCiphers")]
+ internal static extern unsafe bool SslSetCiphers(SafeSslHandle ssl, byte* cipherList, byte* cipherSuites);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_Tls13Supported")]
- private static extern int Tls13SupportedImpl();
- internal static readonly bool Tls13Supported = Tls13SupportedImpl() != 0;
+ [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSetVerifyPeer")]
+ internal static extern void SslSetVerifyPeer(SafeSslHandle ssl);
- internal static SafeSharedX509NameStackHandle SslGetClientCAList(SafeSslHandle ssl)
- {
- Crypto.CheckValidOpenSslHandle(ssl);
+ [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetData")]
+ internal static extern IntPtr SslGetData(IntPtr ssl);
- SafeSharedX509NameStackHandle handle = SslGetClientCAList_private(ssl);
+ [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSetData")]
+ internal static extern int SslSetData(SafeSslHandle ssl, IntPtr data);
- if (!handle.IsInvalid)
+ [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslSetData")]
+ internal static extern int SslSetData(IntPtr ssl, IntPtr data);
+
+ internal static unsafe int SslSetAlpnProtos(SafeSslHandle ssl, List<SslApplicationProtocol> protocols)
+ {
+ byte[] buffer = ConvertAlpnProtocolListToByteArray(protocols);
+ fixed (byte* b = buffer)
{
- handle.SetParent(ssl);
+ return SslSetAlpnProtos(ssl, (IntPtr)b, buffer.Length);
}
-
- return handle;
}
- internal static bool AddExtraChainCertificates(SafeSslHandle sslContext, X509Chain chain)
+ internal static byte[] ConvertAlpnProtocolListToByteArray(List<SslApplicationProtocol> applicationProtocols)
{
- Debug.Assert(chain != null, "X509Chain should not be null");
- Debug.Assert(chain.ChainElements.Count > 0, "chain.Build should have already been called");
-
- // If the last certificate is a root certificate, don't send it. PartialChain means the last cert wasn't a root.
- int stop = chain.ChainElements.Count - 1;
- foreach (X509ChainStatus s in chain.ChainStatus)
+ int protocolSize = 0;
+ foreach (SslApplicationProtocol protocol in applicationProtocols)
{
- if ((s.Status & X509ChainStatusFlags.PartialChain) != 0)
+ if (protocol.Protocol.Length == 0 || protocol.Protocol.Length > byte.MaxValue)
{
- stop++;
- break;
+ throw new ArgumentException(SR.net_ssl_app_protocols_invalid, nameof(applicationProtocols));
}
+
+ protocolSize += protocol.Protocol.Length + 1;
}
- // Don't include the first item (the cert whose private key we have)
- for (int i = 1; i < stop; i++)
+ byte[] buffer = new byte[protocolSize];
+ var offset = 0;
+ foreach (SslApplicationProtocol protocol in applicationProtocols)
{
- SafeX509Handle dupCertHandle = Crypto.X509UpRef(chain.ChainElements[i].Certificate!.Handle);
- Crypto.CheckValidOpenSslHandle(dupCertHandle);
- if (!SslAddExtraChainCert(sslContext, dupCertHandle))
- {
- Crypto.ErrClearError();
- dupCertHandle.Dispose(); // we still own the safe handle; clean it up
- return false;
- }
- dupCertHandle.SetHandleAsInvalid(); // ownership has been transferred to sslHandle; do not free via this safe handle
+ buffer[offset++] = (byte)(protocol.Protocol.Length);
+ protocol.Protocol.Span.CopyTo(buffer.AsSpan(offset));
+ offset += protocol.Protocol.Length;
}
- return true;
+ return buffer;
}
- internal static bool AddExtraChainCertificates(SafeSslHandle sslContext, X509Certificate2[] chain)
+ internal static string? GetOpenSslCipherSuiteName(SafeSslHandle ssl, TlsCipherSuite cipherSuite, out bool isTls12OrLower)
{
- // send pre-computed list of intermediates.
- for (int i = 0; i < chain.Length; i++)
+ string? ret = Marshal.PtrToStringAnsi(GetOpenSslCipherSuiteName(ssl, (int)cipherSuite, out int isTls12OrLowerInt));
+ isTls12OrLower = isTls12OrLowerInt != 0;
+ return ret;
+ }
+
+ [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_Tls13Supported")]
- [return: MarshalAs(UnmanagedType.Bool)]
- private static extern bool Tls13SupportedImpl();
- internal static readonly bool Tls13Supported = Tls13SupportedImpl();
++ private static extern int Tls13SupportedImpl();
++ internal static readonly bool Tls13Supported = Tls13SupportedImpl() != 0;
+
+ internal static SafeSharedX509NameStackHandle SslGetClientCAList(SafeSslHandle ssl)
+ {
+ Crypto.CheckValidOpenSslHandle(ssl);
+
+ SafeSharedX509NameStackHandle handle = SslGetClientCAList_private(ssl);
+
+ if (!handle.IsInvalid)
{
- SafeX509Handle dupCertHandle = Crypto.X509UpRef(chain[i].Handle);
- Crypto.CheckValidOpenSslHandle(dupCertHandle);
- if (!SslAddExtraChainCert(sslContext, dupCertHandle))
- {
- Crypto.ErrClearError();
- dupCertHandle.Dispose(); // we still own the safe handle; clean it up
- return false;
- }
- dupCertHandle.SetHandleAsInvalid(); // ownership has been transferred to sslHandle; do not free via this safe handle
+ handle.SetParent(ssl);
}
- return true;
+ return handle;
}
internal static class SslMethods
{
internal static partial class Ssl
{
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxAddExtraChainCert")]
- internal static extern bool SslCtxAddExtraChainCert(SafeSslContextHandle ctx, SafeX509Handle x509);
++ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxAddExtraChainCert")]
++ internal static partial bool SslCtxAddExtraChainCert(SafeSslContextHandle ctx, SafeX509Handle x509);
+
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxUseCertificate")]
- internal static extern int SslCtxUseCertificate(SafeSslContextHandle ctx, SafeX509Handle certPtr);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxUseCertificate")]
+ internal static partial int SslCtxUseCertificate(SafeSslContextHandle ctx, SafeX509Handle certPtr);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxUsePrivateKey")]
- internal static extern int SslCtxUsePrivateKey(SafeSslContextHandle ctx, SafeEvpPKeyHandle keyPtr);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxUsePrivateKey")]
+ internal static partial int SslCtxUsePrivateKey(SafeSslContextHandle ctx, SafeEvpPKeyHandle keyPtr);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxCheckPrivateKey")]
- internal static extern int SslCtxCheckPrivateKey(SafeSslContextHandle ctx);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxCheckPrivateKey")]
+ internal static partial int SslCtxCheckPrivateKey(SafeSslContextHandle ctx);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxSetQuietShutdown")]
- internal static extern void SslCtxSetQuietShutdown(SafeSslContextHandle ctx);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxSetQuietShutdown")]
+ internal static partial void SslCtxSetQuietShutdown(SafeSslContextHandle ctx);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxSetVerify")]
- internal static extern unsafe void SslCtxSetVerify(SafeSslContextHandle ctx, delegate* unmanaged<int, IntPtr, int> callback);
+ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxSetVerify")]
+ internal static unsafe partial void SslCtxSetVerify(SafeSslContextHandle ctx, delegate* unmanaged<int, IntPtr, int> callback);
- [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SetCiphers")]
- internal static unsafe partial bool SetCiphers(SafeSslContextHandle ctx, byte* cipherList, byte* cipherSuites);
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxSetCiphers")]
- internal static extern unsafe bool SslCtxSetCiphers(SafeSslContextHandle ctx, byte* cipherList, byte* cipherSuites);
++ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxSetCiphers")]
++ internal static unsafe partial bool SslCtxSetCiphers(SafeSslContextHandle ctx, byte* cipherList, byte* cipherSuites);
- [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SetEncryptionPolicy")]
- [DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxSetEncryptionPolicy")]
- internal static extern bool SetEncryptionPolicy(SafeSslContextHandle ctx, EncryptionPolicy policy);
++ [GeneratedDllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslCtxSetEncryptionPolicy")]
+ internal static partial bool SetEncryptionPolicy(SafeSslContextHandle ctx, EncryptionPolicy policy);
}
}