]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Documented use gnutls_priority_set2().
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Mon, 26 Jun 2017 08:18:33 +0000 (10:18 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 10 Jul 2017 07:40:18 +0000 (07:40 +0000)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
NEWS
doc/cha-gtls-app.texi
doc/cha-intro-tls.texi
doc/cha-upgrade.texi
doc/examples/ex-serv-dtls.c
doc/examples/ex-serv-psk.c
doc/examples/ex-serv-x509.c
lib/priority.c

diff --git a/NEWS b/NEWS
index 33b733da21685f02ffa84b8b82a0605c7d59d2ae..2dd5150b2bcfc5e7bc7705c14d766e9b7db86578 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -90,6 +90,7 @@ gnutls_pubkey_export_ecc_raw2: Added
 gnutls_privkey_export_rsa_raw2: Added
 gnutls_privkey_export_dsa_raw2: Added
 gnutls_privkey_export_ecc_raw2: Added
+gnutls_priority_set2: Added
 GNUTLS_EXPORT_FLAG_NO_LZ: Added
 GNUTLS_DT_IP_ADDRESS: Added
 GNUTLS_X509_CRT_FLAG_IGNORE_SANITY: Added
index 37df31a5dbad36c1c53eff131ae329f7645ad9be..bc06c5e2b0b00d31c989944971a73b3692bdd7aa 100644 (file)
@@ -1075,7 +1075,7 @@ specific algorithm details, as the priority strings are not constant between
 gnutls versions (they are periodically updated to account for cryptographic
 advances while providing compatibility with old clients and servers).
 
-@showfuncB{gnutls_priority_set_direct,gnutls_priority_set}
+@showfuncB{gnutls_priority_set_direct,gnutls_priority_set2}
 
 @float Table,tab:prio-keywords
 @multitable @columnfractions .20 .70
index 3f1ea66126cbbb49e71d1d6d7cee72f9492db3d0..a8dc95c8af89d4ed2a7d9f99ef878d510bd60fe5 100644 (file)
@@ -273,7 +273,7 @@ solves the problem by using minimal padding.
 If you implement an application that has a configuration file, we
 recommend that you make it possible for users or administrators to
 specify a GnuTLS protocol priority string, which is used by your
-application via @funcref{gnutls_priority_set}.  To allow the best
+application via @funcref{gnutls_priority_set2}.  To allow the best
 flexibility, make it possible to have a different priority string for
 different incoming IP addresses.
 
index 0401719ec90870ef47bd5d03bbdf7af908726d4b..f32acfadc71ebd6e3b4f3a8b4ba8581c2bf44f12 100644 (file)
@@ -199,4 +199,8 @@ however, there are minor differences, listed below.
 @funcintref{gnutls_compression_get_name}, @funcintref{gnutls_compression_list},
 and @funcintref{gnutls_compression_get_id}.
 
+@item The @funcref{gnutls_priority_set} has been superseded by @funcref{gnutls_priority_set2}.
+@tab The function @funcref{gnutls_priority_set2} allows for sharing priority
+caches across multiple sessions reducing allocated memory per session.
+
 @end multitable
index 887b4b83df117f1e147bf896f8c1c1a16b80d498..0166493b3d777818edd52abfbda565640bab9b5e 100644 (file)
@@ -174,7 +174,7 @@ int main(void)
                         continue;
 
                 gnutls_init(&session, GNUTLS_SERVER | GNUTLS_DATAGRAM);
-                gnutls_priority_set(session, priority_cache);
+                gnutls_priority_set2(session, priority_cache, 0);
                 gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE,
                                        x509_cred);
 
index 26aad02f47fb62df0b9fba18de0b42f5e3e900d5..6463fddca8d1f48a005d1b69b895cdd2b7e22450 100644 (file)
@@ -109,7 +109,7 @@ int main(void)
         client_len = sizeof(sa_cli);
         for (;;) {
                 gnutls_init(&session, GNUTLS_SERVER);
-                gnutls_priority_set(session, priority_cache);
+                gnutls_priority_set2(session, priority_cache, 0);
                 gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE,
                                        x509_cred);
                 gnutls_credentials_set(session, GNUTLS_CRD_PSK, psk_cred);
index 4bf1940b891e0e9e296164a8889e28e51191fdc4..65f94a3b94fb80ae92a7de869c1d108fe76d19f3 100644 (file)
@@ -107,7 +107,7 @@ int main(void)
         client_len = sizeof(sa_cli);
         for (;;) {
                 CHECK(gnutls_init(&session, GNUTLS_SERVER));
-                CHECK(gnutls_priority_set(session, priority_cache));
+                CHECK(gnutls_priority_set2(session, priority_cache, 0));
                 CHECK(gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE,
                                              x509_cred));
 
index 8fca2f194c3506f397cbb7be0e47c227e08c72ee..670775de7ef7b6b8fc22116a08e94b92c090075b 100644 (file)
@@ -557,6 +557,8 @@ gnutls_priority_set(gnutls_session_t session, gnutls_priority_t priority)
  * must remain valid for the lifetime of the session.
  *
  * Returns: %GNUTLS_E_SUCCESS on success, or an error code.
+ *
+ * Since: 3.6.0
  **/
 int
 gnutls_priority_set2(gnutls_session_t session, gnutls_priority_t priority, unsigned int flags)