# PKCS#11 key not properly supported?

**URL:** <https://www.ruby-forum.com/t/pkcs-11-key-not-properly-supported/244135>\
**Category:** NGINX\
**Created:** [February 25, 2016, 9:35am UTC](https://www.ruby-forum.com/t/pkcs-11-key-not-properly-supported/244135 "2016-02-25T09:35:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [February 25, 2016, 9:35am UTC](https://www.ruby-forum.com/t/pkcs-11-key-not-properly-supported/244135/1 "2016-02-25T09:35:00Z")

</div>

I’ll try to keep this message simple.

E.G this command will work using the new version of engine\_pkcs11:

sudo openssl req -engine pkcs11 -new -key  
“pkcs11:model=SoftHSM;manufacturer=SoftHSM;serial=1;token=;id=%d4%b1%6d%62%5f%8c%f4%ec%19%05%0e%bc%2e%a0%9e%0f%d3%f1%2f%87;object=cakey;object-type=private;pin-value=1111”  
-keyform engine -out req.pem -text -x509 -subj “/CN=Test”

But this will result in error:

ssl\_certificate\_key  
“engine:pkcs11:pkcs11:model=SoftHSM;manufacturer=SoftHSM;serial=1;token=;id=%d4%b1%6d%62%5f%8c%f4%ec%19%05%0e%bc%2e%a0%9e%0f%d3%f1%2f%87;object=cakey;object-type=private;pin-value=1111”;

The error message is:

nginx: [emerg]  
ENGINE\_load\_private\_key(“pkcs11:model=SoftHSM;manufacturer=SoftHSM;serial=1;token=;id=%d4%b1%6d%62%5f%8c%f4%ec%19%05%0e%bc%2e%a0%9e%0f%d3%f1%2f%87;object=cakey;object-type=private;pin-value=1111”)  
failed (SSL: error:26096075:engine routines:ENGINE\_load\_private\_key:not  
initialised)

Any help regarding this is appreciated, Thanks.
