[System] Don't build managed BTLS code on monotouch
[mono.git] / mcs / class / System / Mono.Btls / MonoBtlsX509Crl.cs
index 7b4ab7d8c9a6523d20891d42ed39462b12921dd9..6801b79b785c24b0204646e8443864eb16e833b7 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.Text;
@@ -67,37 +67,37 @@ namespace Mono.Btls
                {
                }
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_crl_ref (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_crl_from_data (IntPtr data, int len, MonoBtlsX509Format format);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_crl_get_by_cert (IntPtr handle, IntPtr x509);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                unsafe extern static IntPtr mono_btls_x509_crl_get_by_serial (IntPtr handle, void *serial, int len);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static int mono_btls_x509_crl_get_revoked_count (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_crl_get_revoked (IntPtr handle, int index);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static long mono_btls_x509_crl_get_last_update (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static long mono_btls_x509_crl_get_next_update (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static long mono_btls_x509_crl_get_version (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static IntPtr mono_btls_x509_crl_get_issuer (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
+               [DllImport (BTLS_DYLIB)]
                extern static void mono_btls_x509_crl_free (IntPtr handle);
 
                public static MonoBtlsX509Crl LoadFromData (byte[] buffer, MonoBtlsX509Format format)
@@ -160,13 +160,13 @@ namespace Mono.Btls
                public DateTime GetLastUpdate ()
                {
                        var ticks = mono_btls_x509_crl_get_last_update (Handle.DangerousGetHandle ());
-                       return new DateTime (1970, 1, 1).AddSeconds (ticks);
+                       return new DateTime (1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds (ticks);
                }
 
                public DateTime GetNextUpdate ()
                {
                        var ticks = mono_btls_x509_crl_get_next_update (Handle.DangerousGetHandle ());
-                       return new DateTime (1970, 1, 1).AddSeconds (ticks);
+                       return new DateTime (1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds (ticks);
                }
 
                public long GetVersion ()