opendnssec / SoftHSMv2

SoftHSM version 2
http://www.softhsm.org/
Other
767 stars 339 forks source link

CKA_MODIFIABLE must be true to Unwrap AES Key #707

Open reznik99 opened 1 year ago

reznik99 commented 1 year ago

When unwrapping an AES-256 Key into a SoftHSM2 partition using RSA-OAEP SHA-1 the following error is thrown:

An object is with CKA_MODIFIABLE set to false is not modifiable

Setting CKA_MODIFIABLE to True in the unwrapping template, resolves the issue.

But unwrapping a key creates a new object, it doesn't modify the object, why is this error being thrown, and is this expected?

I would like my Injected keys to not be modifiable.

Unwrapping Template:

CKA_SENSITIVE=true
CKA_TOKEN=true
CKA_PRIVATE=true
CKA_ENCRYPT=true
CKA_EXTRACTABLE=true
CKA_MODIFIABLE=false

Thanks, Frank