Closed pengbaolv8 closed 1 month ago
This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.
Hello, expert. i want to import the sm2 public key and encrypt data by this key,but TEE_SetOperationKey will show the error:“invalid obj_type 0xa0000047 or attri_len 0x2”,the object type TEE_TYPE_SM2_PKE_PUBLIC_KEY is wrong?or i miss the some Attribute to init? ==============================code===================================== char x[] = "174071B7E7CF2A12AE380E0C86B9DF469263A6C61FF45BC597AC82C348A3171E"; unsigned int xChar[32]; hex2array(x, xChar,32);
res = TEE_SetOperationKey(Operation, keyHandle);
res = TEE_AsymmetricEncrypt(Operation, NULL, 0, buf1->buffer, buf1->size, buf2->buffer, &outlen);