aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/tls/gnutls_mpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/https/tls/gnutls_mpi.c')
-rw-r--r--src/daemon/https/tls/gnutls_mpi.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/daemon/https/tls/gnutls_mpi.c b/src/daemon/https/tls/gnutls_mpi.c
index 918e6480..5a4e25a4 100644
--- a/src/daemon/https/tls/gnutls_mpi.c
+++ b/src/daemon/https/tls/gnutls_mpi.c
@@ -80,26 +80,6 @@ MHD_gtls_mpi_scan_nz (mpi_t * ret_mpi, const opaque * buffer, size_t * nbytes)
80} 80}
81 81
82int 82int
83MHD_gtls_mpi_scan_pgp (mpi_t * ret_mpi, const opaque * buffer,
84 size_t * nbytes)
85{
86 int ret;
87 ret = gcry_mpi_scan (ret_mpi, GCRYMPI_FMT_PGP, buffer, *nbytes, nbytes);
88 if (ret)
89 return GNUTLS_E_MPI_SCAN_FAILED;
90
91 /* MPIs with 0 bits are illegal
92 */
93 if (MHD__gnutls_mpi_get_nbits (*ret_mpi) == 0)
94 {
95 MHD_gtls_mpi_release (ret_mpi);
96 return GNUTLS_E_MPI_SCAN_FAILED;
97 }
98
99 return 0;
100}
101
102int
103MHD_gtls_mpi_print (void *buffer, size_t * nbytes, const mpi_t a) 83MHD_gtls_mpi_print (void *buffer, size_t * nbytes, const mpi_t a)
104{ 84{
105 int ret; 85 int ret;
@@ -115,7 +95,7 @@ MHD_gtls_mpi_print (void *buffer, size_t * nbytes, const mpi_t a)
115} 95}
116 96
117/* Always has the first bit zero */ 97/* Always has the first bit zero */
118int 98static int
119MHD_gtls_mpi_print_lz (void *buffer, size_t * nbytes, const mpi_t a) 99MHD_gtls_mpi_print_lz (void *buffer, size_t * nbytes, const mpi_t a)
120{ 100{
121 int ret; 101 int ret;