Added "fix" for libgcrypt threading, ...
... but it doesn't seem to work. This is however the recommanded way of initializing threading : http://lists.gnupg.org/pipermail/gcrypt-devel/2009-February/001452.html
Этот коммит содержится в:
родитель
717eff71dd
Коммит
e34da1b94d
@ -104,6 +104,12 @@ int ssh_get_random(void *where, int len, int strong){
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBGCRYPT
|
||||||
|
#include <errno.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
GCRY_THREAD_OPTION_PTHREAD_IMPL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This inits the values g and p which are used for DH key agreement
|
* This inits the values g and p which are used for DH key agreement
|
||||||
@ -113,6 +119,7 @@ int ssh_crypto_init(void) {
|
|||||||
if (ssh_crypto_initialized == 0) {
|
if (ssh_crypto_initialized == 0) {
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
gcry_check_version(NULL);
|
gcry_check_version(NULL);
|
||||||
|
gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
|
||||||
|
|
||||||
if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P,0)) {
|
if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P,0)) {
|
||||||
gcry_control(GCRYCTL_INIT_SECMEM, 4096);
|
gcry_control(GCRYCTL_INIT_SECMEM, 4096);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user