转载请注明出处!
最近编译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 indexed
src/openssl.h
Showing the top two matches. Last indexed
改为src/openssl.h
Showing the top match. Last indexed
原因:src/openssl.h
Showing the top match. Last indexed
可以查看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