为什么不.NET找到OpenSSL.NET的dll?NET、OpenSSL、dll

2023-09-02 21:11:53 作者:_、裝糊塗 漫天煙リ

修改(全部问题,它是太不清楚)

EDIT (the whole question, it was too unclear)

我想使用 OpenSSL.NET

在OpenSSL.NET安装说明页面: INSTALL

The OpenSSL.NET install instructions page: INSTALL

请确保您有LIBEAY32.DLL和ssleay32.dll在当前工作   您的应用程序,或在你的PATH目录。 完成   在你的.NET项目,添加引用ManagedOpenSsl.dll组装。 完成

Make sure you have libeay32.dll and ssleay32.dll in the current working directory of your application or in your PATH. DONE In your .NET project, add a reference to the ManagedOpenSsl.dll assembly. DONE

我已经把 LIBEAY32.DLL ssleay32.dll 在这两个我的 斌/调试斌/发布 目录。我也把他们的 SYSTEM32

I have put libeay32.dll and ssleay32.dll in both my bin/Debug and bin/Release directories. I have also put them in system32.

下面是我的全部code:

Here is my FULL code:

using System;

namespace ConsoleApplication1
{
	class Program
	{
		static void Main(string[] args)
		{
			try
			{
				OpenSSL.Crypto.RSA rsa = new OpenSSL.Crypto.RSA();
			}
			catch (Exception e)
			{
				Console.WriteLine(e.InnerException.Message);
			}
			Console.Read();
		}
	}
}

我收到以下错误: (无法加载DLLlibeay32')

I get the following error: (Unable to load DLL 'libeay32')

下面是进程监视器日志(要求):

Here is the Process Monitor log (upon request):

我究竟做错了什么?为什么没有找到DLL?

推荐答案

尝试OpenSSL.NET的最新版本( 0.4.1 ),它现在应该包括prebuilt LIBEAY32.DLL和ssleay32.dll二进制文件链接到CRT静态。或者,你可以建立这些库自己或使用'官员'打造而成openssl.org。

Try the latest version of OpenSSL.NET (0.4.1) which should now include prebuilt libeay32.dll and ssleay32.dll binaries that link to the CRT statically. Alternatively, you can build these libraries yourself or use an 'official' build from openssl.org.

 
精彩推荐