gnutls_server_name_set(session, GNUTLS_NAME_DNS, "my_host_name",
strlen("my_host_name"));
- /* Use default priorities */
+ /* use default priorities */
+ gnutls_set_default_priority(session);
+#if 0
+ /* if more fine-graned control is required */
ret = gnutls_priority_set_direct(session,
"NORMAL", &err);
if (ret < 0) {
}
exit(1);
}
+#endif
/* put the x509 credentials to the current session
*/
* priority cache and is used to directly set string priorities to a
* TLS session. For documentation check the gnutls_priority_init().
*
+ * To simply use a reasonable default, consider using gnutls_set_default_priority().
+ *
* Returns: On syntax error %GNUTLS_E_INVALID_REQUEST is returned,
* %GNUTLS_E_SUCCESS on success, or an error code.
**/
* Sets some default priority on the ciphers, key exchange methods,
* macs and compression methods.
*
- * This is the same as calling:
- *
- * gnutls_priority_set_direct (session, "NORMAL", NULL);
+ * This typically sets a default priority that is considered
+ * sufficiently secure to establish encrypted sessions.
*
* This function is kept around for backwards compatibility, but
* because of its wide use it is still fully supported. If you wish