Commit graph

608 commits

Author SHA1 Message Date
Christopher Zimmermann
c96e4ca121 allow privileged initialisation of modules 2020-05-10 22:30:25 +02:00
Willem Toorop
4f78b37c61 Down- and upstream padding a la RFC7830 & RFC8467 2020-04-02 18:34:03 +02:00
Willem Toorop
d4dcdba07e Cleanup nettle_ecc_point when verifying for ...
... ECDSA256 with libnettle
2020-03-02 12:27:45 +01:00
W.C.A. Wijngaards
57bbbfc0e6 - Fix #170: Fix gcc undefined sanitizer signed integer overflow
warning in signature expiry RFC1982 serial number arithmetic.
2020-02-27 15:22:35 +01:00
W.C.A. Wijngaards
2916cfb3b0 - Fix with libnettle make test with dsa disabled. 2020-02-12 11:15:24 +01:00
W.C.A. Wijngaards
2c4be0c201 - Fix crash after reload where a stats lookup could reference old key
cache and neg cache structures.
2020-01-14 15:18:52 +01:00
Florian Obser
da6ac0c4ff Use passed in neg and key cache if non-NULL.
With this the neg and key caches can be shared between multiple
libunbound contexts.

The msg and rrset caches already allowed this since context_finalize()
did not touch those if they are already available and have the correct
size.

Care must be taken to properly unhook the caches from the validator
environment before calling ub_ctx_delete() otherwise one risks double
free or use after free bugs.
2019-12-19 13:20:34 +01:00
W.C.A. Wijngaards
5a00b31f86 - Fix text around serial arithmatic used for RRSIG times to refer
to correct RFC number.
2019-12-03 12:58:09 +01:00
W.C.A. Wijngaards
3a49e683ed - Fix Enum Name not Used, reported by X41 D-Sec. 2019-11-20 14:22:06 +01:00
W.C.A. Wijngaards
3907876eac - Fix Unrequired Checks, reported by X41 D-Sec. 2019-11-20 14:05:54 +01:00
W.C.A. Wijngaards
fcd9b34bb5 - Fix Useless memset() in validator, reported by X41 D-Sec. 2019-11-20 14:02:58 +01:00
W.C.A. Wijngaards
1fa40654d2 - Fix Race Condition in autr_tp_create(),
reported by X41 D-Sec.
2019-11-20 11:01:56 +01:00
W.C.A. Wijngaards
d05d6b959a - fixes for splint cleanliness, long vs int in SSL set_mode. 2019-11-13 15:16:27 +01:00
Vladimír Čunát
ec021e0d4b
fix build with nettle-3.5
https://git.lysator.liu.se/nettle/nettle/commit/8bf4747d9
2019-10-02 20:05:03 +02:00
W.C.A. Wijngaards
4700d79024 - avoid warning about upcast on 32bit systems for autotrust. 2019-08-15 14:25:46 +02:00
W.C.A. Wijngaards
9d9884c442 - Fix autotrust temp file uniqueness windows compile. 2019-08-15 14:02:14 +02:00
W.C.A. Wijngaards
fe0b1da859 Fix comment. 2019-07-29 16:58:23 +02:00
W.C.A. Wijngaards
27811ffaa9 - Add hex print of trust anchor pointer to trust anchor file temp
name to make it unique, for libunbound created multiple contexts.
2019-07-29 16:51:40 +02:00
Wouter Wijngaards
c1c1cd97e7 - Remove clang analysis warnings.
git-svn-id: file:///svn/unbound/trunk@4998 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-29 14:39:26 +00:00
Wouter Wijngaards
5c25bbd93f fix error print
git-svn-id: file:///svn/unbound/trunk@4911 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-17 07:44:11 +00:00
Wouter Wijngaards
d8937492cb fixup 3
git-svn-id: file:///svn/unbound/trunk@4910 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-17 07:35:09 +00:00
Wouter Wijngaards
e91d85edb5 Fixup
git-svn-id: file:///svn/unbound/trunk@4909 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-17 07:32:40 +00:00
Wouter Wijngaards
5089db7331 - Fix unbound for openssl in FIPS mode, it uses the digests with
the EVP call contexts.


git-svn-id: file:///svn/unbound/trunk@4908 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-17 07:28:55 +00:00
Wouter Wijngaards
2e9d09b961 - initialize statistics totals for printout.
- in authzone check that node exists before adding rrset.
	- in unbound-anchor, use readwrite memory BIO.
	- assertion in autotrust that packed rrset is formed correctly.


git-svn-id: file:///svn/unbound/trunk@4903 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 12:20:41 +00:00
Wouter Wijngaards
75b8b8c875 - Free memory leak in config strlist append.
- make sure nsec3 comparison salt is initialized.


git-svn-id: file:///svn/unbound/trunk@4900 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 10:23:30 +00:00
Ralph Dolmans
2e5e31e8ac - Added serve-expired-ttl and serve-expired-ttl-reset options.
git-svn-id: file:///svn/unbound/trunk@4876 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-28 14:21:56 +00:00
Wouter Wijngaards
4fe427ded2 - log-servfail: yes prints log lines that say why queries are
returning SERVFAIL to clients.


git-svn-id: file:///svn/unbound/trunk@4863 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-17 15:22:05 +00:00
Wouter Wijngaards
b0ca964984 and printout for these cases too.
git-svn-id: file:///svn/unbound/trunk@4862 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-17 15:09:23 +00:00
Wouter Wijngaards
b0daf867c2 and the error looks good.
git-svn-id: file:///svn/unbound/trunk@4860 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-17 14:17:48 +00:00
Wouter Wijngaards
8e5a32f4dc - Fix that printout of error for cycle targets is a verbosity 4
printout and does not wrongly print it is a memory error.


git-svn-id: file:///svn/unbound/trunk@4851 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-14 07:27:57 +00:00
George Thessalonikefs
749d1b9ebc - Expose if a query (or a subquery) was ratelimited (not src IP
ratelimiting) to libunbound under 'ub_result.was_ratelimited'.
  This also introduces a change to 'ub_event_callback_type' in
  libunbound/unbound-event.h.
- Tidy pylib tests.


git-svn-id: file:///svn/unbound/trunk@4828 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-03 14:00:46 +00:00
Ralph Dolmans
127759b160 strcpy to memmove, to please analysers
git-svn-id: file:///svn/unbound/trunk@4656 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-24 10:10:11 +00:00
Ralph Dolmans
4d06c36342 - Added root-key-sentinel support
git-svn-id: file:///svn/unbound/trunk@4652 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-24 09:03:49 +00:00
Ralph Dolmans
6ef9cafc0e - num.query.aggressive.NOERROR and num.query.aggressive.NXDOMAIN statistics
counters


git-svn-id: file:///svn/unbound/trunk@4616 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-10 11:39:23 +00:00
Wouter Wijngaards
1f9caf5805 - ED448 support.
git-svn-id: file:///svn/unbound/trunk@4607 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-04-05 14:44:17 +00:00
Wouter Wijngaards
980711e658 - patch to log creates keytag queries, from A. Schulze.
git-svn-id: file:///svn/unbound/trunk@4566 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-07 08:39:10 +00:00
Wouter Wijngaards
1a7540c80a - Reverted fix for #3512, this may not be the best way forward;
although it could be changed at a later time, to stay similar to
  other implementations.


git-svn-id: file:///svn/unbound/trunk@4560 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-03-06 08:22:33 +00:00
Wouter Wijngaards
0e390bca00 - Fix compile without threads, and remove unused variable.
git-svn-id: file:///svn/unbound/trunk@4553 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-27 10:36:12 +00:00
Ralph Dolmans
8148308cff - use existing code to find signer on positive wildcard answers
git-svn-id: file:///svn/unbound/trunk@4551 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-22 15:32:18 +00:00
Ralph Dolmans
24fc3242fc - Save wildcard RRset from answer with original owner for use in aggressive
NSEC.


git-svn-id: file:///svn/unbound/trunk@4550 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-22 15:12:31 +00:00
Wouter Wijngaards
6905e41b57 - Fix validation for CNAME loops. When it detects a cname loop,
by finding the cname, cname in the existing list, it returns
  the partial result with the validation result up to then.


git-svn-id: file:///svn/unbound/trunk@4547 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-21 14:04:02 +00:00
Ralph Dolmans
8449dc1b9d - Fix the ce_len+2 fix (Aggressive NSEC review)
git-svn-id: file:///svn/unbound/trunk@4530 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-12 12:22:29 +00:00
Ralph Dolmans
0648475a66 - Processed aggressive NSEC code review remarks Wouter
git-svn-id: file:///svn/unbound/trunk@4529 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-12 12:14:01 +00:00
Ralph Dolmans
77f78152ee - Aggressive use of NSEC implementation. Use cached NSEC records to generate
NXDOMAIN, NODATA and positive wildcard answers.


git-svn-id: file:///svn/unbound/trunk@4522 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-08 13:16:36 +00:00
Ralph Dolmans
f4ff97c297 Also use NSEC with longest closest encloser for CNAME responses.
git-svn-id: file:///svn/unbound/trunk@4463 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-29 14:44:39 +00:00
Ralph Dolmans
b9f4ff6e9f - Use NSEC with longest ce to prove wildcard absence.
- Only use *.ce to prove wildcard absence, no longer names.


git-svn-id: file:///svn/unbound/trunk@4460 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-29 13:46:57 +00:00
Wouter Wijngaards
2a6250e3fb - patch for CVE-2017-15105: vulnerability in the processing of
wildcard synthesized NSEC records.


git-svn-id: file:///svn/unbound/trunk@4441 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-19 09:50:35 +00:00
Wouter Wijngaards
21d1989e05 fix oneoff
git-svn-id: file:///svn/unbound/trunk@4433 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-02 13:36:17 +00:00
Wouter Wijngaards
fa90bbc07a fixup larger than 2**31 case.
git-svn-id: file:///svn/unbound/trunk@4432 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-02 12:43:43 +00:00
Wouter Wijngaards
44eb7bfd25 - Remove clang optimizer disable,
Fix that expiration date checks don't fail with clang -O2.


git-svn-id: file:///svn/unbound/trunk@4431 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-02 10:48:00 +00:00
Wouter Wijngaards
87edf6497d remove debug output
git-svn-id: file:///svn/unbound/trunk@4426 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-15 10:21:38 +00:00
Wouter Wijngaards
6bae276ecb this version of unbound fails when compiled with CC=clang and -O (edit Makefile), or -O2 (default). If you use no optimizing flag, unittest works.
git-svn-id: file:///svn/unbound/trunk@4425 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-12-15 10:16:06 +00:00
Wouter Wijngaards
7d17a926ac - Spelling fixes, from Phil Porada.
git-svn-id: file:///svn/unbound/trunk@4344 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-15 14:29:28 +00:00
Wouter Wijngaards
fe18bbcb1f - Fix 1416: qname-minimisation breaks TLSA lookups with CNAMEs.
git-svn-id: file:///svn/unbound/trunk@4322 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-30 13:13:43 +00:00
Wouter Wijngaards
8d1e4b3648 - Fix install of trust anchor when two anchors are present, makes both
valid.  Checks hash of DS but not signature of new key.  This fixes
  installs between sep11 and oct11 2017.


git-svn-id: file:///svn/unbound/trunk@4302 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-08-21 08:57:44 +00:00
Wouter Wijngaards
6d8a924889 fix type cast.
git-svn-id: file:///svn/unbound/trunk@4287 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 10:50:16 +00:00
Wouter Wijngaards
e396684a54 - Fix #1365: Add Ed25519 support using libnettle.
git-svn-id: file:///svn/unbound/trunk@4286 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 10:44:30 +00:00
Wouter Wijngaards
6f4b0c4fa6 double fallthrough annotation to please gcc parser.
git-svn-id: file:///svn/unbound/trunk@4284 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 09:58:00 +00:00
Wouter Wijngaards
cb0e3980d8 annotate fallthrough
git-svn-id: file:///svn/unbound/trunk@4283 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 09:54:21 +00:00
Wouter Wijngaards
0992621839 Fixup compile for clean_additional changes
git-svn-id: file:///svn/unbound/trunk@4211 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-07 09:24:33 +00:00
Wouter Wijngaards
bfddc0dc64 - Fix that unbound-control can set val_clean_additional and val_permissive_mode.
git-svn-id: file:///svn/unbound/trunk@4209 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-07 06:59:47 +00:00
Wouter Wijngaards
8c4e7ffb14 - Support for openssl EVP_DigestVerify.
- Support for the ED25519 algorithm with openssl (from openssl 1.1.1).


git-svn-id: file:///svn/unbound/trunk@4198 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-30 12:28:25 +00:00
Wouter Wijngaards
658c759b3d - Fix #1267: Libunbound validator/val_secalgo.c uses obsolete APIs.
git-svn-id: file:///svn/unbound/trunk@4174 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-18 07:15:16 +00:00
Ralph Dolmans
657948dd0c - Added mesh_add_sub to add detached mesh entries.
- Use mesh_add_sub for key tag signaling queries.


git-svn-id: file:///svn/unbound/trunk@4144 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-05-02 13:17:56 +00:00
Ralph Dolmans
cb253fafe7 regional_alloc + memcpy to regional_alloc_init
git-svn-id: file:///svn/unbound/trunk@4136 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-26 15:03:32 +00:00
Ralph Dolmans
33001c8c4b please lint
git-svn-id: file:///svn/unbound/trunk@4135 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-26 13:27:07 +00:00
Ralph Dolmans
a511d5d95e - Implemented trust anchor signaling using key tag query.
git-svn-id: file:///svn/unbound/trunk@4134 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-26 12:58:13 +00:00
Wouter Wijngaards
4d7d32c846 - harden algo downgrade also makes unbound more lenient about digest
algorithms in DS records.


git-svn-id: file:///svn/unbound/trunk@4104 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-10 13:38:50 +00:00
George Thessalonikefs
1163c6345b - Fix to prevent non-referal query from being cached as referal when the
no_cache_store flag was set.


git-svn-id: file:///svn/unbound/trunk@4080 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-24 10:51:56 +00:00
Wouter Wijngaards
984c6c33bc prettier size_t and defines.
git-svn-id: file:///svn/unbound/trunk@4062 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 15:43:25 +00:00
Wouter Wijngaards
91bafce012 fix for lint
git-svn-id: file:///svn/unbound/trunk@4060 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 15:18:10 +00:00
Wouter Wijngaards
cc31f2f6e9 fix layout.
git-svn-id: file:///svn/unbound/trunk@4058 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 15:10:08 +00:00
Wouter Wijngaards
a83c7764f5 fix comparison, unsigned does not become negative.
git-svn-id: file:///svn/unbound/trunk@4057 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 15:07:34 +00:00
Wouter Wijngaards
f374268521 - trustanchor tags are sorted. reusable routine to fetch taglist.
git-svn-id: file:///svn/unbound/trunk@4056 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-16 15:04:18 +00:00
Wouter Wijngaards
05215e8e7d - --disable-sha1 disables SHA1 support in RRSIG, so from DNSKEY and
DS records.  NSEC3 is not disabled.
- fake-sha1 test option; print warning if used.  To make unit tests.


git-svn-id: file:///svn/unbound/trunk@4043 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-09 13:18:08 +00:00
Wouter Wijngaards
c010e93d4a - Fix to rename internally used types from _t to _type, because _t
type names are reserved by POSIX.
- iana portlist update


git-svn-id: file:///svn/unbound/trunk@3989 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-19 10:25:41 +00:00
Ralph Dolmans
4f487cf746 Add DSA support for OpenSSL 1.1
git-svn-id: file:///svn/unbound/trunk@3954 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-07 12:58:47 +00:00
George Thessalonikefs
7b948b0647 - Added generic EDNS code for registering known EDNS option codes,
bypassing the cache response stage and uniquifying mesh states. Four EDNS
  option lists were added to module_qstate (module_qstate.edns_opts_*) to
  store EDNS options from/to front/back side.
- Added two flags to module_qstate (no_cache_lookup, no_cache_store) that
  control the modules' cache interactions.
- Added code for registering inplace callback functions. The registered
  functions can be called just before replying with local data or Chaos,
  replying from cache, replying with SERVFAIL, replying with a resolved
  query, sending a query to a nameserver. The functions can inspect the
  available data and maybe change response/query related data (i.e. append
  EDNS options).
- Updated Python module for the above.
- Updated Python documentation.



git-svn-id: file:///svn/unbound/trunk@3947 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-06 13:42:51 +00:00
Ralph Dolmans
3e5cf4da0b - Make access-control-tag-data RDATA absolute. This makes the RDATA origin
consistent between local-data and access-control-tag-data.
- Fix NSEC ENT wildcard check. Matching wildcard does not have to be a subdomain
  of the NSEC owner.



git-svn-id: file:///svn/unbound/trunk@3930 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-11-22 10:10:48 +00:00
Wouter Wijngaards
27182d614b - Fix unit tests for openssl 1.1, with no DSA, by faking DSA, enabled
with the undocumented switch 'fake-dsa'.  It logs a warning.


git-svn-id: file:///svn/unbound/trunk@3909 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-26 07:38:00 +00:00
Wouter Wijngaards
2785225a43 - Fixup query_info local_alias init.
git-svn-id: file:///svn/unbound/trunk@3901 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-20 15:05:30 +00:00
Wouter Wijngaards
cfef4ba047 - Fix DNSSEC validation of query type ANY with DNAME answers.
git-svn-id: file:///svn/unbound/trunk@3898 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-20 14:27:13 +00:00
Wouter Wijngaards
503df095b2 - Patch that resolves CNAMEs entered in local-data conf statements that
point to data on the internet, from Jinmei Tatuya (Infoblox).


git-svn-id: file:///svn/unbound/trunk@3885 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-18 13:18:20 +00:00
Ralph Dolmans
0b3138e1bf - Fix #1117: spelling errors, from Robert Edmonds
git-svn-id: file:///svn/unbound/trunk@3877 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-10-05 09:56:05 +00:00
Wouter Wijngaards
cd842fafb9 - Fix #835: fix --disable-dsa with nettle verify.
git-svn-id: file:///svn/unbound/trunk@3864 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-20 12:22:07 +00:00
Ralph Dolmans
e2e34ad273 fix potential memory leak in daemon/remote.c and nullpointer dereference in
validator/autotrust.


git-svn-id: file:///svn/unbound/trunk@3856 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-15 08:39:59 +00:00
Ralph Dolmans
19ebdbf6a6 Take configured minimum TTL into consideration when reducing TTL to original
TTL from RRSIG.


git-svn-id: file:///svn/unbound/trunk@3849 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-05 12:30:46 +00:00
Wouter Wijngaards
ca5eca9567 - Fix #777: OpenSSL 1.1.0 compatibility, patch from Sebastian A. Siewior.
git-svn-id: file:///svn/unbound/trunk@3837 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-08-29 07:05:19 +00:00
Wouter Wijngaards
eaa6e239f7 - Fix #788 for nettle 3.0: Failed to build with Nettle >= 3.0 and
--with-libunbound-only --with-nettle.


git-svn-id: file:///svn/unbound/trunk@3810 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-05 14:00:33 +00:00
Wouter Wijngaards
2a39f48deb Fixup _get_osfhandle calls
git-svn-id: file:///svn/unbound/trunk@3809 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-05 07:46:16 +00:00
Wouter Wijngaards
941b31f90b - Fixes for 64bit windows compile.
git-svn-id: file:///svn/unbound/trunk@3808 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-07-05 07:40:13 +00:00
Wouter Wijngaards
230ef2110b - Improve threadsafety for openssl 0.9.8 ecdsa dnssec signatures.
git-svn-id: file:///svn/unbound/trunk@3766 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-07 13:02:02 +00:00
Wouter Wijngaards
8336eab1e1 - Fix distinction between free and CRYPTO_free in dsa and ecdsa alloc.
git-svn-id: file:///svn/unbound/trunk@3745 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-06-02 08:31:17 +00:00
Wouter Wijngaards
40dd2acfd9 - generic edns option parse and store code.
git-svn-id: file:///svn/unbound/trunk@3740 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-31 15:08:05 +00:00
Wouter Wijngaards
7fdde81b8f - cachedb module event handling design.
git-svn-id: file:///svn/unbound/trunk@3700 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-04-15 14:19:00 +00:00
Wouter Wijngaards
fd07245a0a Stop memory leak on error condition.
git-svn-id: file:///svn/unbound/trunk@3694 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-23 09:18:29 +00:00
Wouter Wijngaards
fe4760787e please lint.
git-svn-id: file:///svn/unbound/trunk@3693 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-23 08:42:18 +00:00
Wouter Wijngaards
b8df3634cc please lint.
git-svn-id: file:///svn/unbound/trunk@3692 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-23 08:37:27 +00:00
Wouter Wijngaards
038f4ca8b5 please lint.
git-svn-id: file:///svn/unbound/trunk@3690 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-23 08:32:17 +00:00
Wouter Wijngaards
fbae76885a - OpenSSL 1.1.0 portability, --disable-dsa configure option.
git-svn-id: file:///svn/unbound/trunk@3689 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-23 08:19:49 +00:00
Wouter Wijngaards
718e98b1cd - Fix that NSEC3 negative cache is used when there is no salt.
git-svn-id: file:///svn/unbound/trunk@3639 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-24 15:02:35 +00:00
Wouter Wijngaards
e9f954b828 - load gost algorithm if digest is seen before key algorithm.
git-svn-id: file:///svn/unbound/trunk@3630 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-19 12:17:03 +00:00
Wouter Wijngaards
134924c4da Remove lint warning.
git-svn-id: file:///svn/unbound/trunk@3629 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-19 12:16:27 +00:00
Wouter Wijngaards
2c94a5b312 - Print understandable debug log when unusable DS record is seen.
git-svn-id: file:///svn/unbound/trunk@3627 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-19 10:48:23 +00:00
Wouter Wijngaards
785697de82 - insecure-lan-zones: yesno config option, patch from Dag-Erling
Smørgrav.


git-svn-id: file:///svn/unbound/trunk@3619 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-09 13:25:59 +00:00
Wouter Wijngaards
152458c40b - spelling fixes from Igor Sobrado Delgado.
git-svn-id: file:///svn/unbound/trunk@3544 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-18 14:11:46 +00:00
Wouter Wijngaards
ffb5a2d9eb Document ASN contents.
git-svn-id: file:///svn/unbound/trunk@3542 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 14:36:10 +00:00
Wouter Wijngaards
4e3ae5505e cast to please lint.
git-svn-id: file:///svn/unbound/trunk@3541 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 14:27:49 +00:00
Wouter Wijngaards
39dc5be222 - Fixup DER encoded DSA signatures for libnettle.
git-svn-id: file:///svn/unbound/trunk@3540 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 13:31:22 +00:00
Wouter Wijngaards
2756b0f873 Repair // style comments for portability.
git-svn-id: file:///svn/unbound/trunk@3539 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 12:46:47 +00:00
Wouter Wijngaards
fa57a6c6e8 use digest_nettle function for nsec3_hash calls.
git-svn-id: file:///svn/unbound/trunk@3537 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 11:39:58 +00:00
Wouter Wijngaards
3433a30878 please lint.
git-svn-id: file:///svn/unbound/trunk@3536 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 11:32:04 +00:00
Wouter Wijngaards
2a73ccd5b4 - refactor nsec3 hash implementation to be more library-portable.
git-svn-id: file:///svn/unbound/trunk@3535 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 11:30:04 +00:00
Wouter Wijngaards
2bdea62a9e - Fix #594. libunbound: optionally use libnettle for crypto.
Contributed by Luca Bruno.  Added --with-nettle for use with
  --with-libunbound-only.


git-svn-id: file:///svn/unbound/trunk@3533 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-11-17 09:43:07 +00:00
Wouter Wijngaards
bdb24c91b2 - Fix #716: nodata proof with empty non-terminals and wildcards.
git-svn-id: file:///svn/unbound/trunk@3526 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-29 13:08:15 +00:00
Wouter Wijngaards
dd174820dc windows portability.
git-svn-id: file:///svn/unbound/trunk@3521 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-27 15:35:08 +00:00
Wouter Wijngaards
40c139cd8f - Fix #712: unbound-anchor appears to not fsync root.key.
git-svn-id: file:///svn/unbound/trunk@3512 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-22 07:06:31 +00:00
Wouter Wijngaards
e3351c3606 - Remove confusion comment from canonical_compare() function.
git-svn-id: file:///svn/unbound/trunk@3488 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-22 08:43:56 +00:00
Wouter Wijngaards
934954375e configuration option affects autotrust.
git-svn-id: file:///svn/unbound/trunk@3472 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-13 12:52:51 +00:00
Wouter Wijngaards
08e6883578 - 5011 implementation does not insist on all algorithms, when
harden-algo-downgrade is turned off.


git-svn-id: file:///svn/unbound/trunk@3471 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-13 12:03:53 +00:00
Wouter Wijngaards
771e7295ac - Fix 5011 anchor update timer after reload.
git-svn-id: file:///svn/unbound/trunk@3466 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-03 11:56:37 +00:00
Wouter Wijngaards
7166c1ad36 no zero waiting times.
git-svn-id: file:///svn/unbound/trunk@3464 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-30 14:01:04 +00:00
Wouter Wijngaards
814ddc5d48 fixup.
git-svn-id: file:///svn/unbound/trunk@3463 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-30 12:02:18 +00:00
Wouter Wijngaards
ee263cf6c5 - Added permit-small-holddown config to debug fast 5011 rollover.
git-svn-id: file:///svn/unbound/trunk@3462 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-07-30 11:52:12 +00:00
Wouter Wijngaards
b5f391d845 - DLV is going to be decommissioned. Advice to stop using it, and
put text in the example configuration and man page to that effect.


git-svn-id: file:///svn/unbound/trunk@3424 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-05-20 06:24:06 +00:00
Wouter Wijngaards
bfd78a8c23 - Change syntax of particular validator error to be easier for
machine parse, swap rrset and ip adres info so it looks like:
  validation failure <www.example.nl. TXT IN>: signature crypto
  failed from 2001:DB8:7:bba4::53 for <*.example.nl. NSEC IN>


git-svn-id: file:///svn/unbound/trunk@3422 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-05-10 12:04:22 +00:00
Wouter Wijngaards
32f808fcfa - Unbound exits with a fatal error when the auto-trust-anchor-file
fails to be writable.  This is seconds after startup.  You can
  load a readonly auto-trust-anchor-file with trust-anchor-file.
  The file has to be writable to notice the trust anchor change,
  without it, a trust anchor change will be unnoticed and the system
  will then become unoperable.


git-svn-id: file:///svn/unbound/trunk@3387 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-07 12:03:05 +00:00
Wouter Wijngaards
b2bdce46be - rename ldns subdirectory to sldns to avoid name collision.
git-svn-id: file:///svn/unbound/trunk@3380 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-26 10:21:38 +00:00
Wouter Wijngaards
7a9ccf858c - If unknown trust anchor algorithm, and libressl is used, error
message encourages upgrade of the libressl package.


git-svn-id: file:///svn/unbound/trunk@3378 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-25 16:04:05 +00:00
Wouter Wijngaards
6feb8fb6a5 - Fixes to add integer overflow checks on allocation (defense in depth).
git-svn-id: file:///svn/unbound/trunk@3372 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-20 15:36:25 +00:00
Wouter Wijngaards
63b5d109f8 - Use reallocarray for integer overflow protection, patch submitted
by Loganaden Velvindron.


git-svn-id: file:///svn/unbound/trunk@3365 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-17 08:24:24 +00:00
Wouter Wijngaards
49250ef291 - Fix #644: harden-algo-downgrade option, if turned off, fixes the
reported excessive validation failure when multiple algorithms
  are present.  It allows the weakest algorithm to validate the zone.


git-svn-id: file:///svn/unbound/trunk@3354 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-09 13:30:37 +00:00
Wouter Wijngaards
e08aa7c5e1 - Fix validation failure in case upstream forwarder (ISC BIND) does
not have the same trust anchors and decides to insert unsigned NS
  record in authority section.


git-svn-id: file:///svn/unbound/trunk@3329 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-02-09 11:44:46 +00:00
Wouter Wijngaards
15d16580a8 - Fix unintended use of gcc extension for incomplete enum types,
compile with pedantic c99 compliance (from Daniel Dickman).


git-svn-id: file:///svn/unbound/trunk@3321 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-01-26 08:46:40 +00:00
Wouter Wijngaards
67a3c4933c - Fix cdflag dns64 processing.
git-svn-id: file:///svn/unbound/trunk@3275 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-19 08:43:08 +00:00
Wouter Wijngaards
b781f2d48d - Fix that CD flag disables DNS64 processing, returning the DNSSEC
signed AAAA denial.


git-svn-id: file:///svn/unbound/trunk@3273 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-18 15:15:57 +00:00
Wouter Wijngaards
f1bcc1032f More casts.
git-svn-id: file:///svn/unbound/trunk@3244 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-13 09:23:12 +00:00
Wouter Wijngaards
339a6be27d More unsigned chasts for toupper/tolower/ctype
git-svn-id: file:///svn/unbound/trunk@3242 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-13 08:35:00 +00:00
Matthijs Mekking
dab0af8d87 Be lenient when a NSEC NameError response with RCODE=NXDOMAIN is received.
This is okay according 4035, but not after revising existence in 4592. 
NSEC empty non-terminals exist and thus the RCODE should have been NOERROR.

If this occurs, and the RRsets are secure, we set the RCODE to NOERROR and
the security status of the reponse is also considered secure.



git-svn-id: file:///svn/unbound/trunk@3089 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-20 09:46:50 +00:00
Matthijs Mekking
492a5ca681 only whitespace changes
git-svn-id: file:///svn/unbound/trunk@3088 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-18 13:54:19 +00:00
Wouter Wijngaards
2b90f38a70 And fix #551 REGENT to COPYRIGHT HOLDER in license in file headings.
git-svn-id: file:///svn/unbound/trunk@3079 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-07 13:28:39 +00:00
Wouter Wijngaards
2bb8f893cc - Fix #547: no trustanchor written if filesystem full, fclose checked.
git-svn-id: file:///svn/unbound/trunk@3044 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-21 10:14:55 +00:00
Wouter Wijngaards
3ce7b4a6fa - Windows port, adjust %lld to %I64d, and warning in win_event.c.
git-svn-id: file:///svn/unbound/trunk@3040 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-16 16:01:37 +00:00
Wouter Wijngaards
67f5157e45 - fix #544: Fixed +i causes segfault when running with module conf "iterator".
git-svn-id: file:///svn/unbound/trunk@3038 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-16 13:04:34 +00:00
Wouter Wijngaards
d3cbd76546 - Fix sldns to use sldns_ prefix for all ldns_ variables.
git-svn-id: file:///svn/unbound/trunk@3022 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 09:11:16 +00:00
Wouter Wijngaards
3de090dadb Fix linking of sldns and ldns, unique identifiers for global variables.
git-svn-id: file:///svn/unbound/trunk@3021 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-11-30 11:03:55 +00:00
Wouter Wijngaards
29e96e86c9 - separate ldns into core ldns inside ldns/ subdirectory. No more
--with-ldns is needed and unbound does not rely on libldns.


git-svn-id: file:///svn/unbound/trunk@2998 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 15:09:26 +00:00
Wouter Wijngaards
c9438d938e fix lint, more time_t
git-svn-id: file:///svn/unbound/trunk@2950 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-27 14:45:33 +00:00
Wouter Wijngaards
3e41dedfc5 remove bool.
git-svn-id: file:///svn/unbound/trunk@2949 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-27 13:47:23 +00:00
Wouter Wijngaards
bf67dc2a0d remove bool.
git-svn-id: file:///svn/unbound/trunk@2948 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-27 13:46:41 +00:00