libssh2 1.6版更改编译通过(OpenSSL 1.0.2d)
来源:互联网 发布:麻将软件 编辑:程序博客网 时间:2024/05/20 08:25
转载请注明出处!
最近编译libssh2时,一直不能通过,参照libssh2和openssl源代码,对libssh2做如下修改。
1 在src/openssl.h 文件中增加如下头文件
#include <openssl/rsa.h>
#include <openssl/dsa.h>
2 在src/openssl.h
src/openssl.h
Showing the top two matches. Last indexed131#define libssh2_hmac_sha1_init(ctx, key, keylen) \
132 HMAC_Init(ctx, key, keylen, EVP_sha1())133#define libssh2_hmac_md5_init(ctx, key, keylen) \
134 HMAC_Init(ctx, key, keylen, EVP_md5())135#define libssh2_hmac_ripemd160_init(ctx, key, keylen) \改为如下src/openssl.h
Showing the top two matches. Last indexed131#define libssh2_hmac_sha1_init(ctx, key, keylen) \
132 HMAC_Init_ex(ctx, key, keylen, EVP_sha1(),NULL)133#define libssh2_hmac_md5_init(ctx, key, keylen) \
134 HMAC_Init_ex(ctx, key, keylen, EVP_md5(),NULL)135#define libssh2_hmac_ripemd160_init(ctx, key, keylen) \src/openssl.h
Showing the top match. Last indexed139#define libssh2_hmac_final(ctx, data) HMAC_Final(&(ctx), data, NULL)
140#define libssh2_hmac_cleanup(ctx) HMAC_cleanup(ctx)141
142#define libssh2_crypto_init() OpenSSL_add_all_algorithms()改为src/openssl.h
Showing the top match. Last indexed139#define libssh2_hmac_final(ctx, data) HMAC_Final(&(ctx), data, NULL)
140#define libssh2_hmac_cleanup(ctx) HMAC_CTX_cleanup(ctx)141
142#define libssh2_crypto_init() OpenSSL_add_all_algorithms()原因:可以查看openssl源码 hmac.h文件中(如下):这2个函数是有条件编译的 USE_DEPRECATED, 但是查看openssl的change log , 最新的openssl 默认是NO DEPRECATED, 故在编译libssh2时会报 NO DEFINE REFRENCE .Changes between 1.0.2 and 1.1.0*) config has been changed so that by default OPENSSL_NO_DEPRECATED is used.Access to deprecated functions can be re-enabled by running config with "enable-deprecated". In addition applications wishing to use deprecated functions must define OPENSSL_USE_DEPRECATED. Note that this new behaviour will, by default, disable some transitive includes that previously existed in the header files (e.g. ec.h will no longer, by default, include bn.h) [Matt Caswell]void HMAC_CTX_init(HMAC_CTX *ctx);
void HMAC_CTX_cleanup(HMAC_CTX *ctx);
#ifdef OPENSSL_USE_DEPRECATED
/* deprecated */
# define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx)
/* deprecated */
DECLARE_DEPRECATED(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md));
#endif
/*__owur*/ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md, ENGINE *impl);
/*__owur*/ int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
size_t len);
/*__owur*/ int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,最后libssh2编译成功。更改好的源文件地址: libssh20 0
- libssh2 1.6版更改编译通过(OpenSSL 1.0.2d)
- OpenSSL+zlib+libssh2编译(windows)
- libxml2,openssl,libssh2交叉编译
- vs2010 编译 libssh2-1.4.2
- 使用VS编译libcurl库(支持libSSH2和OpenSSL)
- libssh2编译错误(configure error: cannot find OpenSSL or Libgcrypt)解决方法
- mingw编译libssh2
- libssh2静态库编译
- linux环境编译libssh2
- 编译 libcurl 7.45.0 + zlib 1.2.8 + openssl 1.0.2d
- openssl-1.0.0d-static-lib编译过程
- win32下vs2012 编译 libssh2
- libssh2的windows下编译
- Windows下编译OpenSSL最新版(openssl-1.0.2a)
- Windows下编译OpenSSL最新版(openssl-1.0.2a)
- Windows下编译OpenSSL最新版(openssl-1.0.2a)
- 如何通过Makefile编译iphone的openSSL
- 如何通过Makefile编译iphone的openSSL
- 两台虚拟机ping不通
- opencv中创建多个滚动调进行多个参数调用(
- django web开发指南-实例 1: Photo Gallery运行起来修改点。
- ubuntu server 14.04 安装图形界面
- Android使用Xutils在Entity填充数据
- libssh2 1.6版更改编译通过(OpenSSL 1.0.2d)
- 关于python3调用C/C++的方法(ctypes)
- SetValue:forKey和SetObject:forKey的区别
- GPU编程--开山篇
- WIN10 Eclipse LUNA的JDK配置
- 多项目共同维护
- Lee天Code : 111. Minimum Depth of Binary Tree
- 安装SQLSERVER2005提示事务管理器不可用
- iOS应用程序的生命周期
原创粉丝点击热门IT博客热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 杨正午 杨正午祸害湖南 杨正大 杨正 杨正超 杨步伟 苏群和杨毅一笑泯恩仇 杨玉环怎么玩才厉害 杨永信 杨永信吧 杨永信为什么不抓 杨永信现状 杨永信事件什么梗 杨永信事件 杨永信青岛被打 杨永信是谁 杨永信电死人一案 2018年杨永信现状 杨永信表情包 众筹杀杨永信 杨永信是什么梗 杨永信被判刑了吗 杨永信为什么叫雷电法王 杨永信被判刑了吗2018 杨永信在青岛讲课被打了 杨永晴 杨永晴门3完整照片 杨永晴的资料 杨永晴图片 杨永晴个人图片 杨永晴英文名 杨永晴的照片 杨永晴漂亮 杨永晴吧 杨永松 杨永泰 杨永泰简历 杨汉烈 杨汊湖 住宿 杨汝岱 杨沛宜程序博客网,程序员的互联网技术博客家园。csdn论坛精品 msdn技术资料都在这里