Check, whether EVP_PKEY structure contains private key

2011-02-18 Thread Peter Gubis
Hi, is there any way to determine, whether EVP_PKEY structure contains a private key, after the key was loaded from hsm/token? I've got a piece of code, where the decision is made on RSA domain parameters included in the structure. Unfortunately Engine/HSM protected private keys doesn't populates

Re: client authentication and tokens.

2010-03-19 Thread Peter Gubis
On 13. 3. 2010 0:37, John R Pierce wrote: > we have a client-server application pair (ok, the server side is > tomcat), the client is using an Aladdin eToken w/ openssl and > engine_pkcs11 and aladdin's driver. thats all fine and working now. > the client application has long running persistenc

Re: i2d_X509_REQ_INFO doesn't convert req_info structure properly

2010-03-11 Thread Peter Gubis
On 11. 3. 2010 17:54, Dr. Stephen Henson wrote: > On Thu, Mar 11, 2010, Peter Gubis wrote: > > >> int datasig_len; >> unsigned char *tobesigned; >> datasig_len = i2d_X509_REQ_INFO( req->req_info, NULL ); >> tobesigned = (unsigned char *) malloc(

i2d_X509_REQ_INFO doesn't convert req_info structure properly

2010-03-11 Thread Peter Gubis
Hi all, I'm trying to create X509 certificate request signed inside smart card using PKCS11 interface. To perform this task I have to perform following steps: 1, create certificate request (X509_new) 2, load public key (X509_REQ_set_pubkey) 3, set up subject name and extensions as required 4, exp