OP-TEE / optee_os

Trusted side of the TEE
Other
1.59k stars 1.07k forks source link

PKCS#11 TA C_CopyObject doesn't work #6818

Closed embetrix closed 5 months ago

embetrix commented 6 months ago

I created 2x ecdsa keypairs with flag CKA_COPYABLE

and used the following template to copy both public and private key from Object1 to Object2

    CK_ATTRIBUTE copyTemplate[] = {
        {CKA_TOKEN,     &true_val,       sizeof(CK_BBOOL)},
        {CKA_LABEL,     dest_label,      (CK_ULONG)strlen((char*)dest_label)},
        {CKA_ID,        dest_keyid,      KEYID_LEN },
    };

The operation return CKR_OK

But the Object2 is still different from Object1.

However this seems to be working with SoftHSM.

etienne-lms commented 6 months ago

Do you mean the objects' attributes differ? Which ones differ? From your code spinet, i guess label and ID would differ.

github-actions[bot] commented 5 months 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.