Commit a7d441ec authored by npzacs's avatar npzacs
Browse files

gcrypt thread callbacks were deprecated in 1.6.0

parent bf03b08d
......@@ -32,10 +32,14 @@
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#include <gcrypt.h>
#ifdef HAVE_PTHREAD_H
#if GCRYPT_VERSION_NUMBER < 0x010600
#include <pthread.h>
#endif
#endif
/* elliptic curve from AACS specs */
#define AACS_EC_p "9DC9D81355ECCEB560BDB09EF9EAE7C479A7D7DF"
......@@ -52,7 +56,9 @@
/* Use pthread in libgcrypt */
#ifdef HAVE_PTHREAD_H
# if GCRYPT_VERSION_NUMBER < 0x010600
GCRY_THREAD_OPTION_PTHREAD_IMPL;
# endif
#endif
/* include some elliptic curve utils from libgcrypt */
......@@ -121,7 +127,9 @@ int crypto_init()
if (!crypto_init_check) {
crypto_init_check = 1;
#ifdef HAVE_PTHREAD_H
# if GCRYPT_VERSION_NUMBER < 0x010600
gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
# endif
#endif
if (!gcry_check_version(GCRYPT_VERSION)) {
crypto_init_check = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment