我已经从openssl-net.sourceforge.net Library下载了OpenSSL包装.NET的lates版本,但是遇到了麻烦 .
我试着像这样加载一个private.key:
byte[] b = System.IO.File.ReadAllBytes(@"C:\SFDLL\private.key");
OpenSSL.Core.BIO bio = new OpenSSL.Core.BIO(b);
OpenSSL.Crypto.CryptoKey key = OpenSSL.Crypto.CryptoKey.FromPrivateKey(bio, "123123");
int i = 0;
并得到错误:
而内在的例外是
{“无法加载DLL'lossay32':找不到指定的模块 . (HRESULT异常:0x8007007E)”}
isn't this the correct way to do this? what I'm doing wrong?
1 回答
如错误所示,找不到
libeay32
. 正如您为OpenSSL.NET发布的链接上的安装说明所述:因此,请确保您在构建目录中或该系统的PATH中包含该dll的副本 .