mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-09 07:23:56 +08:00
some bug fix
This commit is contained in:
@@ -67,9 +67,10 @@ ASN1_SEQUENCE(SM2CiphertextValue) = {
|
||||
IMPLEMENT_ASN1_FUNCTIONS(SM2CiphertextValue)
|
||||
IMPLEMENT_ASN1_DUP_FUNCTION(SM2CiphertextValue)
|
||||
|
||||
int SM2CiphertextValue_size(const EC_GROUP *group, size_t inlen)
|
||||
int SM2_ciphertext_size(const EC_KEY *ec_key, size_t inlen)
|
||||
{
|
||||
int ret;
|
||||
const EC_GROUP *group = NULL;
|
||||
ASN1_OCTET_STRING s;
|
||||
int len = 0, i;
|
||||
|
||||
@@ -78,6 +79,10 @@ int SM2CiphertextValue_size(const EC_GROUP *group, size_t inlen)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ec_key) {
|
||||
group = EC_KEY_get0_group(ec_key);
|
||||
}
|
||||
|
||||
if (group) {
|
||||
ASN1_INTEGER a;
|
||||
unsigned char buf[4] = {0xff};
|
||||
|
||||
Reference in New Issue
Block a user