Unable to input a length in the pkcs11-key-generation python script that generates MKEK
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Barbican |
Fix Released
|
Medium
|
Fernando Diaz |
Bug Description
PKCS11-
The issue is seen while generating MKEK which takes the length of MKEK as one of the argument. The script generates "Invalid Attribute Value " as the response when the length of the argument is passed as integer (In this case , it is 32).
For Ex :# python pkcs11-
HSM returned response code: 0x13L CKR_ATTRIBUTE_
This is because the length of the argument is coming as String instead of an integer .The length argument needs to be converted into proper integer in order run the script sucessfully
WorkAround : The length argument defaults to 32 integer value .Hence when the length argument is not passed to the script , the value of the length arugment defaults to 32 and the script generates the MKEK values successfully
For Ex : # python pkcs11-
Verified label !
MKEK successfully generated!
Changed in barbican: | |
assignee: | nobody → asha (asha-seshagiri) |
Changed in barbican: | |
assignee: | asha (asha-seshagiri) → Fernando Diaz (diazjf) |
summary: |
- Unable to run pkcs11-key-generation python script that generates MKEK + Unable to input a length in the pkcs11-key-generation python script that + generates MKEK |
Changed in barbican: | |
milestone: | none → mitaka-1 |
importance: | Undecided → Medium |
stack@stack- VirtualBox: /opt/stack/ barbican/ bin$ sudo python pkcs11- key-generation. py --library-path /usr/local/ lib/softhsm/ libsofthsm2. so --passphrase mypassword --slot-id 1 mkek --length 32 --label 'primarymkek1' INCOMPLETE
No handlers could be found for logger "oslo_config.cfg"
HSM returned response code: 0xd0L CKR_TEMPLATE_
stack@stack- VirtualBox: /opt/stack/ barbican/ bin$ sudo python pkcs11- key-generation. py --library-path /usr/local/ lib/softhsm/ libsofthsm2. so --passphrase mypassword --slot-id 1 mkek --label 'primarymkek1' VirtualBox: /opt/stack/ barbican/ bin$
No handlers could be found for logger "oslo_config.cfg"
MKEK successfully generated!
stack@stack-