From: Simon Josefsson Date: Mon, 5 Mar 2007 13:06:42 +0000 (+0000) Subject: Remove confusing priority setting stuff. X-Git-Tag: gnutls_1_7_8~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9f6bc46571b4fa48923effa59cccd1c486753324;p=thirdparty%2Fgnutls.git Remove confusing priority setting stuff. --- diff --git a/doc/examples/ex-client-authz.c b/doc/examples/ex-client-authz.c index c3c1aa96f4..02e383164d 100644 --- a/doc/examples/ex-client-authz.c +++ b/doc/examples/ex-client-authz.c @@ -19,11 +19,11 @@ #define CAFILE "ca.pem" #define MSG "GET / HTTP/1.0\r\n\r\n" -int server_authorized_p = 0; - extern int tcp_connect (void); extern void tcp_close (int sd); +int server_authorized_p = 0; + int authz_recv_callback (gnutls_session_t session, const int *authz_formats, @@ -82,11 +82,6 @@ main (void) gnutls_session_t session; char buffer[MAX_BUF + 1]; gnutls_certificate_credentials_t xcred; - /* Allow connections to servers that have OpenPGP keys as well. - */ - const int cert_type_priority[3] = { GNUTLS_CRT_X509, - GNUTLS_CRT_OPENPGP, 0 - }; const int authz_client_formats[] = { GNUTLS_AUTHZ_SAML_ASSERTION, }; @@ -106,13 +101,12 @@ main (void) */ gnutls_certificate_set_x509_trust_file (xcred, CAFILE, GNUTLS_X509_FMT_PEM); - /* Initialize TLS session + /* Initialize TLS session */ gnutls_init (&session, GNUTLS_CLIENT); /* Use default priorities */ gnutls_set_default_priority (session); - gnutls_certificate_type_set_priority (session, cert_type_priority); /* put the x509 credentials to the current session */ diff --git a/doc/examples/ex-client-srp.c b/doc/examples/ex-client-srp.c index 86d2d607cf..c26364ad8d 100644 --- a/doc/examples/ex-client-srp.c +++ b/doc/examples/ex-client-srp.c @@ -21,10 +21,6 @@ extern void tcp_close (int sd); #define SA struct sockaddr #define MSG "GET / HTTP/1.0\r\n\r\n" -const int kx_priority[] = { GNUTLS_KX_SRP, GNUTLS_KX_SRP_DSS, - GNUTLS_KX_SRP_RSA, 0 -}; - int main (void) { @@ -61,7 +57,6 @@ main (void) /* Set the priorities. */ gnutls_set_default_priority (session); - gnutls_kx_set_priority (session, kx_priority); /* put the SRP credentials to the current session diff --git a/doc/examples/ex-client2.c b/doc/examples/ex-client2.c index ce16311d2a..2e44132a58 100644 --- a/doc/examples/ex-client2.c +++ b/doc/examples/ex-client2.c @@ -28,11 +28,6 @@ main (void) gnutls_session_t session; char buffer[MAX_BUF + 1]; gnutls_certificate_credentials_t xcred; - /* Allow connections to servers that have OpenPGP keys as well. - */ - const int cert_type_priority[3] = { GNUTLS_CRT_X509, - GNUTLS_CRT_OPENPGP, 0 - }; gnutls_global_init (); @@ -49,7 +44,6 @@ main (void) /* Use default priorities */ gnutls_set_default_priority (session); - gnutls_certificate_type_set_priority (session, cert_type_priority); /* put the x509 credentials to the current session */ diff --git a/doc/examples/ex-serv-pgp.c b/doc/examples/ex-serv-pgp.c index 3aa069eb36..04505895e7 100644 --- a/doc/examples/ex-serv-pgp.c +++ b/doc/examples/ex-serv-pgp.c @@ -32,7 +32,6 @@ /* These are global */ gnutls_certificate_credentials_t cred; -const int cert_type_priority[2] = { GNUTLS_CRT_OPENPGP, 0 }; gnutls_dh_params_t dh_params; static int @@ -125,7 +124,6 @@ main (void) for (;;) { session = initialize_tls_session (); - gnutls_certificate_type_set_priority (session, cert_type_priority); sd = accept (listen_sd, (SA *) & sa_cli, &client_len);