summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/gnutls/gnutls.h.in14
-rw-r--r--lib/gnutls_priority.c59
2 files changed, 8 insertions, 65 deletions
diff --git a/includes/gnutls/gnutls.h.in b/includes/gnutls/gnutls.h.in
index 70ef5c6183..30dda5a331 100644
--- a/includes/gnutls/gnutls.h.in
+++ b/includes/gnutls/gnutls.h.in
@@ -167,10 +167,10 @@ extern "C"
typedef enum
{
- GNUTLS_PRIORITIES_PERFORMANCE,
- GNUTLS_PRIORITIES_SECURITY,
- GNUTLS_PRIORITIES_EXPORT
- } gnutls_priority_t;
+ GNUTLS_PRIORITIES_PERFORMANCE=1,
+ GNUTLS_PRIORITIES_SECURITY=2,
+ GNUTLS_PRIORITIES_EXPORT=4
+ } gnutls_priority_flag_t;
typedef enum
{
@@ -540,9 +540,9 @@ extern "C"
/* if you just want some defaults, use the following.
*/
- void gnutls_set_default_priority2 (gnutls_session_t session, gnutls_priority_t flag);
- int gnutls_set_default_priority (gnutls_session_t session) _GNUTLS_GCC_ATTR_DEPRECATED;
- int gnutls_set_default_export_priority (gnutls_session_t session) _GNUTLS_GCC_ATTR_DEPRECATED;
+ void gnutls_set_default_priority2 (gnutls_session_t session, gnutls_priority_flag_t flag);
+ #define gnutls_set_default_priority(x) gnutls_set_default_priority2( x, GNUTLS_PRIORITIES_SECURITY)
+ #define gnutls_set_default_export_priority(x) gnutls_set_default_priority2( x, GNUTLS_PRIORITIES_EXPORT)
/* Returns the name of a cipher suite */
const char *gnutls_cipher_suite_get_name (gnutls_kx_algorithm_t
diff --git a/lib/gnutls_priority.c b/lib/gnutls_priority.c
index 52dba9a93a..7193f10e13 100644
--- a/lib/gnutls_priority.c
+++ b/lib/gnutls_priority.c
@@ -249,38 +249,6 @@ gnutls_certificate_type_set_priority (gnutls_session_t session,
#endif
}
-/**
- * gnutls_set_default_priority - Sets some default priority on the cipher suites supported by gnutls.
- * @session: is a #gnutls_session_t structure.
- *
- * Sets some default priority on the ciphers, key exchange methods,
- * macs and compression methods. This is to avoid using the
- * gnutls_*_priority() functions, if these defaults are ok. You may
- * override any of the following priorities by calling the
- * appropriate functions.
- *
- * The default order is:
- * Protocols: TLS 1.2, TLS 1.1, TLS 1.0, and SSL3.
- * Key exchange algorithm: DHE-PSK, PSK, SRP-RSA, SRP-DSS, SRP,
- * DHE-RSA, DHE-DSS, RSA.
- * Cipher: AES_256_CBC, AES_128_CBC, 3DES_CBC, CAMELLIA_128_CBC,
- * and ARCFOUR_128.
- * MAC algorithm: SHA, and MD5.
- * Certificate types: X.509, OpenPGP
- * Compression: DEFLATE, NULL.
- *
- * Returns 0 on success.
- *
- **/
-int
-gnutls_set_default_priority (gnutls_session_t session)
-{
-
- gnutls_set_default_priority2( session, GNUTLS_PRIORITIES_SECURITY);
-
- return 0;
-}
-
static const int protocol_priority[] = {
/* GNUTLS_TLS1_2, -- not finalized yet! */
GNUTLS_TLS1_1,
@@ -423,7 +391,7 @@ static int cert_type_priority[] = {
*
**/
void
-gnutls_set_default_priority2 (gnutls_session_t session, gnutls_priority_t flag)
+gnutls_set_default_priority2 (gnutls_session_t session, gnutls_priority_flag_t flag)
{
if (flag == GNUTLS_PRIORITIES_PERFORMANCE) {
@@ -447,31 +415,6 @@ gnutls_set_default_priority2 (gnutls_session_t session, gnutls_priority_t flag)
return;
}
-
-/**
- * gnutls_set_default_export_priority - Sets some default priority on the cipher suites supported by gnutls.
- * @session: is a #gnutls_session_t structure.
- *
- * Sets some default priority on the ciphers, key exchange methods, macs
- * and compression methods. This is to avoid using the gnutls_*_priority() functions, if
- * these defaults are ok. This function also includes weak algorithms.
- * The order is TLS1, SSL3 for protocols, RSA, DHE_DSS,
- * DHE_RSA, RSA_EXPORT for key exchange algorithms.
- * SHA, MD5, RIPEMD160 for MAC algorithms,
- * AES_256_CBC, AES_128_CBC, 3DES_CBC, CAMELLIA_128_CBC,
- * ARCFOUR_128, ARCFOUR_40 for ciphers.
- *
- * Returns 0 on success.
- *
- **/
-int
-gnutls_set_default_export_priority (gnutls_session_t session)
-{
- gnutls_set_default_priority2( session, GNUTLS_PRIORITIES_EXPORT);
-
- return 0;
-}
-
/* New priority API with strings
*/