Commit 22440e4d authored by Ondrej Sury's avatar Ondrej Sury

Imported Upstream version 1.7.0~rc1

parent 0fef32ce
1.7.0 2016-12-??
* Fix lookup of relative names in ldns_resolver_search.
* bugfix #548: Double free for answers > 4096 in ldns_resolver_send_pkt
* Follow CNAME's when tracing with drill (TODO dnssec trace)
* Fix #551 change Regent to Copyright holder in BSD license in
some of the headings of the file, to match the opensource.org
BSD license.
* -e option makes ldns-compare-zones exit with status code 2 on difference
* Filter out specified RR types with ldns-read-zone -e and -E options
* bugfix #563: Correct DNSKEY from DSA private key. Thanks Peter Koch.
* bugfix #562: ldns-keygen match DSA key maximum size with library.
And check keysizes with all algorithms. Thanks Peter Koch.
* ldns-verify-zone accepts only one single zonefile as argument.
* bugfix #573: ldns-keygen write private keys with mode 0600.
Thanks Leon Weber
* Fix configure to make ldns compile with LibreSSL 2.0
* drill now also accepts dig style -y option
(-y <[algo:]name:key> i.s.o. -y <name:key[:algo]>)
* OPENPGPKEY draft rr types. Enable with: --enable-rrtype-openpgpkey
* bugfix #608: Correct comment about escaped characters
* CDS and CDNSKEY rr type from RFC 7344.
--enable-rrtype-cds configure option removed
* fix: Memory leak in ldns_pkt_rr_list_by_name()
Thanks Johannes Naab
* fix: Memory leak in ldns_dname2buffer_wire_compress()
Thanks Max Liebkies
* bugfix #613: Allow tab as whitespace too in last rdata field of types
of variable length. Thanks Xiali Yan
* bugfix: strip trailing whitespace from $ORIGIN lines in zone files
* Let ldns-keygen output .ds files only for KSK keys
* Parse RFC7218 TLSA mnemonics, but do not output them
* Let ldns-dane use SPKI as the default selector i.s.o. Cert
* bugfix: Fit left over NSEC3s once more before adding empty non
terminals. Thanks Stuart Browne
* bugfix #605: Determine default trust anchor location at compile time
Thanks Peter Koch
* bugfix #697: Double free with ldns-dane create
Thanks Carsten Strotmann
* bugfix #623: Do not redefine bool type and boolean values
Thanks Jakob Petsovits
* bugfix #570: Add TLSA, CDS, CDNSKEY and OPENPGPKEY RR types to ldnsx
Thanks Shussain
* bugfix #575: ldns_pkt_clone() does not copy timestamp field
Thanks Calle Dybedahl
* bugfix #584: ldns-update fixes. Send update to port 53, bring manpage
in sync with the usage text, and don't alter the ldns_resolver passed
to ldns_update_soa_zone_mname(). Created a ldns_resolver_clone()
function in the process. Thanks Nicholas Riley.
* bugfix #633: ldns_pkt_clone() parameter isn't const.
Thanks Jakop Petsovits
* bugfix: ldns-dane manpage correction
Thanks Erwin Lansing
* Spelling fixes. Thanks Andreas Schulze
* Hyphen used as minus in manpages. Thanks Andreas Schulze.
* RFC7553 RR Type URI is supported by default.
* Fix ECDSA signature generation, do not omit leading zeroes.
* bugfix: Get rid of superfluous newline in ldns-keyfetcher
Thanks Jan-Piet Mens
* bugfix: -U option to ldns-signzone to sign with every algorithm
Thanks Guido Kroon
* bugfix #725: allow RR-types on the type bitmap window border
Thanks Pieter Lexis
* bugfix #726: 2 typos in drill manpage.
Thanks Hugo Lombard
* Add type CSYNC support, RFC 7477.
* Prepare for ED25519, ED448 support: todo convert* routines in
dnssec.h, once openssl has support for signing with these algorithms.
The dns algorithm number is not yet allocated. These features are
not fully implemented yet, openssl (1.1) does not support the
algorithms enough to generate keys and sign and verify with them.
* Fix _answerfrom comment in ldns_struct_pkt.
* Fix drill axfr ipv4/ipv6 queries.
* Fix comment referring to mk_query in packet.h to pkt_query_new.
* Fix description of QR flag in packet.h.
* Fix for openssl 1.1.0 API changes.
* Remove commented out macro. Thanks Thiago Farina
* bugfix #641: Include install-sh in .gitignore
* bugfix #825: Module import breaks with newer SWIG versions.
Thanks Christoph Egger
* bugfix #796 - #792: Fix miscellaneous compiler warning issues.
Thanks Ngie Cooper
* bugfix #769: Add support for :: in an IPv6 address
Thanks Hajimu UMEMOTO
* bugfix #760: Detect superfluous text in presentation format
Thanks Xiali Yan
* bugfix #708: warnings and errors with xcode 6.1/7.0
* bugfix #754: Memory leak in ldns_str2rdf_ipseckey
Thanks Xiali Yan
* bugfix #661: Fail NSEC3 signing when NSEC domainname length
would overflow. Thanks Jan-Piet Mens.
* bugfix #771: hmac-sha224, hmac-sha384 and hmac-sha512 keys.
Thanks Harald Jenny
* bugfix #680: ldns fails to reject invalidly formatted
RFC 7553 URI RRs. Thanks Robert Edmonds
* bugfix #678: Use poll i.s.o. select to support > 1024 fds
Thanks William King
* Use OpenSSL DANE functions for verification (unless explicitly
disabled with --disable-dane-ta-usage).
* Bumb .so version
* Include OPENPGPKEY RR type by default
* rdata processing for SMIMEA RR type
1.6.17 2014-01-10
* Fix ldns_dnssec_zone_new_frm_fp_l to allow the last parsed line of a
zone to be an NSEC3 (or its RRSIG) covering an empty non terminal.
......
......@@ -12,6 +12,7 @@ datarootdir = @datarootdir@
datadir = @datadir@
libdir = @libdir@
includedir = @includedir@
sysconfdir = @sysconfdir@
doxygen = @doxygen@
pywrapdir = $(srcdir)/contrib/python
pyldnsxwrapdir = $(srcdir)/contrib/ldnsx
......@@ -27,13 +28,21 @@ pyldnsx_uninst = @PYLDNSXUNINST@
libtool = @libtool@
CONFIG_FILES = @CONFIG_FILES@
LDNS_TRUST_ANCHOR_FILE = @LDNS_TRUST_ANCHOR_FILE@
DEFAULT_CAFILE = @DEFAULT_CAFILE@
DEFAULT_CAPATH = @DEFAULT_CAPATH@
edit = sed \
-e 's|@LDNS_TRUST_ANCHOR_FILE[@]|$(LDNS_TRUST_ANCHOR_FILE)|g' \
-e 's|@DEFAULT_CAFILE[@]|$(DEFAULT_CAFILE)|g' \
-e 's|@DEFAULT_CAPATH[@]|$(DEFAULT_CAPATH)|g'
# override $U variable which is used by autotools for deansification (for
# K&R C compilers), but causes problems if $U is defined in the env).
U=
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@ @DEFS@
CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@ @DEFS@ -DLDNS_TRUST_ANCHOR_FILE="\"$(LDNS_TRUST_ANCHOR_FILE)\""
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
LIBOBJDIR = compat/
......@@ -92,11 +101,10 @@ LDNS_DANE_LOBJS = examples/ldns-dane.lo
EX_SSL_PROGS = examples/ldns-nsec3-hash examples/ldns-revoke examples/ldns-signzone examples/ldns-verify-zone
EX_SSL_LOBJS = examples/ldns-nsec3-hash.lo examples/ldns-revoke.lo examples/ldns-signzone.lo examples/ldns-verify-zone.lo
COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS)
COMP_LIB = $(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS)
LINK_LIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) -version-number $(version_info) -no-undefined
LINK_LIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) -version-info $(version_info) -no-undefined
LINK_EXE = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LIBSSL_LDFLAGS)
.PHONY: clean realclean docclean manpages doc lint all lib pyldns test
......@@ -129,7 +137,7 @@ putdown-builddir:
if test -d drill -a ! -f drill/README ; then rmdir drill || : ; fi
if test -d compat -a ! -f compat/malloc.c; then rmdir compat || : ; fi
drill: no-drill-config-h drill/drill
drill: no-drill-config-h drill/drill drill/drill.1
no-drill-config-h:
@if test -e $(srcdir)/drill/config.h -o -e drill/config.h ; \
then echo "A config.h was detected in the drill subdirectory." ; \
......@@ -138,10 +146,14 @@ no-drill-config-h:
echo "or build drill there." ; \
exit -1 ; \
fi
drill/drill: $(DRILL_LOBJS) $(LIB)
$(LINK_EXE) $(DRILL_LOBJS) $(LIBS) $(LIBSSL_LIBS) -lldns -o drill/drill
install-drill: drill/drill
drill/drill.1: $(srcdir)/drill/drill.1.in
$(edit) $(srcdir)/drill/drill.1.in > drill/drill.1
install-drill: drill/drill drill/drill.1
$(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
......@@ -154,9 +166,9 @@ uninstall-drill:
test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ;
clean-drill:
$(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill
$(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill drill/drill.1
examples: no-examples-config-h $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS)
examples: no-examples-config-h $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) examples/ldns-dane.1 examples/ldns-verify-zone.1
no-examples-config-h:
@if test -e $(srcdir)/examples/config.h -o -e examples/config.h ; \
then echo "A config.h was detected in the examples subdirectory." ; \
......@@ -165,6 +177,7 @@ no-examples-config-h:
echo "or build examples there." ; \
exit -1 ; \
fi
$(EXAMPLE_PROGS):
$(LINK_EXE) $@.lo $(LIBS) -lldns -o $@
......@@ -182,7 +195,13 @@ $(LDNS_DANE):
$(EX_SSL_PROGS):
$(LINK_EXE) $@.lo $(LIBS) $(LIBSSL_LIBS) -lldns -o $@
install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS)
examples/ldns-dane.1: $(srcdir)/examples/ldns-dane.1.in
$(edit) $(srcdir)/examples/ldns-dane.1.in > examples/ldns-dane.1
examples/ldns-verify-zone.1: $(srcdir)/examples/ldns-verify-zone.1.in
$(edit) $(srcdir)/examples/ldns-verify-zone.1.in > examples/ldns-verify-zone.1
install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) examples/ldns-dane.1 examples/ldns-verify-zone.1
$(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
......@@ -205,6 +224,7 @@ clean-examples:
$(LIBTOOL) --mode clean rm -f $(EXAMPLE_PROGS)
$(LIBTOOL) --mode clean rm -f $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS)
$(LIBTOOL) --mode clean rm -f $(EXAMPLE_LOBJS)
$(LIBTOOL) --mode clean rm -f examples/ldns-dane.1 examples/ldns-verify-zone.1
linktest: $(srcdir)/linktest.c libldns.la
$(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/linktest.c -o linktest.lo
......@@ -224,7 +244,7 @@ mancheck:
sh -c 'find . -name \*.\[13\] -exec troff -z {} \;' 2>&1 | sed "s/^\.\///" | sed "s/\(:[0\-9]\+:\)/\1 warning:/g"
doxygen: manpages
if test ! -e doc/header.html ; then \
@if test ! -e doc/header.html ; then \
$(INSTALL) -c -m 644 $(srcdir)/doc/header.html doc/ ; \
fi ;
$(doxygen) $(srcdir)/libdns.doxygen
......@@ -236,22 +256,40 @@ manpages: $(srcdir)/doc/function_manpages
@$(INSTALL) -d doc
@cat $(srcdir)/ldns/*.h \
| $(srcdir)/doc/doxyparse.pl \
-m $(srcdir)/doc/function_manpages 2>&1 \
-m $(srcdir)/doc/function_manpages \
| grep -v ^doxygen | grep -v ^cat > doc/ldns_manpages
manpage-create-errors: $(srcdir)/doc/function_manpages
@$(INSTALL) -d doc
@cat $(srcdir)/ldns/*.h \
| $(srcdir)/doc/doxyparse.pl -e \
-m $(srcdir)/doc/function_manpages >/dev/null
manpage-errors:
@man --version >/dev/null 2>&1 && \
for m in `cat $(srcdir)/ldns/*.h | $(srcdir)/doc/doxyparse.pl -m $(srcdir)/doc/function_manpages 2>&1 | grep -v ^doxygen | grep -v ^cat` ; do\
LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 \
man --warnings -E UTF-8 -l -Tutf8 -Z doc/man/man3/$${m}.3 2>&1 >/dev/null \
| awk "-vpage=$${m}.3" '{printf("%s: ", page);print}'; \
if ! lexgrog doc/man/man3/$${m}.3 >/dev/null 2>&1 ; \
then \
echo doc/man/man3/$${m}.3: manpage-has-bad-whatis-entry; \
fi; \
done || echo "WARNING!: Cannot detect manpage errors on `uname`"
pyldns: _ldns.la
$(pywrapdir)/ldns_wrapper.c: $(PYLDNS_I_FILES) ldns/config.h
$(swig) $(swigpy_flags) -o $@ $(CPPFLAGS) $(PYTHON_CPPFLAGS) $(pywrapdir)/ldns.i
$(swig) $(swigpy_flags) -o $@ $(PYTHON_CPPFLAGS) $(pywrapdir)/ldns.i
ldns_wrapper.lo: $(pywrapdir)/ldns_wrapper.c ldns/config.h
$(COMP_LIB) -I./include/ldns $(PYTHON_CPPFLAGS) $(PYTHON_X_CFLAGS) -c $(pywrapdir)/ldns_wrapper.c -o $@
$(COMP_LIB) -I./include/ldns $(LIBSSL_CPPFLAGS) $(PYTHON_CPPFLAGS) $(PYTHON_X_CFLAGS) -c $(pywrapdir)/ldns_wrapper.c -o $@
_ldns.la: ldns_wrapper.lo libldns.la
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(PYTHON_CFLAGS) $(LDFLAGS) $(PYTHON_LDFLAGS) -module -version-number $(version_info) -no-undefined -o $@ ldns_wrapper.lo -rpath $(python_site) -L. -L.libs -lldns $(LIBS)
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(PYTHON_CFLAGS) $(LDFLAGS) $(PYTHON_LDFLAGS) -module -version-info $(version_info) -no-undefined -o $@ ldns_wrapper.lo -rpath $(python_site) -L. -L.libs -lldns $(LIBS)
$(p5_dns_ldns_dir)/Makefile: $(p5_dns_ldns_dir)/Makefile.PL
BUILDDIR=`pwd`; cd $(p5_dns_ldns_dir); $(PERL) Makefile.PL PREFIX="$(prefix)" LIBS="-L$$BUILDDIR/.libs -lldns" INC="-I$$BUILDDIR"
BUILDDIR=`pwd`; cd $(p5_dns_ldns_dir); LD_LIBRARY_PATH="$$BUILDDIR/.libs:$$LD_LIBRARY_PATH" DYLD_LIBRARY_PATH="$$BUILDDIR/.libs:$$DYLD_LIBRARY_PATH" $(PERL) Makefile.PL LIBS="-L$$BUILDDIR/.libs -lldns" INC="-I$$BUILDDIR"
$(p5_dns_ldns_dir)/blib/arch/auto/DNS/LDNS/LDNS.so: $(p5_dns_ldns_dir)/Makefile
cd $(p5_dns_ldns_dir); $(MAKE)
......
......@@ -42,7 +42,9 @@ INSTALLATION
If you are building from the repository you will need to have (gnu)
autotools like libtool and autoreconf installed. A list of all the commands
needed to build everything can be found in README.git. Note that the actual
commands may be a little bit different on your machine. Most notable, you'll need to run libtoolize (or glibtoolize), if you skip this step, you'll get an error about missing config.sub.
commands may be a little bit different on your machine. Most notably, you'll
need to run libtoolize (or glibtoolize). If you skip this step, you'll get
an error about missing config.sub.
* Developers
ldns is developed by the ldns team at NLnet Labs. This team currently
......@@ -85,7 +87,7 @@ for more information.
SOLARIS
In Solaris multi-architecture systems (that have both 32-bit and
In Solaris multi-architecture systems (which have both 32-bit and
64-bit support), it can be a bit taxing to convince the system to
compile in 64-bit mode. Jakob Schlyter has kindly contributed a build
script that sets the right build and link options. You can find it in
......@@ -99,13 +101,13 @@ http://www.nlnetlabs.nl/projects/ldns/bugs
* pyldns
Compiling pyldns produces many ``unused parameter'' warnings. Those are
harmless and may safely be ignored.
Also when building with Swig which version is before 2.0.4, compiling
Also, when building with SWIG older than 2.0.4, compiling
pyldns produces many ``missing initializer'' warnings. Those are harmless
too.
Your Support
NLnet Labs offers all of its software products as open source, most are
published under a BDS license. You can download them, not only from the
NLnet Labs offers all of its software products as open source, most
published under a BSD license. You can download them, not only from the
NLnet Labs website but also through the various OS distributions for
which NSD, ldns, and Unbound are packaged. We therefore have little idea
who uses our software in production environments and have no direct ties
......
......@@ -13,8 +13,9 @@
# older versions of libtoolize do not support --install
# so you might need to remove that (with newer versions
# it is needed)
libtoolize -c --install
autoreconf --install
git submodule update --init
libtoolize -ci
autoreconf -fi
./configure --with-examples --with-drill # --with-pyldns --with-p5-dns-ldns
make
make doc # needs doxygen for the html pages
......
This diff is collapsed.
This diff is collapsed.
......@@ -38,7 +38,7 @@ ldns_buffer_new(size_t capacity)
}
void
ldns_buffer_new_frm_data(ldns_buffer *buffer, void *data, size_t size)
ldns_buffer_new_frm_data(ldns_buffer *buffer, const void *data, size_t size)
{
assert(data != NULL);
......@@ -165,7 +165,7 @@ ldns_bgetc(ldns_buffer *buffer)
}
void
ldns_buffer_copy(ldns_buffer* result, ldns_buffer* from)
ldns_buffer_copy(ldns_buffer* result, const ldns_buffer* from)
{
size_t tocopy = ldns_buffer_limit(from);
......
......@@ -118,15 +118,16 @@ static const char Pad64 = '=';
*/
int
ldns_b64_pton(char const *src, uint8_t *target, size_t targsize)
ldns_b64_pton(char const *origsrc, uint8_t *target, size_t targsize)
{
unsigned char const* src = (unsigned char*)origsrc;
int tarindex, state, ch;
char *pos;
state = 0;
tarindex = 0;
if (strlen(src) == 0) {
if (strlen(origsrc) == 0) {
return 0;
}
......
......@@ -8,7 +8,7 @@
#include <sys/types.h>
void *malloc ();
void *malloc (size_t n);
/* Allocate an N-byte block of memory from the heap.
If N is zero, allocate a 1-byte block. */
......
......@@ -20,16 +20,16 @@
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <ldns/config.h>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -21,3 +21,25 @@ Revision history for Perl extension DNS::LDNS.
0.06 Tue Dec 31 12:17:00 2013
- Corrected pod syntax
0.50 Sun Mar 30 11:05:23 2014
- Added prev parameter to the DNS::LDNS::RR::new(str) constructor.
- Corrected DNS::LDNS::RR::new(file/filename) constructor. Added prev
parameter, changed the default_ttl and origin parameters to
references so they can return data back to the caller as intended.
Using the 'built-in' default values for ttl and origin, rather than
my own values.
- Corrected the DNS::LDNS::Zone::new() constructor. Corrected file
option for reading zone from stream. Using the 'built-in' default
values for ttl and origin, rather than my own values.
- Removed the $DNS::LDNS::DEFAULT_* variables, they proved to be less
useful after modifying the Zone and RR constructors.
- More robust Makefile.PL. Check for existence of ldns library
and perl modules required for the test suite.
0.51 Wed Apr 2 09:12:00 2014
- Added META.yml, and added some more package dependencies.
- Compatibility with ldns < 1.6.12.
0.52 Tue May 5 09:13:00 2015
- Fixed typo in META.yml
......@@ -89,6 +89,22 @@ ldns_rr_list *ldns_validate_domain_dnskey_time(
ldns_rr_list *ldns_validate_domain_ds_time(
const ldns_resolver *res, const ldns_rdf *domain,
const ldns_rr_list * keys, time_t check_time);
ldns_status ldns_verify_rrsig_keylist_time(
ldns_rr_list *rrset, ldns_rr *rrsig,
const ldns_rr_list *keys, time_t check_time,
ldns_rr_list *good_keys);
ldns_status ldns_verify_trusted_time(
ldns_resolver *res, ldns_rr_list *rrset,
ldns_rr_list *rrsigs, time_t check_time,
ldns_rr_list *validating_keys);
ldns_status ldns_verify_rrsig_time(
ldns_rr_list *rrset, ldns_rr *rrsig,
ldns_rr *key, time_t check_time);
ldns_status ldns_verify_time(ldns_rr_list *rrset,
ldns_rr_list *rrsig,
const ldns_rr_list *keys,
time_t check_time,
ldns_rr_list *good_keys);
ldns_dnssec_trust_tree *ldns_dnssec_derive_trust_tree_time(
ldns_dnssec_data_chain *data_chain,
......@@ -114,6 +130,33 @@ ldns_rr_list *ldns_validate_domain_ds_time(
Perl_croak(aTHX_ "function ldns_validate_domain_ds_time is not implemented in this version of ldns");
}
ldns_status ldns_verify_rrsig_keylist_time(
ldns_rr_list *rrset, ldns_rr *rrsig,
const ldns_rr_list *keys, time_t check_time,
ldns_rr_list *good_keys) {
Perl_croak(aTHX_ "function ldns_verify_rrsig_keylist_time is not implemented in this version of ldns");
}
ldns_status ldns_verify_trusted_time(
ldns_resolver *res, ldns_rr_list *rrset,
ldns_rr_list *rrsigs, time_t check_time,
ldns_rr_list *validating_keys) {
Perl_croak(aTHX_ "function ldns_verify_trusted_time is not implemented in this version of ldns");
}
ldns_status ldns_verify_rrsig_time(
ldns_rr_list *rrset, ldns_rr *rrsig,
ldns_rr *key, time_t check_time) {
Perl_croak(aTHX_ "function ldns_verify_rrsig_time is not implemented in this version of ldns");
}
ldns_status ldns_verify_time(ldns_rr_list *rrset,
ldns_rr_list *rrsig,
const ldns_rr_list *keys,
time_t check_time,
ldns_rr_list *good_keys) {
Perl_croak(aTHX_ "function ldns_verify_time is not implemented in this version of ldns");
}
#endif
......@@ -709,45 +752,70 @@ ldns_rr_new_frm_type(t)
_new_from_type = 1
DNS__LDNS__RR
_new_from_str(str, default_ttl, origin, s)
_new_from_str(str, default_ttl, origin, prev, s)
const char* str;
uint32_t default_ttl;
DNS__LDNS__RData__Opt origin;
DNS__LDNS__RData__Opt prev;
LDNS_Status s;
PREINIT:
DNS__LDNS__RR rr = NULL;
ldns_rdf *pclone = NULL;
CODE:
s = ldns_rr_new_frm_str(&rr, str, default_ttl, origin, NULL);
if (prev != NULL) {
pclone = ldns_rdf_clone(prev);
}
s = ldns_rr_new_frm_str(&rr, str, default_ttl, origin, &prev);
if (prev != NULL) {
prev = pclone;
}
if (s == LDNS_STATUS_OK) {
RETVAL = rr;
}
OUTPUT:
RETVAL
s
prev
DNS__LDNS__RR
_new_from_file(fp, origin, default_ttl, s, line_nr)
_new_from_file(fp, default_ttl, origin, prev, s, line_nr)
FILE* fp;
DNS__LDNS__RData__Opt origin;
uint32_t default_ttl;
DNS__LDNS__RData__Opt origin;
DNS__LDNS__RData__Opt prev;
LDNS_Status s;
int line_nr;
PREINIT:
ldns_rr *rr;
ldns_rdf *oclone = NULL;
ldns_rdf *pclone = NULL;
CODE:
RETVAL = NULL;
/* Clone the origin object because the call may change/replace it and
then it must be freed */
if (origin) {
/* Must clone origin and prev because new_frm_fp_l may change
them and may not (we do not know for certain). The perl layer
will take care of freeing the old structs. */
if (origin != NULL) {
oclone = ldns_rdf_clone(origin);
}
s = ldns_rr_new_frm_fp_l(&rr, fp, &default_ttl, &oclone, NULL,
if (prev != NULL) {
pclone = ldns_rdf_clone(prev);
}
RETVAL = NULL;
s = ldns_rr_new_frm_fp_l(&rr, fp, &default_ttl, &oclone, &pclone,
&line_nr);
if (oclone) {
ldns_rdf_deep_free(oclone);
}
/* Replace the input origin with our new clone. The perl layer will
take care of freeing it later. */
if (origin != NULL) {
origin = oclone;
}
if (prev != NULL) {
prev = pclone;
}
if (s == LDNS_STATUS_OK) {
RETVAL = rr;
......@@ -757,6 +825,9 @@ _new_from_file(fp, origin, default_ttl, s, line_nr)
RETVAL
s
line_nr
default_ttl
origin
prev
DNS__LDNS__RR
ldns_rr_clone(rr)
......@@ -1223,7 +1294,7 @@ ldns_rdf_clone(rdf)
ALIAS:
clone = 1
const char*
Mortal_PV
ldns_rdf2str(rdf)
DNS__LDNS__RData rdf;
ALIAS:
......
---
abstract: 'Perl extension for the ldns library'
author:
- 'Erik Pihl Ostlyngen <erik.ostlyngen@uninett.no>'
build_requires:
FindBin: 0
Test::Exception: 0
Test::More: 0
configure_requires:
Devel::CheckLib: 0
ExtUtils::MakeMaker: 0
distribution_type: module
dynamic_config: 0
generated_by: 'ExtUtils::MakeMaker version 6.57_05'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: DNS-LDNS
no_index:
directory:
- t
- inc
requires:
XSLoader: 0
version: 0.52
use 5.014002;
use ExtUtils::MakeMaker;
use Devel::CheckLib;
check_lib_or_exit(
lib => 'ldns',
header => 'ldns/ldns.h',
function => 'if(atof(ldns_version()) >= 1.6) return 0; else return 1;'
);
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
NAME => 'DNS::LDNS',
VERSION_FROM => 'lib/DNS/LDNS.pm', # finds $VERSION
PREREQ_PM => {}, # e.g., Module::Name => 1.1
CONFIGURE_REQUIRES => {
'Devel::CheckLib' => 0,
'ExtUtils::MakeMaker' => 0,
},
BUILD_REQUIRES => { # Actually required only by the tests
'FindBin' => 0,
'Test::More' => 0,
'Test::Exception' => 0,
},
PREREQ_PM => {
'XSLoader' => 0,
},
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/DNS/LDNS.pm', # retrieve abstract from module
AUTHOR => 'Erik Pihl Ostlyngen <erik.ostlyngen@uninett.no>') : ()),
AUTHOR => 'Erik Pihl Ostlyngen <erik.ostlyngen@uninett.no>',
LICENSE => 'perl') : ()),
LIBS => ['-lldns'],
DEFINE => '',
INC => '-I.',
......
DNS::LDNS version 0.06
DNS::LDNS version 0.52
======================
DESCRIPTION
......
......@@ -651,7 +651,7 @@ our @EXPORT = qw(
read_anchor_file
);
our $VERSION = '0.06';
our $VERSION = '0.52';
sub AUTOLOAD {
# This AUTOLOAD is used to 'autoload' constants from the constant()
......@@ -706,15 +706,6 @@ require DNS::LDNS::KeyList;
require DNS::LDNS::DNSSecDataChain;
require DNS::LDNS::DNSSecTrustTree;
# Some default values used by the constructors
our $DEFAULT_CLASS = &LDNS_RR_CLASS_IN;
our $DEFAULT_TTL = 86400; # 1d
our $DEFAULT_ORIGIN = new DNS::LDNS::RData(&LDNS_RDF_TYPE_DNAME, '.');
our $DEFAULT_SOA_REFRESH = 86400; # 1d
our $DEFAULT_SOA_RETRY = 3600; # 1h
our $DEFAULT_SOA_EXPIRE = 604800; # 1w
our $DEFAULT_SOA_MINIMUM = 10800; # 3h
# Autoload methods go after =cut, and are processed by the autosplit program.
1;
......@@ -778,7 +769,7 @@ Represents a parsed zonefile (maps to the ldns_zone struct)
=item B<DNS::LDNS::RRList>
Represents a list of RRs. This class is also used to represent an
RRSet all the dnames and types are equal, (maps to the the
RRSet if all the dnames and types are equal, (maps to the the
ldns_rr_list struct)
=item B<DNS::LDNS::RR>
......@@ -909,15 +900,13 @@ freed.
The purpose for writing this wrapper class has been to be able to
process zone file data with good time performance. Data checking and
error handling is a bit sparse. Calling a method with wrong argument
types will some times kill the application with an intelligible error
message, in other cases it may provoke a segmentation fault. Using
out-of-range data values, e.g. in array indexes, may also cause
unexpected results.
error handling is a bit sparse.
Most constructors and all methods returning a status will update the
static DNS::LDNS::last_status variable. Most methods do not return a
status and will not reset this variable even though they succeeds.