Merge pull request #3769 from evincarofautumn/fix-verify-before-allocs
[mono.git] / mcs / class / System / Mono.Btls / MonoBtlsX509StoreCtx.cs
index 41df1298f9cb8758fb96a75471de876dfc65b5ec..9b8e82bb5e2766a135eda18c56be9413bf1a62b3 100644 (file)
@@ -23,7 +23,7 @@
 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
-#if SECURITY_DEP
+#if SECURITY_DEP && MONO_FEATURE_BTLS
 using System;
 using System.IO;
 using System.Runtime.InteropServices;
@@ -66,49 +66,49 @@ namespace Mono.Btls
                        get { return (BoringX509StoreCtxHandle)base.Handle; }
                }
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_store_ctx_new ();
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_store_ctx_from_ptr (IntPtr ctx);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static MonoBtlsX509Error mono_btls_x509_store_ctx_get_error (IntPtr handle, out IntPtr error_string);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static int mono_btls_x509_store_ctx_get_error_depth (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_store_ctx_get_chain (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static int mono_btls_x509_store_ctx_init (IntPtr handle, IntPtr store, IntPtr chain);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static int mono_btls_x509_store_ctx_set_param (IntPtr handle, IntPtr param);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static int mono_btls_x509_store_ctx_verify_cert (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_store_ctx_get_by_subject (IntPtr handle, IntPtr name);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_store_ctx_get_current_cert (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_store_ctx_get_current_issuer (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_store_ctx_get_verify_param (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_store_ctx_get_untrusted (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_store_ctx_up_ref (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static void mono_btls_x509_store_ctx_free (IntPtr handle);
 
                internal MonoBtlsX509StoreCtx ()