Skip to content
  • Simon Arlott's avatar
    libdane: add function dane_query_to_raw_tlsa · 62120b18
    Simon Arlott authored and Nikos Mavrogiannopoulos's avatar Nikos Mavrogiannopoulos committed
    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
    62120b18