|
|
|
@ -244,10 +244,16 @@ namespace cryptoki { |
|
|
|
|
AttributeList attrs; |
|
|
|
|
attrs.push_back(Attribute(CKA_CLASS) |
|
|
|
|
.from<CK_OBJECT_CLASS>(CKO_CERTIFICATE)); |
|
|
|
|
attrs.push_back(Attribute(CKA_TOKEN).from<CK_BBOOL>(TRUE)); |
|
|
|
|
attrs.push_back(Attribute(CKA_PRIVATE).from<CK_BBOOL>(FALSE)); |
|
|
|
|
attrs.push_back(Attribute(CKA_MODIFIABLE).from<CK_BBOOL>(TRUE)); |
|
|
|
|
attrs.push_back(Attribute(CKA_LABEL, label)); |
|
|
|
|
attrs.push_back(Attribute(CKA_CERTIFICATE_TYPE) |
|
|
|
|
.from<CK_CERTIFICATE_TYPE>(CKC_X_509)); |
|
|
|
|
attrs.push_back(Attribute(CKA_LABEL, label)); |
|
|
|
|
attrs.push_back(Attribute(CKA_SUBJECT, cert.subjectDER())); |
|
|
|
|
attrs.push_back(Attribute(CKA_ID, cert.id())); |
|
|
|
|
attrs.push_back(Attribute(CKA_ISSUER, cert.issuerDER())); |
|
|
|
|
attrs.push_back(Attribute(CKA_SERIAL_NUMBER, cert.serial())); |
|
|
|
|
attrs.push_back(Attribute(CKA_VALUE, cert.valueDER())); |
|
|
|
|
return create(attrs); |
|
|
|
|
} |
|
|
|
|