mirror of
https://gitee.com/openharmony/security_crypto_framework
synced 2024-11-23 06:49:44 +00:00
commit
82acdbdc9c
@ -432,9 +432,9 @@ HcfResult BigIntegerToBigNum(const HcfBigInteger *src, BIGNUM **dest)
|
||||
}
|
||||
|
||||
if (IsBigEndian()) {
|
||||
*dest = OpensslBin2Bn((src->data), (src->len), NULL);
|
||||
*dest = OpensslBin2Bn((src->data), (src->len), *dest);
|
||||
} else {
|
||||
*dest = OpensslLeBin2Bn((src->data), (src->len), NULL);
|
||||
*dest = OpensslLeBin2Bn((src->data), (src->len), *dest);
|
||||
}
|
||||
|
||||
if (*dest == NULL) {
|
||||
|
@ -33,8 +33,6 @@ static HcfResult BuildSm2Ciphertext(const Sm2CipherTextSpec *spec, struct Sm2Cip
|
||||
LOGE("Build y failed.");
|
||||
return HCF_ERR_CRYPTO_OPERATION;
|
||||
}
|
||||
sm2Text->c3 = OpensslAsn1OctetStringNew();
|
||||
sm2Text->c2 = OpensslAsn1OctetStringNew();
|
||||
if (sm2Text->c3 == NULL || sm2Text->c2 == NULL) {
|
||||
LOGE("SM2 openssl [ASN1_OCTET_STRING_new] c3 c2 fail");
|
||||
HcfPrintOpensslError();
|
||||
|
Loading…
Reference in New Issue
Block a user