aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/tls/gnutls_cert.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/https/tls/gnutls_cert.c')
-rw-r--r--src/daemon/https/tls/gnutls_cert.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/daemon/https/tls/gnutls_cert.c b/src/daemon/https/tls/gnutls_cert.c
index c73467bf..17e95e48 100644
--- a/src/daemon/https/tls/gnutls_cert.c
+++ b/src/daemon/https/tls/gnutls_cert.c
@@ -141,8 +141,8 @@ MHD_gnutls_certificate_free_ca_names (mhd_gtls_cert_credentials_t sc)
141 -*/ 141 -*/
142mhd_gtls_rsa_params_t 142mhd_gtls_rsa_params_t
143mhd_gtls_certificate_get_rsa_params (mhd_gtls_rsa_params_t rsa_params, 143mhd_gtls_certificate_get_rsa_params (mhd_gtls_rsa_params_t rsa_params,
144 gnutls_params_function * func, 144 gnutls_params_function * func,
145 mhd_gtls_session_t session) 145 mhd_gtls_session_t session)
146{ 146{
147 gnutls_params_st params; 147 gnutls_params_st params;
148 int ret; 148 int ret;
@@ -210,7 +210,7 @@ MHD_gnutls_certificate_free_credentials (mhd_gtls_cert_credentials_t sc)
210 **/ 210 **/
211int 211int
212MHD_gnutls_certificate_allocate_credentials (mhd_gtls_cert_credentials_t * 212MHD_gnutls_certificate_allocate_credentials (mhd_gtls_cert_credentials_t *
213 res) 213 res)
214{ 214{
215 *res = gnutls_calloc (1, sizeof (mhd_gtls_cert_credentials_st)); 215 *res = gnutls_calloc (1, sizeof (mhd_gtls_cert_credentials_st));
216 216
@@ -232,8 +232,8 @@ MHD_gnutls_certificate_allocate_credentials (mhd_gtls_cert_credentials_t *
232 */ 232 */
233int 233int
234mhd_gtls_selected_cert_supported_kx (mhd_gtls_session_t session, 234mhd_gtls_selected_cert_supported_kx (mhd_gtls_session_t session,
235 enum MHD_GNUTLS_KeyExchangeAlgorithm ** alg, 235 enum MHD_GNUTLS_KeyExchangeAlgorithm
236 int *alg_size) 236 **alg, int *alg_size)
237{ 237{
238 enum MHD_GNUTLS_KeyExchangeAlgorithm kx; 238 enum MHD_GNUTLS_KeyExchangeAlgorithm kx;
239 enum MHD_GNUTLS_PublicKeyAlgorithm pk; 239 enum MHD_GNUTLS_PublicKeyAlgorithm pk;
@@ -297,7 +297,7 @@ mhd_gtls_selected_cert_supported_kx (mhd_gtls_session_t session,
297 **/ 297 **/
298void 298void
299MHD_gtls_certificate_server_set_request (mhd_gtls_session_t session, 299MHD_gtls_certificate_server_set_request (mhd_gtls_session_t session,
300 gnutls_certificate_request_t req) 300 gnutls_certificate_request_t req)
301{ 301{
302 session->internals.send_cert_req = req; 302 session->internals.send_cert_req = req;
303} 303}
@@ -461,7 +461,7 @@ _gnutls_x509_get_raw_crt_expiration_time (const gnutls_datum_t * cert)
461 **/ 461 **/
462int 462int
463MHD_gtls_certificate_verify_peers2 (mhd_gtls_session_t session, 463MHD_gtls_certificate_verify_peers2 (mhd_gtls_session_t session,
464 unsigned int *status) 464 unsigned int *status)
465{ 465{
466 cert_auth_info_t info; 466 cert_auth_info_t info;
467 467
@@ -549,9 +549,9 @@ MHD_gtls_certificate_expiration_time_peers (mhd_gtls_session_t session)
549 switch (gnutls_certificate_type_get (session)) 549 switch (gnutls_certificate_type_get (session))
550 { 550 {
551 case MHD_GNUTLS_CRT_X509: 551 case MHD_GNUTLS_CRT_X509:
552 return _gnutls_x509_get_raw_crt_expiration_time (&info-> 552 return
553 raw_certificate_list 553 _gnutls_x509_get_raw_crt_expiration_time (&info->raw_certificate_list
554 [0]); 554 [0]);
555 default: 555 default:
556 return (time_t) - 1; 556 return (time_t) - 1;
557 } 557 }
@@ -588,9 +588,9 @@ MHD_gtls_certificate_activation_time_peers (mhd_gtls_session_t session)
588 switch (gnutls_certificate_type_get (session)) 588 switch (gnutls_certificate_type_get (session))
589 { 589 {
590 case MHD_GNUTLS_CRT_X509: 590 case MHD_GNUTLS_CRT_X509:
591 return _gnutls_x509_get_raw_crt_activation_time (&info-> 591 return
592 raw_certificate_list 592 _gnutls_x509_get_raw_crt_activation_time (&info->raw_certificate_list
593 [0]); 593 [0]);
594 default: 594 default:
595 return (time_t) - 1; 595 return (time_t) - 1;
596 } 596 }
@@ -598,9 +598,9 @@ MHD_gtls_certificate_activation_time_peers (mhd_gtls_session_t session)
598 598
599int 599int
600mhd_gtls_raw_cert_to_gcert (gnutls_cert * gcert, 600mhd_gtls_raw_cert_to_gcert (gnutls_cert * gcert,
601 enum MHD_GNUTLS_CertificateType type, 601 enum MHD_GNUTLS_CertificateType type,
602 const gnutls_datum_t * raw_cert, 602 const gnutls_datum_t * raw_cert,
603 int flags /* OR of ConvFlags */ ) 603 int flags /* OR of ConvFlags */ )
604{ 604{
605 switch (type) 605 switch (type)
606 { 606 {
@@ -614,9 +614,9 @@ mhd_gtls_raw_cert_to_gcert (gnutls_cert * gcert,
614 614
615int 615int
616mhd_gtls_raw_privkey_to_gkey (gnutls_privkey * key, 616mhd_gtls_raw_privkey_to_gkey (gnutls_privkey * key,
617 enum MHD_GNUTLS_CertificateType type, 617 enum MHD_GNUTLS_CertificateType type,
618 const gnutls_datum_t * raw_key, 618 const gnutls_datum_t * raw_key,
619 int key_enc /* DER or PEM */ ) 619 int key_enc /* DER or PEM */ )
620{ 620{
621 switch (type) 621 switch (type)
622 { 622 {
@@ -640,8 +640,8 @@ mhd_gtls_raw_privkey_to_gkey (gnutls_privkey * key,
640 */ 640 */
641int 641int
642mhd_gtls_x509_raw_cert_to_gcert (gnutls_cert * gcert, 642mhd_gtls_x509_raw_cert_to_gcert (gnutls_cert * gcert,
643 const gnutls_datum_t * derCert, 643 const gnutls_datum_t * derCert,
644 int flags /* OR of ConvFlags */ ) 644 int flags /* OR of ConvFlags */ )
645{ 645{
646 int ret; 646 int ret;
647 gnutls_x509_crt_t cert; 647 gnutls_x509_crt_t cert;
@@ -671,7 +671,7 @@ mhd_gtls_x509_raw_cert_to_gcert (gnutls_cert * gcert,
671 */ 671 */
672int 672int
673mhd_gtls_x509_crt_to_gcert (gnutls_cert * gcert, 673mhd_gtls_x509_crt_to_gcert (gnutls_cert * gcert,
674 gnutls_x509_crt_t cert, unsigned int flags) 674 gnutls_x509_crt_t cert, unsigned int flags)
675{ 675{
676 int ret = 0; 676 int ret = 0;
677 677
@@ -791,7 +791,7 @@ mhd_gtls_gcert_deinit (gnutls_cert * cert)
791 **/ 791 **/
792void 792void
793MHD_gtls_sign_callback_set (mhd_gtls_session_t session, 793MHD_gtls_sign_callback_set (mhd_gtls_session_t session,
794 gnutls_sign_func sign_func, void *userdata) 794 gnutls_sign_func sign_func, void *userdata)
795{ 795{
796 session->internals.sign_func = sign_func; 796 session->internals.sign_func = sign_func;
797 session->internals.sign_func_userdata = userdata; 797 session->internals.sign_func_userdata = userdata;