mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-06 16:36:16 +08:00
修复:SM3 sm3_compute_id_digest 总是进入默认ID分支。 (#1126)
* 修复:SM3 sm3_compute_id_digest 总是进入默认ID分支。 修复:SM3 sm3_compute_id_digest 总是进入默认ID分支。 * 修改代码格式
This commit is contained in:
@@ -117,7 +117,7 @@ void sm3_compute_id_digest(unsigned char z[32], const char *id,
|
||||
0x00, 0x00, 0x00, 0x00, 0x06, 0x90,
|
||||
};
|
||||
|
||||
if (!id || strcmp(id, "1234567812345678")) {
|
||||
if (!id || (strcmp(id, "1234567812345678") == 0)) {
|
||||
unsigned int digest[8] = {
|
||||
0xadadedb5U, 0x0446043fU, 0x08a87aceU, 0xe86d2243U,
|
||||
0x8e232383U, 0xbfc81fe2U, 0xcf9117c8U, 0x4707011dU,
|
||||
|
||||
Reference in New Issue
Block a user