priv: Move gcrypt functions to gcrypt header.
Этот коммит содержится в:
родитель
33754c391f
Коммит
ffb827b539
@ -43,6 +43,10 @@ typedef gcry_md_hd_t HMACCTX;
|
||||
|
||||
typedef gcry_mpi_t bignum;
|
||||
|
||||
/* missing gcrypt functions */
|
||||
int my_gcry_dec2bn(bignum *bn, const char *data);
|
||||
char *my_gcry_bn2dec(bignum bn);
|
||||
|
||||
#define bignum_new() gcry_mpi_new(0)
|
||||
#define bignum_free(num) gcry_mpi_release(num)
|
||||
#define bignum_set_word(bn,n) gcry_mpi_set_ui(bn,n)
|
||||
@ -59,7 +63,6 @@ typedef gcry_mpi_t bignum;
|
||||
#define bignum_bn2bin(num,datalen,data) gcry_mpi_print(GCRYMPI_FMT_USG,data,datalen,NULL,num)
|
||||
#define bignum_cmp(num1,num2) gcry_mpi_cmp(num1,num2)
|
||||
|
||||
|
||||
#endif /* HAVE_LIBGCRYPT */
|
||||
|
||||
struct ssh_cipher_struct *ssh_get_ciphertab(void);
|
||||
|
@ -265,11 +265,5 @@ SSH_PACKET_CALLBACK(ssh_packet_kexdh_init);
|
||||
*/
|
||||
#define discard_const_p(type, ptr) ((type *)discard_const(ptr))
|
||||
|
||||
#ifdef HAVE_LIBGCRYPT
|
||||
/* gcrypt_missing.c */
|
||||
int my_gcry_dec2bn(bignum *bn, const char *data);
|
||||
char *my_gcry_bn2dec(bignum bn);
|
||||
#endif /* !HAVE_LIBGCRYPT */
|
||||
|
||||
#endif /* _LIBSSH_PRIV_H */
|
||||
/* vim: set ts=4 sw=4 et cindent: */
|
||||
|
@ -22,7 +22,9 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "libssh/priv.h"
|
||||
#include "libssh/libgcrypt.h"
|
||||
|
||||
#ifdef HAVE_LIBGCRYPT
|
||||
int my_gcry_dec2bn(bignum *bn, const char *data) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user