mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-08 23:13:38 +08:00
Fix sm2_bn_from_asn1_integer bug
This commit is contained in:
@@ -196,7 +196,7 @@ int sm2_bn_from_asn1_integer(SM2_BN r, const uint8_t *d, size_t dlen)
|
|||||||
error_print();
|
error_print();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
memcmp(buf + sizeof(buf) - dlen, d, dlen);
|
memcpy(buf + sizeof(buf) - dlen, d, dlen);
|
||||||
sm2_bn_from_bytes(r, buf);
|
sm2_bn_from_bytes(r, buf);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user