1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-08 19:02:06 +03:00

priv: Move gcrypt functions to gcrypt header.

This commit is contained in:
Andreas Schneider
2011-09-17 18:36:17 +02:00
parent 33754c391f
commit ffb827b539
3 changed files with 6 additions and 7 deletions

View File

@@ -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);

View File

@@ -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: */

View File

@@ -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) {