コード例 #1
0
ファイル: DH.cs プロジェクト: waffle-iron/nequeo
        /// <summary>
        /// Calls ASN1_i2d_bio() with the i2d = i2d_DHparams().
        /// </summary>
        /// <param name="bio"></param>
        public void WriteParametersDER(BIO bio)
        {
            i2d_DHparams_delegate i2d_DHparams = new i2d_DHparams_delegate(Managed_i2d_DHparams);
            IntPtr i2d_DHparams_ptr            = Marshal.GetFunctionPointerForDelegate(i2d_DHparams);

            Native.ExpectSuccess(Native.ASN1_i2d_bio(i2d_DHparams_ptr, bio.Handle, this.ptr));
            //!!

            /*
             * IntPtr hModule = Native.LoadLibrary(Native.DLLNAME);
             *          IntPtr i2d = Native.GetProcAddress(hModule, "i2d_DHparams");
             *          Native.FreeLibrary(hModule);
             *
             *          Native.ExpectSuccess(Native.ASN1_i2d_bio(i2d, bio.Handle, this.ptr));
             */
        }
コード例 #2
0
ファイル: DH.cs プロジェクト: yaobos/openssl-net
		/// <summary>
		/// Calls ASN1_i2d_bio() with the i2d = i2d_DHparams().
		/// </summary>
		/// <param name="bio"></param>
		public void WriteParametersDER(BIO bio)
		{
			var i2d_DHparams = new i2d_DHparams_delegate(Managed_i2d_DHparams);
			var i2d_DHparams_ptr = Marshal.GetFunctionPointerForDelegate(i2d_DHparams);
			
			Native.ExpectSuccess(Native.ASN1_i2d_bio(i2d_DHparams_ptr, bio.Handle, ptr));
			//!!
			/*
			IntPtr hModule = Native.LoadLibrary(Native.DLLNAME);
			IntPtr i2d = Native.GetProcAddress(hModule, "i2d_DHparams");
			Native.FreeLibrary(hModule);
			
			Native.ExpectSuccess(Native.ASN1_i2d_bio(i2d, bio.Handle, this.ptr));
			*/
		}