diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-04-17 09:47:59 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-04-17 09:47:59 +0000 |
commit | 063d8048c5187aed61920e72e0c109bd34466cd4 (patch) | |
tree | 56787e6e55a9809b3bf776c10402389082d18b21 /lib/gnutls_gcry.c | |
parent | 05de2ecb11d8956aa7def54bf324e8667ab5379c (diff) | |
download | gnutls-063d8048c5187aed61920e72e0c109bd34466cd4.tar.gz |
first changes for libgmp supportgnutls_0_4_with_nettle
Diffstat (limited to 'lib/gnutls_gcry.c')
-rw-r--r-- | lib/gnutls_gcry.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/gnutls_gcry.c b/lib/gnutls_gcry.c index 7827058839..a18908ea66 100644 --- a/lib/gnutls_gcry.c +++ b/lib/gnutls_gcry.c @@ -25,27 +25,26 @@ /* Functions that refer to the libgcrypt library. */ -void _gnutls_mpi_release( MPI* x) { +void _gnutls_mpi_release( GNUTLS_MPI* x) { if (*x==NULL) return; gcry_mpi_release(*x); *x=NULL; } -MPI _gnutls_mpi_new( int bits) { - return gcry_mpi_new( bits); -} - -int _gnutls_mpi_scan( GCRY_MPI *ret_mpi, const opaque *buffer, size_t *nbytes ) { +int _gnutls_mpi_scan( GNUTLS_MPI *ret_mpi, const opaque *buffer, size_t *nbytes ) { return gcry_mpi_scan( ret_mpi, GCRYMPI_FMT_USG, buffer, nbytes); +} +int _gnutls_mpi_scan_pgp( GNUTLS_MPI *ret_mpi, const opaque *buffer, size_t *nbytes ) { + return gcry_mpi_scan( ret_mpi, GCRYMPI_FMT_PGP, buffer, nbytes); } -int _gnutls_mpi_print( opaque *buffer, size_t *nbytes, const GCRY_MPI a ) { +int _gnutls_mpi_print( opaque *buffer, size_t *nbytes, const GNUTLS_MPI a ) { return gcry_mpi_print( GCRYMPI_FMT_USG, buffer, nbytes, a); } /* Always has the first bit zero */ -int _gnutls_mpi_print_lz( opaque *buffer, size_t *nbytes, const GCRY_MPI a ) { +int _gnutls_mpi_print_lz( opaque *buffer, size_t *nbytes, const GNUTLS_MPI a ) { return gcry_mpi_print( GCRYMPI_FMT_STD, buffer, nbytes, a); } @@ -54,7 +53,7 @@ int _gnutls_mpi_print_lz( opaque *buffer, size_t *nbytes, const GCRY_MPI a ) { * from asn1 structs. Combines the read and mpi_scan * steps. */ -int _gnutls_x509_read_int( node_asn* node, char* value, char* tmpstr, int tmpstr_size, MPI* ret_mpi) { +int _gnutls_x509_read_int( node_asn* node, char* value, char* tmpstr, int tmpstr_size, GNUTLS_MPI* ret_mpi) { int len, result; len = tmpstr_size - 1; |