public void AddDirectory(string dir, MonoBtlsX509FileType type) { IntPtr dirPtr = IntPtr.Zero; try { if (dir != null) { dirPtr = Marshal.StringToHGlobalAnsi(dir); } var ret = mono_btls_x509_lookup_add_dir( Handle.DangerousGetHandle(), dirPtr, type); CheckError(ret); } finally { if (dirPtr != IntPtr.Zero) { Marshal.FreeHGlobal(dirPtr); } } }
public void LoadFile(string file, MonoBtlsX509FileType type) { IntPtr filePtr = IntPtr.Zero; try { if (file != null) { filePtr = Marshal.StringToHGlobalAnsi(file); } var ret = mono_btls_x509_lookup_load_file( Handle.DangerousGetHandle(), filePtr, type); CheckError(ret); } finally { if (filePtr != IntPtr.Zero) { Marshal.FreeHGlobal(filePtr); } } }
public void AddFileLookup(string file, MonoBtlsX509FileType type) { var lookup = AddLookup(MonoBtlsX509LookupType.FILE); lookup.LoadFile(file, type); }
public void AddDirectoryLookup(string dir, MonoBtlsX509FileType type) { var lookup = AddLookup(MonoBtlsX509LookupType.HASH_DIR); lookup.AddDirectory(dir, type); }
extern static int mono_btls_x509_lookup_add_dir(IntPtr handle, IntPtr dir, MonoBtlsX509FileType type);
extern static int mono_btls_x509_lookup_load_file(IntPtr handle, IntPtr file, MonoBtlsX509FileType type);
extern static int mono_btls_x509_lookup_add_dir (IntPtr handle, IntPtr dir, MonoBtlsX509FileType type);
extern static int mono_btls_x509_lookup_load_file (IntPtr handle, IntPtr file, MonoBtlsX509FileType type);
public void AddDirectory (string dir, MonoBtlsX509FileType type) { IntPtr dirPtr = IntPtr.Zero; try { if (dir != null) dirPtr = Marshal.StringToHGlobalAnsi (dir); var ret = mono_btls_x509_lookup_add_dir ( Handle.DangerousGetHandle (), dirPtr, type); CheckError (ret); } finally { if (dirPtr != IntPtr.Zero) Marshal.FreeHGlobal (dirPtr); } }
public void LoadFile (string file, MonoBtlsX509FileType type) { IntPtr filePtr = IntPtr.Zero; try { if (file != null) filePtr = Marshal.StringToHGlobalAnsi (file); var ret = mono_btls_x509_lookup_load_file ( Handle.DangerousGetHandle (), filePtr, type); CheckError (ret); } finally { if (filePtr != IntPtr.Zero) Marshal.FreeHGlobal (filePtr); } }
public void AddFileLookup (string file, MonoBtlsX509FileType type) { var lookup = AddLookup (MonoBtlsX509LookupType.FILE); lookup.LoadFile (file, type); }
public void AddDirectoryLookup (string dir, MonoBtlsX509FileType type) { var lookup = AddLookup (MonoBtlsX509LookupType.HASH_DIR); lookup.AddDirectory (dir, type); }