diff --git a/openssl-net-0.5/ManagedOpenSsl/Core/BigNumber.cs b/openssl-net-0.5/ManagedOpenSsl/Core/BigNumber.cs index a58076e..53c3ce2 100644 --- a/openssl-net-0.5/ManagedOpenSsl/Core/BigNumber.cs +++ b/openssl-net-0.5/ManagedOpenSsl/Core/BigNumber.cs @@ -268,7 +268,7 @@ public static BigNumber mod_inverse(BigNumber lhs, BigNumber rhs) BigNumber ret = new BigNumber(); Context ctx = new Context(); ctx.Start(); - Native.ExpectSuccess(Native.BN_mod_inverse(ret.Handle, lhs.Handle, rhs.Handle, ctx.Handle)); + Native.ExpectNonNull(Native.BN_mod_inverse(ret.Handle, lhs.Handle, rhs.Handle, ctx.Handle)); ctx.End(); return ret; } @@ -495,4 +495,4 @@ protected override void OnDispose() { } #endregion } -} \ No newline at end of file +} diff --git a/openssl-net-0.5/ManagedOpenSsl/Core/Native.cs b/openssl-net-0.5/ManagedOpenSsl/Core/Native.cs index d4b5f0c..86692c1 100644 --- a/openssl-net-0.5/ManagedOpenSsl/Core/Native.cs +++ b/openssl-net-0.5/ManagedOpenSsl/Core/Native.cs @@ -1104,7 +1104,7 @@ int DSA_generate_parameters_ex(IntPtr dsa, //[DllImport(DLLNAME, CallingConvention=CallingConvention.Cdecl)] //public extern static int BN_div(IntPtr rv, IntPtr rem, IntPtr m, IntPtr d, IntPtr ctx); [DllImport(DLLNAME, CallingConvention=CallingConvention.Cdecl)] - public extern static int BN_mod_inverse(IntPtr ret, IntPtr a, IntPtr c, IntPtr ctx); + public extern static IntPtr BN_mod_inverse(IntPtr ret, IntPtr a, IntPtr c, IntPtr ctx); [DllImport(DLLNAME, CallingConvention=CallingConvention.Cdecl)] public extern static int BN_gcd(IntPtr r, IntPtr a, IntPtr b, IntPtr ctx);