summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gnutls_supplemental.c7
-rw-r--r--lib/includes/gnutls/gnutls.h.in6
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/gnutls_supplemental.c b/lib/gnutls_supplemental.c
index 34bd67668a..049bdfba20 100644
--- a/lib/gnutls_supplemental.c
+++ b/lib/gnutls_supplemental.c
@@ -248,7 +248,10 @@ _gnutls_supplemental_register(gnutls_supplemental_entry *entry)
*
* This function will register a new supplemental data type (rfc4680).
* The registered data will remain until gnutls_global_deinit()
- * is called. This function is not thread safe.
+ * is called. The provided @type must be an unassigned type in
+ * %gnutls_supplemental_data_format_type_t.
+ *
+ * This function is not thread safe.
*
* Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code.
*
@@ -260,7 +263,7 @@ gnutls_supplemental_register(const char *name, gnutls_supplemental_data_format_t
{
gnutls_supplemental_entry tmp_entry;
- tmp_entry.name = strdup(name);
+ tmp_entry.name = gnutls_strdup(name);
tmp_entry.type = type;
tmp_entry.supp_recv_func = recv_func;
tmp_entry.supp_send_func = send_func;
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index e2fb17f82e..631bdc6fd5 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -1054,11 +1054,13 @@ unsigned gnutls_session_etm_status(gnutls_session_t session);
/**
* gnutls_supplemental_data_format_type_t:
- * @GNUTLS_SUPPLEMENTAL_USER_MAPPING_DATA: Supplemental user mapping data.
+ * @GNUTLS_SUPPLEMENTAL_UNKNOWN: Unknown data format
*
* Enumeration of different supplemental data types (RFC 4680).
*/
-typedef int gnutls_supplemental_data_format_type_t;
+typedef enum {
+ GNUTLS_SUPPLEMENTAL_UNKNOWN = 0,
+} gnutls_supplemental_data_format_type_t;
const char
*gnutls_supplemental_get_name(gnutls_supplemental_data_format_type_t type);