]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Remove confusing priority setting stuff.
authorSimon Josefsson <simon@josefsson.org>
Mon, 5 Mar 2007 13:06:42 +0000 (13:06 +0000)
committerSimon Josefsson <simon@josefsson.org>
Mon, 5 Mar 2007 13:06:42 +0000 (13:06 +0000)
doc/examples/ex-client-authz.c
doc/examples/ex-client-srp.c
doc/examples/ex-client2.c
doc/examples/ex-serv-pgp.c

index c3c1aa96f45fd54f940718632565c0996064e154..02e383164dd7887fa038c9456ca9f37cd3602cce 100644 (file)
 #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
    */
index 86d2d607cfeaca5b66299192eb21ee12de25aa43..c26364ad8dd0245652a7d1014b12da107ad8a33a 100644 (file)
@@ -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
index ce16311d2af5531574b8d786bb958e3b6d4082e5..2e44132a5896eb2063f239e7696f1e15117a9e0a 100644 (file)
@@ -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
    */
index 3aa069eb367bcb3596be9efe18eba2c64e9ba73b..04505895e72646e09065b07abcbf208f8f5ecf36 100644 (file)
@@ -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);