On Mon, Sep 21, 2009, Moribius wrote: > > Hello, > I need to find a key in a certificate to crypt data with it, > > Firstly, I'm using X509_get_pubkey(...) function and I get my EVP_PKEY: ok > on this point, it works. > > Secondly, I want to crypt my data with it, so I've to use > EVP_PKEY_encrypt_init(ctx) functions before launching the > EVP_PKEY_encrypt(...). So I declare "EVP_PKEY_CTX *ctx;" but visual refuse > to compile, it can't find the identificator. > > Someone could say me why? And how fix it? Thanks a lot. > > ps: error is "c:\crypto\engine.cpp(31) : error C2065: 'EVP_PKEY_CTX' : > identificateur non déclaré" >
Are you using an older version of the header files? EVP_PKEY_CTX is only in 1.0.0 and later. I'm not sure what you mean by "crypt my data with it" but if you mean bulk encryption of data then EVP_PKEY isn't an appropriate method, you should use EVP_CIPHER instead. 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 Development Mailing List [email protected] Automated List Manager [email protected]
