libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit b2e46ef8e2c4bc1e15d5da4a074f26195df527ee
parent ccf9226de0c1ba687cd07a6f96203893cd40b3a2
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 23 Nov 2008 09:18:29 +0000

dce

Diffstat:
Msrc/daemon/https/tls/auth_cert.c | 2+-
Msrc/testcurl/https/tls_daemon_options_test.c | 46----------------------------------------------
2 files changed, 1 insertion(+), 47 deletions(-)

diff --git a/src/daemon/https/tls/auth_cert.c b/src/daemon/https/tls/auth_cert.c @@ -214,7 +214,7 @@ _find_x509_cert (const MHD_gtls_cert_credentials_t cred, { if ((result = MHD__gnutls_cert_get_issuer_dn (&cred->cert_list[i][j], - &odn)) < 0) + &odn)) != 0) { MHD_gnutls_assert (); return result; diff --git a/src/testcurl/https/tls_daemon_options_test.c b/src/testcurl/https/tls_daemon_options_test.c @@ -28,7 +28,6 @@ #include "microhttpd.h" #include <sys/stat.h> - #include "gnutls.h" #include <curl/curl.h> @@ -382,50 +381,6 @@ test_protocol_version (FILE * test_fd, char *cipher_suite, return 0; } - -static int -tls_setup (MHD_gtls_session_t * session, - MHD_gnutls_datum_t * key, - MHD_gnutls_datum_t * cert, MHD_gtls_cert_credentials_t * xcred) -{ - int ret; - const char **err_pos; - - MHD__gnutls_certificate_allocate_credentials (xcred); - - MHD_gtls_set_datum_m (key, srv_key_pem, strlen (srv_key_pem), &malloc); - MHD_gtls_set_datum_m (cert, srv_self_signed_cert_pem, - strlen (srv_self_signed_cert_pem), &malloc); - - MHD__gnutls_certificate_set_x509_key_mem (*xcred, cert, key, - GNUTLS_X509_FMT_PEM); - - MHD__gnutls_init (session, GNUTLS_CLIENT); - ret = MHD__gnutls_priority_set_direct (*session, "NORMAL", err_pos); - if (ret < 0) - { - return -1; - } - - MHD__gnutls_credentials_set (*session, MHD_GNUTLS_CRD_CERTIFICATE, xcred); - return 0; -} - -static int -tls_teardown (MHD_gtls_session_t session, - MHD_gnutls_datum_t * key, - MHD_gnutls_datum_t * cert, MHD_gtls_cert_credentials_t xcred) -{ - - MHD_gtls_free_datum_m (key, free); - MHD_gtls_free_datum_m (cert, free); - - MHD__gnutls_deinit (session); - - MHD__gnutls_certificate_free_credentials (xcred); - return 0; -} - /** * test single threaded server * @@ -479,7 +434,6 @@ main (int argc, char *const *argv) unsigned int cpos; char test_name[64]; - int mac[] = { MHD_GNUTLS_MAC_SHA1, 0 }; int daemon_flags = MHD_USE_THREAD_PER_CONNECTION | MHD_USE_SSL | MHD_USE_DEBUG;