Fix for copy/paste error in PR 3728, which makes sure the ECC key type is specified.

pull/3743/head
David Garske 2021-02-10 10:14:31 -08:00
parent b704c3b3f8
commit 0c75099111
1 changed files with 2 additions and 2 deletions

View File

@ -1938,8 +1938,8 @@ static int Pkcs11FindEccKey(CK_OBJECT_HANDLE* key, CK_OBJECT_CLASS keyClass,
if (len >= ASN_LONG_LENGTH)
ecPoint[i++] = (ASN_LONG_LENGTH | 1);
ecPoint[i++] = len;
if (public_key->type == 0)
public_key->type = ECC_PUBLICKEY;
if (eccKey->type == 0)
eccKey->type = ECC_PUBLICKEY;
ret = wc_ecc_export_x963(eccKey, ecPoint + i, &len);
}
if (ret == 0 && keyClass == CKO_PUBLIC_KEY) {