在Lion上编译git会收到关于SHA1_Init的警告,不推荐使用;什么是替代品? [关闭]


2

我从源代码编译Git 1.7.7,同时在MacOS X 10.7上得到关于SHA1_Init和其他相关函数的警告(我使用的是10.7.2,虽然我有XCode 4.2,但我正在编译一个自制的GCC 4.6.1,但只更改警告消息中的详细信息)。

标题是 /usr/include/openssl/sha.h;它包含通知,例如:

int SHA_Init(SHA_CTX *c) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
  • 有没有人知道在哪里记录为什么SHA1被Apple弃用以及建议的替代品是什么?

说明性消息:

$ make read-cache.o
    CC read-cache.o
wread-cache.c: In function ‘verify_hdr’:
read-cache.c:1172:2: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121) [-Wdeprecated-declarations]
read-cache.c:1173:2: warning: ‘SHA1_Update’ is deprecated (declared at /usr/include/openssl/sha.h:122) [-Wdeprecated-declarations]
read-cache.c:1174:2: warning: ‘SHA1_Final’ is deprecated (declared at /usr/include/openssl/sha.h:123) [-Wdeprecated-declarations]
read-cache.c: In function ‘ce_write_flush’:
read-cache.c:1403:3: warning: ‘SHA1_Update’ is deprecated (declared at /usr/include/openssl/sha.h:122) [-Wdeprecated-declarations]
read-cache.c: In function ‘ce_flush’:
read-cache.c:1448:3: warning: ‘SHA1_Update’ is deprecated (declared at /usr/include/openssl/sha.h:122) [-Wdeprecated-declarations]
read-cache.c:1459:2: warning: ‘SHA1_Final’ is deprecated (declared at /usr/include/openssl/sha.h:123) [-Wdeprecated-declarations]
read-cache.c: In function ‘write_index’:
read-cache.c:1598:2: warning: ‘SHA1_Init’ is deprecated (declared at /usr/include/openssl/sha.h:121) [-Wdeprecated-declarations]
$

Grumble:我还不能创建新的标签'sha1','openssl'和'deprecated',我认为这可能是合适的。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.