** Internal copy of OpenCDK upgraded to version 0.6.6.
** API and ABI modifications:
+gnutls_check_priority: ADDED
+gnutls_set_priority: ADDED
gnutls_set_default_priority2: RENAMED to gnutls_set_priority()
gnutls_mac_convert_priority: REMOVED
gnutls_compression_convert_priority: REMOVED
client which connects to a server and authenticates using a
@emph{username} and a @emph{password}. The server may authenticate
itself using a certificate, and in that case it has to be verified.
-In this example we also show the usage of @ref{gnutls_kx_convert_priority}.
@verbatiminclude examples/ex-client-srp.c
/* if you just want some defaults, use the following.
*/
int gnutls_set_priority(gnutls_session_t session, const char *priority, char* syntax_error, size_t syntax_error_size);
+ int gnutls_check_priority(const char *priority, char *syntax_error, size_t syntax_error_size);
/* Returns the name of a cipher suite */
const char *gnutls_cipher_suite_get_name (gnutls_kx_algorithm_t
}
+/**
+ * gnutls_check_priority - Checks for syntax errors the given priority string
+ * @priority: is a string describing priorities
+ * @syntax_error: In case of an error an error string will be copied there.
+ * @syntax_error_size: the length of the previous string.
+ *
+ * Checks for syntax errors the given priority string. The rules are
+ * described in gnutls_set_priority().
+ *
+ * On syntax error GNUTLS_E_INVALID_REQUEST is returned and 0 on success.
+ *
+ **/
+int
+gnutls_check_priority(const char *priority, char *syntax_error, size_t syntax_error_size)
+{
+gnutls_session t;
+int ret;
+
+ gnutls_init(&t, GNUTLS_SERVER);
+ ret = gnutls_set_priority( t, priority, syntax_error, syntax_error_size);
+ gnutls_deinit(t);
+
+ return ret;
+}
+
+
/* New priority API with strings
*/
const opaque * seed, int seed_size,
int total_bytes, void *ret);
+int gnutls_init (gnutls_session_t * session, gnutls_connection_end_t con_end);
+
#define DEFAULT_CERT_TYPE GNUTLS_CRT_X509