带有 OpenSSL 的 Axis2C - 无 OPENSSL_APPLINK 错误
我在 VC++ 2008 中使用 Axis2C 和 OpenSSL 来访问 https web 服务。 每当实际通信发生时,我都会收到运行时致命异常:
OPENSSL_UPLINK:没有OPENSSL_APPLINK。
我读到您应该做几件事,例如将 applink.c 文件链接到我的应用程序。我这样做了(使用 extern“C”),并且我还调用了 CRYPTO_malloc_init。他们两个都无效..我有点迷失在这里。
我还应该检查什么?另外,有人知道为什么 axis2c 有时会写入 axis.log 文件,有时不会?
谢谢!
罗伊。
I'm using Axis2C with OpenSSL in VC++ 2008 to access an https webservice.
Whenever the actual communication is taking place I get a runtime fatal exception :
OPENSSL_UPLINK: no OPENSSL_APPLINK.
I read that there are several things you should do, such as link in the applink.c file to my application. I did that, (using extern "C"), and I also call CRYPTO_malloc_init. Both of them are ineffective.. I'm kind of lost here.
What else should I be checking? also, does anybody know why axis2c sometimes writes to the axis.log file, and sometimes not?
Thanks!
Roey.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我遇到了类似的问题,使用 OpenSSL 1.0.1e(从 http://slproweb.com/products 为 Win32 预编译/Win32OpenSSL.html )。
我不确定根本原因是什么,但当我使用 VC 的静态库而不是 DLL 库重建应用程序时,问题就消失了。
换句话说,这个库对我来说失败了:
但是再次链接这个库成功了
这可能与与其他库的不兼容有关(请参阅
此外,它还与 PEM 处理有关。我能够生成 RSA 密钥,但当我链接到 DLL 而不是静态链接时,我无法编写它。
I had a similar problem, using OpenSSL 1.0.1e (precompiled for Win32 from http://slproweb.com/products/Win32OpenSSL.html ).
I'm not sure what the root cause was, but the problem went away when I rebuilt my application using the static libraries for VC, instead of the DLL libraries.
In other words, this library here failed for me:
But linking again this library succeeded
It's possibly related to incompatibilities with other libraries (see http://forums.epo.org/installation-and-maintenance/topic1373.html) as far as I could tell, my application only used the libeay32 library.
In addition, it had to do with the PEM handling. I was able to generate an RSA key, but I couldn't write it, when I linked against the DLL instead of statically.
这可能是由于编译标志造成的。
以下是如何在 Windows 上编译 Axis2c + OpenSSL 64 位的描述。
使用 OpenSSL 创建 Axis2c 64 位
版本:
先决条件:
Perl 应位于 %PATH% 系统环境变量中
OpenSSL
配置和编译 OpenSSL:
为了防止 Axis2c makefile 中发生其他更改,请将文件复制到以下目录结构:
Axis2c
配置 Axis2C
在 \build\win32\configure.in 中更改以下设置:
更改\build\win32\makefile 中的以下设置:
编译 Axis2C
cd \build\win32
nmake install
所有必需的文件都放入文件夹中:
\build\deploy
2 个 OpenSSL dll 文件(libeay32.dll、ssleay32.dll)可能会手动复制到deploy\lib 子文件夹。
This might be due to the compile flags.
Here is the description how you can compile Axis2c + OpenSSL 64 Bit on Windows.
Create Axis2c 64 Bit with OpenSSL
Versions:
Prerequisites:
Perl should be in the %PATH% system environment variable
OpenSSL
Configure and compile OpenSSL:
For preventing additional changes in the Axis2c makefile, copy the files to following dir-structure:
Axis2c
Configure Axis2C
Change the following settings in \build\win32\configure.in:
Change the following settings in \build\win32\makefile:
Compile Axis2C
cd \build\win32
nmake install
All encessary files are into the folder:
\build\deploy
The 2 OpenSSL dll files (libeay32.dll, ssleay32.dll) might be copied to the deploy\lib sub folder manually.
根据 openssl 常见问题解答:
因此,只需在您的项目中包含 applink.c 即可享受!
According to openssl faq:
So just include applink.c in your project & enjoy!