From 774543f65d55774871e5b0c800a36499f9a7c13a Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Thu, 17 Jan 2013 19:49:06 +0100 Subject: Added options to specify a DLV file. Suggested by Paul Wouters. --- libdane/dane.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'libdane/dane.c') diff --git a/libdane/dane.c b/libdane/dane.c index 1ea599bc10..30274d53f2 100644 --- a/libdane/dane.c +++ b/libdane/dane.c @@ -204,6 +204,25 @@ void dane_state_deinit(dane_state_t s) free(s); } +/** + * dane_state_set_dlv_file: + * @s: The structure to be deinitialized + * @file: The file holding the DLV keys. + * + * This function will set a file with trusted keys + * for DLV (DNSSEC Lookaside Validation). + * + **/ +int dane_state_set_dlv_file(dane_state_t s, const char* file) +{ +int ret; + + ret = ub_ctx_set_option(s->ctx, (char*)"dlv-anchor-file:", (void*)file); + if (ret != 0) + return gnutls_assert_val(DANE_E_FILE_ERROR); + + return 0; +} /** * dane_query_deinit: -- cgit v1.2.1