diff options
author | Zoltan Varga <vargaz@gmail.com> | 2016-10-22 00:29:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-22 00:29:13 +0300 |
commit | 2fb07d6c6d5b3915ef4665391febbb7b8be09fb5 (patch) | |
tree | 6c5e0315011a1f707c844a3ae171ca71db5b0ebf /mcs/class/System/Mono.Btls/MonoBtlsSsl.cs | |
parent | 20acd5895c2f0d661a4a9971f979f33384f6066e (diff) |
[btls] Convert BTLS icalls to pinvokes by invoking them using [DllImp… (#3799)
* [btls] Convert BTLS icalls to pinvokes by invoking them using [DllImport("__Internal")], which will make it easier to redirect them to a separate dylib in the future.
* [btls] Add a --enable-dynamic-btls configure flag to enable compiling btls into a separate shared library instead of embedding it into the runtime.
Diffstat (limited to 'mcs/class/System/Mono.Btls/MonoBtlsSsl.cs')
-rw-r--r-- | mcs/class/System/Mono.Btls/MonoBtlsSsl.cs | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/mcs/class/System/Mono.Btls/MonoBtlsSsl.cs b/mcs/class/System/Mono.Btls/MonoBtlsSsl.cs index b24ed079ab1..d04a15a1a66 100644 --- a/mcs/class/System/Mono.Btls/MonoBtlsSsl.cs +++ b/mcs/class/System/Mono.Btls/MonoBtlsSsl.cs @@ -55,73 +55,73 @@ namespace Mono.Btls } } - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static void mono_btls_ssl_destroy (IntPtr handle); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static IntPtr mono_btls_ssl_new (IntPtr handle); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_use_certificate (IntPtr handle, IntPtr x509); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_use_private_key (IntPtr handle, IntPtr key); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_add_chain_certificate (IntPtr handle, IntPtr x509); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_accept (IntPtr handle); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_connect (IntPtr handle); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_handshake (IntPtr handle); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static void mono_btls_ssl_close (IntPtr handle); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static void mono_btls_ssl_set_bio (IntPtr handle, IntPtr bio); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_read (IntPtr handle, IntPtr data, int len); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_write (IntPtr handle, IntPtr data, int len); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_get_error (IntPtr handle, int ret_code); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_get_version (IntPtr handle); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static void mono_btls_ssl_set_min_version (IntPtr handle, int version); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static void mono_btls_ssl_set_max_version (IntPtr handle, int version); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_get_cipher (IntPtr handle); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_get_ciphers (IntPtr handle, out IntPtr data); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static IntPtr mono_btls_ssl_get_peer_certificate (IntPtr handle); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_set_cipher_list (IntPtr handle, IntPtr str); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static void mono_btls_ssl_print_errors_cb (IntPtr func, IntPtr ctx); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_set_verify_param (IntPtr handle, IntPtr param); - [MethodImpl (MethodImplOptions.InternalCall)] + [DllImport (BTLS_DYLIB)] extern static int mono_btls_ssl_set_server_name (IntPtr handle, IntPtr name); static BoringSslHandle Create_internal (MonoBtlsSslCtx ctx) |