Thank!
but how can I use EVP_get_cipherbyname(const char *name);?

ciphers[0].cipher = EVP_get_cipherbyname("BLABLABLABLA");
perror("EVP_get_cipherbyname()");

./evp
EVP_get_cipherbyname(): Success

And always: success :-) but doesn't work.

King regards,
 mark


> That wont work in many cases because you are trying to initialize the
> structure with the return value from a function.
>
> The initialization is done at compile time but that return value is only
> available at runtime.
>
> You have a couple of options. One is to change that definition to a function
> pointer which you set to EVP_aes_128_cbc note *NOT* EVP_aes_128_cbc(). Then at
> runtime you call that function pointer to get the EVP_CIPHER.
>
> The alternative is to include something which you can lookup to get that
> cipher. An example would be NID_aes_128_cbc which you can then lookup using
> EVP_getcipherbynid().
>
> Steve.
> --
> Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
> OpenSSL project core developer and freelance consultant.
> Funding needed! Details on homepage.
> Homepage: http://www.drh-consultancy.demon.co.uk
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [email protected]
> Automated List Manager                           [EMAIL PROTECTED]
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to