diff options
author | Simon Arlott <sa.me.uk> | 2014-07-10 22:08:30 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-07-11 17:37:05 +0200 |
commit | 62120b1872664b883a4ae59b1ff54a424bd2f297 (patch) | |
tree | 8088241b1f3cd847d7c25e7fddc196b7ef350a3e /libdane/includes | |
parent | 3963518d067a64412bbe0aa9ce5fc33ae729c15f (diff) | |
download | gnutls-62120b1872664b883a4ae59b1ff54a424bd2f297.tar.gz |
libdane: add function dane_query_to_raw_tlsa
This function converts a dane_query_t into the parameters needed for
dane_raw_tlsa() to make it easy to copy the results of the (synchronous)
lookup query from one process to another.
This code allocates an unnecessary extra NULL entry for dane_data_len
to avoid trying to malloc 0 bytes if q->data_entries is 0 (it is possible
for malloc/calloc to return NULL when requested to allocate 0 bytes).
Signed-off-by: Simon Arlott
Diffstat (limited to 'libdane/includes')
-rw-r--r-- | libdane/includes/gnutls/dane.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libdane/includes/gnutls/dane.h b/libdane/includes/gnutls/dane.h index 98e4a96faa..a8c98565a7 100644 --- a/libdane/includes/gnutls/dane.h +++ b/libdane/includes/gnutls/dane.h @@ -118,6 +118,8 @@ unsigned int dane_query_entries(dane_query_t q); int dane_query_data(dane_query_t q, unsigned int idx, unsigned int *usage, unsigned int *type, unsigned int *match, gnutls_datum_t * data); +int dane_query_to_raw_tlsa(dane_query_t q, unsigned int *data_entries, + char ***dane_data, int **dane_data_len, int *secure, int *bogus); void dane_query_deinit(dane_query_t q); const char *dane_cert_type_name(dane_cert_type_t type); |