On Wed, Mar 07, 2012, Sunjeet Singh wrote:

> Greetings again, I'm back with another question. Any help will be much 
> appreciated-
> 
> My OpenSSL Application uses the OpenSSL C function call-
> SSL_CTX_use_certificate_chain_file( sslCtx, keyFile );
>       where keyFile is the path to a .PEM file containing the private key and 
> certificate.
> 
> But now, with a nCipher HSM using the CHIL engine, I have-
> 
> 1. Private key stored on HSM card under the name "rsa-test";
> 2. Key blob stored in the file- "C:\ProgramData\nCipher\Key Management 
> Data\local\key_hwcrhk_rsa-test"; and
> 3. A self-signed certificate that I generated under the folder 
> "C:\temp\rsa-test.CRT"
> 
> Which path should my keyFile point to? 
> 

None of the above ;-)

If you have the CHIL ENGINE you load a private key using
ENGINE_load_private_key() and pass the appropriate ENGINE pointer and the name
of the key which will presumably be "rsa-test".

That will get you an EVP_PKEY pointer which you can pass to
SSL_CTX_use_PrivateKey().

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to