aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/tls/gnutls_ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/https/tls/gnutls_ui.c')
-rw-r--r--src/daemon/https/tls/gnutls_ui.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/daemon/https/tls/gnutls_ui.c b/src/daemon/https/tls/gnutls_ui.c
index 7709b2b7..a2594332 100644
--- a/src/daemon/https/tls/gnutls_ui.c
+++ b/src/daemon/https/tls/gnutls_ui.c
@@ -74,7 +74,8 @@ MHD__gnutls_dh_set_prime_bits (MHD_gtls_session_t session, unsigned int bits)
74 **/ 74 **/
75int 75int
76MHD__gnutls_dh_get_group (MHD_gtls_session_t session, 76MHD__gnutls_dh_get_group (MHD_gtls_session_t session,
77 MHD_gnutls_datum_t * raw_gen, MHD_gnutls_datum_t * raw_prime) 77 MHD_gnutls_datum_t * raw_gen,
78 MHD_gnutls_datum_t * raw_prime)
78{ 79{
79 MHD_gtls_dh_info_st *dh; 80 MHD_gtls_dh_info_st *dh;
80 int ret; 81 int ret;
@@ -107,7 +108,8 @@ MHD__gnutls_dh_get_group (MHD_gtls_session_t session,
107 return ret; 108 return ret;
108 } 109 }
109 110
110 ret = MHD__gnutls_set_datum (raw_gen, dh->generator.data, dh->generator.size); 111 ret =
112 MHD__gnutls_set_datum (raw_gen, dh->generator.data, dh->generator.size);
111 if (ret < 0) 113 if (ret < 0)
112 { 114 {
113 MHD_gnutls_assert (); 115 MHD_gnutls_assert ();
@@ -132,7 +134,7 @@ MHD__gnutls_dh_get_group (MHD_gtls_session_t session,
132 **/ 134 **/
133int 135int
134MHD__gnutls_dh_get_pubkey (MHD_gtls_session_t session, 136MHD__gnutls_dh_get_pubkey (MHD_gtls_session_t session,
135 MHD_gnutls_datum_t * raw_key) 137 MHD_gnutls_datum_t * raw_key)
136{ 138{
137 MHD_gtls_dh_info_st *dh; 139 MHD_gtls_dh_info_st *dh;
138 mhd_anon_auth_info_t anon_info; 140 mhd_anon_auth_info_t anon_info;
@@ -172,7 +174,7 @@ MHD__gnutls_dh_get_pubkey (MHD_gtls_session_t session,
172 } 174 }
173 175
174 return MHD__gnutls_set_datum (raw_key, dh->public_key.data, 176 return MHD__gnutls_set_datum (raw_key, dh->public_key.data,
175 dh->public_key.size); 177 dh->public_key.size);
176} 178}
177 179
178/** 180/**
@@ -203,7 +205,7 @@ MHD_gtls_rsa_export_get_pubkey (MHD_gtls_session_t session,
203 return GNUTLS_E_INTERNAL_ERROR; 205 return GNUTLS_E_INTERNAL_ERROR;
204 206
205 ret = MHD__gnutls_set_datum (modulus, info->rsa_export.modulus.data, 207 ret = MHD__gnutls_set_datum (modulus, info->rsa_export.modulus.data,
206 info->rsa_export.modulus.size); 208 info->rsa_export.modulus.size);
207 if (ret < 0) 209 if (ret < 0)
208 { 210 {
209 MHD_gnutls_assert (); 211 MHD_gnutls_assert ();
@@ -211,7 +213,7 @@ MHD_gtls_rsa_export_get_pubkey (MHD_gtls_session_t session,
211 } 213 }
212 214
213 ret = MHD__gnutls_set_datum (exponent, info->rsa_export.exponent.data, 215 ret = MHD__gnutls_set_datum (exponent, info->rsa_export.exponent.data,
214 info->rsa_export.exponent.size); 216 info->rsa_export.exponent.size);
215 if (ret < 0) 217 if (ret < 0)
216 { 218 {
217 MHD_gnutls_assert (); 219 MHD_gnutls_assert ();
@@ -491,8 +493,8 @@ MHD_gtls_certificate_client_get_request_status (MHD_gtls_session_t session)
491 **/ 493 **/
492int 494int
493MHD__gnutls_fingerprint (enum MHD_GNUTLS_HashAlgorithm algo, 495MHD__gnutls_fingerprint (enum MHD_GNUTLS_HashAlgorithm algo,
494 const MHD_gnutls_datum_t * data, 496 const MHD_gnutls_datum_t * data,
495 void *result, size_t * result_size) 497 void *result, size_t * result_size)
496{ 498{
497 GNUTLS_HASH_HANDLE td; 499 GNUTLS_HASH_HANDLE td;
498 int hash_len = MHD_gnutls_hash_get_algo_len (HASH2MAC (algo)); 500 int hash_len = MHD_gnutls_hash_get_algo_len (HASH2MAC (algo));
@@ -533,7 +535,7 @@ MHD__gnutls_fingerprint (enum MHD_GNUTLS_HashAlgorithm algo,
533 **/ 535 **/
534void 536void
535MHD__gnutls_certificate_set_dh_params (MHD_gtls_cert_credentials_t res, 537MHD__gnutls_certificate_set_dh_params (MHD_gtls_cert_credentials_t res,
536 MHD_gtls_dh_params_t dh_params) 538 MHD_gtls_dh_params_t dh_params)
537{ 539{
538 res->dh_params = dh_params; 540 res->dh_params = dh_params;
539} 541}
@@ -550,7 +552,7 @@ MHD__gnutls_certificate_set_dh_params (MHD_gtls_cert_credentials_t res,
550 **/ 552 **/
551void 553void
552MHD_gnutls_certificate_set_params_function (MHD_gtls_cert_credentials_t res, 554MHD_gnutls_certificate_set_params_function (MHD_gtls_cert_credentials_t res,
553 MHD_gnutls_params_function * func) 555 MHD_gnutls_params_function * func)
554{ 556{
555 res->params_func = func; 557 res->params_func = func;
556} 558}
@@ -567,7 +569,7 @@ MHD_gnutls_certificate_set_params_function (MHD_gtls_cert_credentials_t res,
567 **/ 569 **/
568void 570void
569MHD__gnutls_certificate_set_verify_flags (MHD_gtls_cert_credentials_t 571MHD__gnutls_certificate_set_verify_flags (MHD_gtls_cert_credentials_t
570 res, unsigned int flags) 572 res, unsigned int flags)
571{ 573{
572 res->verify_flags = flags; 574 res->verify_flags = flags;
573} 575}
@@ -585,9 +587,9 @@ MHD__gnutls_certificate_set_verify_flags (MHD_gtls_cert_credentials_t
585 **/ 587 **/
586void 588void
587MHD__gnutls_certificate_set_verify_limits (MHD_gtls_cert_credentials_t 589MHD__gnutls_certificate_set_verify_limits (MHD_gtls_cert_credentials_t
588 res, 590 res,
589 unsigned int max_bits, 591 unsigned int max_bits,
590 unsigned int max_depth) 592 unsigned int max_depth)
591{ 593{
592 res->verify_depth = max_depth; 594 res->verify_depth = max_depth;
593 res->verify_bits = max_bits; 595 res->verify_bits = max_bits;
@@ -605,9 +607,9 @@ MHD__gnutls_certificate_set_verify_limits (MHD_gtls_cert_credentials_t
605 **/ 607 **/
606void 608void
607MHD__gnutls_certificate_set_rsa_export_params (MHD_gtls_cert_credentials_t 609MHD__gnutls_certificate_set_rsa_export_params (MHD_gtls_cert_credentials_t
608 res, 610 res,
609 MHD_gtls_rsa_params_t 611 MHD_gtls_rsa_params_t
610 rsa_params) 612 rsa_params)
611{ 613{
612 res->rsa_params = rsa_params; 614 res->rsa_params = rsa_params;
613} 615}
@@ -624,7 +626,7 @@ MHD__gnutls_certificate_set_rsa_export_params (MHD_gtls_cert_credentials_t
624 **/ 626 **/
625void 627void
626MHD_gnutls_anon_set_params_function (MHD_gtls_anon_server_credentials_t res, 628MHD_gnutls_anon_set_params_function (MHD_gtls_anon_server_credentials_t res,
627 MHD_gnutls_params_function * func) 629 MHD_gnutls_params_function * func)
628{ 630{
629 res->params_func = func; 631 res->params_func = func;
630} 632}