]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
do not set the SYSTEM priority string by default in examples (not yet).
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 25 Jan 2014 09:24:16 +0000 (10:24 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 25 Jan 2014 09:24:16 +0000 (10:24 +0100)
doc/examples/ex-cert-select-pkcs11.c
doc/examples/ex-cert-select.c
doc/examples/ex-client-dtls.c
doc/examples/ex-client-srp.c
doc/examples/ex-client-x509.c
doc/examples/ex-serv-anon.c
doc/examples/ex-serv-pgp.c
doc/examples/ex-serv-psk.c
doc/examples/ex-serv-srp.c
lib/includes/gnutls/gnutls.h.in

index 7d091b1791099bcbfb3c69e00eda8aa37dd96a34..a7f4e7c5c37f1eb65178c00b526e91cd0332ce9a 100644 (file)
 #include <fcntl.h>
 #include <getpass.h>            /* for getpass() */
 
-#if GNUTLS_VERSION_NUMBER < 0x030300
-# define GNUTLS_DEFAULT_PRIORITY "NORMAL"
-#endif
-
 /* A TLS client that loads the certificate and key.
  */
 
@@ -99,7 +95,7 @@ int main(void)
 
         /* priorities */
         gnutls_priority_init(&priorities_cache, 
-                             GNUTLS_DEFAULT_PRIORITY, NULL);
+                             "NORMAL", NULL);
 
         /* sets the trusted cas file
          */
index 5f12bb84a77a9f874876e4ef56edabed5d220699..7437e269c705c75f74daedc387f877a6f6ccd3fd 100644 (file)
 #define KEY_FILE "key.pem"
 #define CAFILE "/etc/ssl/certs/ca-certificates.crt"
 
-#if GNUTLS_VERSION_NUMBER < 0x030300
-# define GNUTLS_DEFAULT_PRIORITY "NORMAL"
-#endif
-
 extern int tcp_connect(void);
 extern void tcp_close(int sd);
 
@@ -111,7 +107,7 @@ int main(void)
 
         /* priorities */
         gnutls_priority_init(&priorities_cache, 
-                             GNUTLS_DEFAULT_PRIORITY, NULL);
+                             "NORMAL", NULL);
 
         /* sets the trusted cas file
          */
index c6252406790932710631e2815418a9a5bd02d0a4..dcb0e101dba0058222774abbf4d5149eef8907e3 100644 (file)
 #include <gnutls/gnutls.h>
 #include <gnutls/dtls.h>
 
-#if GNUTLS_VERSION_NUMBER < 0x030300
-# define GNUTLS_DEFAULT_PRIORITY "NORMAL"
-#endif
-
 /* A very basic Datagram TLS client, over UDP with X.509 authentication.
  */
 
@@ -58,7 +54,7 @@ int main(void)
 
         /* Use default priorities */
         ret = gnutls_priority_set_direct(session, 
-                                         GNUTLS_DEFAULT_PRIORITY, &err);
+                                         "NORMAL", &err);
         if (ret < 0) {
                 if (ret == GNUTLS_E_INVALID_REQUEST) {
                         fprintf(stderr, "Syntax error at: %s\n", err);
index dc3b51cbd5d7cc240cf4a35f45dc0047c6cc068d..454272465183cdfffe64436b5426149dd2042a9c 100644 (file)
@@ -9,10 +9,6 @@
 #include <string.h>
 #include <gnutls/gnutls.h>
 
-#if GNUTLS_VERSION_NUMBER < 0x030300
-# define GNUTLS_DEFAULT_PRIORITY "NORMAL"
-#endif
-
 /* Those functions are defined in other examples.
  */
 extern void check_alert(gnutls_session_t session, int ret);
@@ -60,8 +56,7 @@ int main(void)
         /* Set the priorities.
          */
         gnutls_priority_set_direct(session,
-                                   GNUTLS_DEFAULT_PRIORITY
-                                   ":+SRP:+SRP-RSA:+SRP-DSS",
+                                   "NORMAL:+SRP:+SRP-RSA:+SRP-DSS",
                                    NULL);
 
         /* put the SRP credentials to the current session
index 2860a0c0cc1933f703bae37388679010f88115bc..df96444f9f474fdeb068cf6d4380fc7b12f530b3 100644 (file)
 #include <gnutls/x509.h>
 #include "examples.h"
 
-#if GNUTLS_VERSION_NUMBER < 0x030300
-# define GNUTLS_DEFAULT_PRIORITY "NORMAL"
-#endif
-
 /* A very basic TLS client, with X.509 authentication and server certificate
  * verification. Note that error checking for missing files etc. is omitted
  * for simplicity.
@@ -71,7 +67,7 @@ int main(void)
 
         /* Use default priorities */
         ret = gnutls_priority_set_direct(session, 
-                                         GNUTLS_DEFAULT_PRIORITY, &err);
+                                         "NORMAL", &err);
         if (ret < 0) {
                 if (ret == GNUTLS_E_INVALID_REQUEST) {
                         fprintf(stderr, "Syntax error at: %s\n", err);
index 6ebfbdf082e51f529328a2232dd0b680f6d81cc3..dc0a55b90b448fc64366c9ce0b62e82b20bcc39c 100644 (file)
 #include <unistd.h>
 #include <gnutls/gnutls.h>
 
-#if GNUTLS_VERSION_NUMBER < 0x030300
-# define GNUTLS_DEFAULT_PRIORITY "NORMAL"
-#endif
-
 /* This is a sample TLS 1.0 echo server, for anonymous authentication only.
  */
 
@@ -96,8 +92,7 @@ int main(void)
         for (;;) {
                 gnutls_init(&session, GNUTLS_SERVER);
                 gnutls_priority_set_direct(session,
-                                           GNUTLS_DEFAULT_PRIORITY
-                                           ":+ANON-ECDH:+ANON-DH",
+                                           "NORMAL::+ANON-ECDH:+ANON-DH",
                                            NULL);
                 gnutls_credentials_set(session, GNUTLS_CRD_ANON, anoncred);
 
index 519c2a74f5f7b2e10d9f24cbf394833fa7a166c4..d68a11ca499b4ab8e5c35762595a000d34c65d60 100644 (file)
 #include <gnutls/gnutls.h>
 #include <gnutls/openpgp.h>
 
-#if GNUTLS_VERSION_NUMBER < 0x030300
-# define DEFAULT_PRIORITY "NORMAL"
-#endif
-
 #define KEYFILE "secret.asc"
 #define CERTFILE "public.asc"
 #define RINGFILE "ring.gpg"
@@ -110,8 +106,7 @@ int main(void)
         for (;;) {
                 gnutls_init(&session, GNUTLS_SERVER);
                 gnutls_priority_set_direct(session,
-                                           GNUTLS_DEFAULT_PRIORITY
-                                           ":+CTYPE-OPENPGP", NULL);
+                                           "NORMAL:+CTYPE-OPENPGP", NULL);
 
                 /* request client certificate if any.
                  */
index 0c4c93ed118d2b1a6a42ccdd62c766f5ef496771..c83658bc026c51fb7745979dac9f4693f115ba76 100644 (file)
 #include <unistd.h>
 #include <gnutls/gnutls.h>
 
-#if GNUTLS_VERSION_NUMBER < 0x030300
-# define DEFAULT_PRIORITY "NORMAL"
-#endif
-
 #define KEYFILE "key.pem"
 #define CERTFILE "cert.pem"
 #define CAFILE "/etc/ssl/certs/ca-certificates.crt"
@@ -105,8 +101,7 @@ int main(void)
         generate_dh_params();
 
         gnutls_priority_init(&priority_cache,
-                             GNUTLS_DEFAULT_PRIORITY
-                             ":+PSK:+ECDHE-PSK:+DHE-PSK",
+                             "NORMAL:+PSK:+ECDHE-PSK:+DHE-PSK",
                              NULL);
 
         gnutls_certificate_set_dh_params(x509_cred, dh_params);
index 3b2cd5702120cd6dd09d96eb56ad610e62d01773..e2417654e1293dce5d5bb4f92dc59f51de89cd37 100644 (file)
 #include <unistd.h>
 #include <gnutls/gnutls.h>
 
-#if GNUTLS_VERSION_NUMBER < 0x030300
-# define GNUTLS_DEFAULT_PRIORITY "NORMAL"
-#endif
-
 #define SRP_PASSWD "tpasswd"
 #define SRP_PASSWD_CONF "tpasswd.conf"
 
@@ -94,7 +90,7 @@ int main(void)
         for (;;) {
                 gnutls_init(&session, GNUTLS_SERVER);
                 gnutls_priority_set_direct(session,
-                                           GNUTLS_DEFAULT_PRIORITY
+                                           "NORMAL"
                                            ":-KX-ALL:+SRP:+SRP-DSS:+SRP-RSA",
                                            NULL);
                 gnutls_credentials_set(session, GNUTLS_CRD_SRP, srp_cred);
index 7f84d6ab96308ebc97dc10489bc1e4760a5c7c56..14e9d726f37494a0b4faffbb8813817ae5dd73f4 100644 (file)
@@ -1079,7 +1079,6 @@ int gnutls_key_generate(gnutls_datum_t * key, unsigned int key_size);
 /* if you just want some defaults, use the following.
  */
 
-#define GNUTLS_DEFAULT_PRIORITY "SYSTEM"
 int gnutls_priority_init(gnutls_priority_t * priority_cache,
                         const char *priorities, const char **err_pos);
 void gnutls_priority_deinit(gnutls_priority_t priority_cache);