errno = 2 after gcry_cipher_open
Jesús Díaz Vico
jesus.diaz.vico at gmail.com
Fri Aug 13 02:19:05 CEST 2010
I'm new to libgcrypt. I'm trying to cipher some data with ARCFOUR, but, just after calling gcry_cipher_open I get errno = 2. The weird thing is that gcry_cipher_open returns
no error (i.e., gcry_error_t == GPG_ERR_NO_ERROR). I'm getting mad trying to find where the problem is.
The way I'm calling gcry_cipher is:
gcry_cipher_open(&chd, GCRY_CIPHER_ARCFOUR, GCRY_CIPHER_MODE_STREAM, GCRY_CIPHER_SECURE);
Where chd is a local variable, declared as gcry_cipher_hd_t, within the function which calls gcry_cipher_open. I've also tried without GCRY_CIPHER_SECURE.
I've compared my code to the check_one_cipher fucntion that tests the algorithms and everything seems the same. Also, I did not had any problem during libgcrypt installation (make check did pass every test).
Could anybody please give me any hint?
More information about the Gcrypt-devel