Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stubby unable to connect to Cloudflare's 1.1.1.1 (WINDOWS) #87

Closed
jankal opened this issue Apr 2, 2018 · 54 comments
Closed

Stubby unable to connect to Cloudflare's 1.1.1.1 (WINDOWS) #87

jankal opened this issue Apr 2, 2018 · 54 comments

Comments

@jankal
Copy link

jankal commented Apr 2, 2018

Stubby is unable to connect to 1.1.1.1 for DNS-over-TLS cause it cannot validate the certificate on Windows 10 Build 16299

Following configuration should work:

upstream_recursive_servers:
  - address_data: 1.1.1.1
    tls_pubkey_pinset:
      - digest: "sha256"
        value: yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc=

Unfortunatly it fails with a Verify failed : Transport=TLS - *Failure* - (20) "unable to get local issuer certificate"

This should really be fixed! Why doesn't Stubby just use the Windows certificate store to validate the TLS certificates? - Even just a cacerts file would do it, so the users can edit it and add the required certificates if they want to set up their own DNS-over-TLS server within Stubby.

@saradickinson @wtoorop

This is important!

Also see #46

@4b69
Copy link

4b69 commented Apr 2, 2018

Using this works for me:

upstream_recursive_servers:
  - address_data: 1.1.1.1
    tls_port: 853
    tls_auth_name: "cloudflare-dns.com"

@sergeevabc
Copy link

sergeevabc commented Apr 2, 2018

Unable to connect to Cloudflare over TLS either.
Many other TLS resolvers work fine, Cloudflare’s DoH implementation works fine.
So, I guess, there is something wrong with Stubby 0.0.2 for Windows. Please, fix it.

resolution_type: GETDNS_RESOLUTION_STUB
dns_transport_list:
  - GETDNS_TRANSPORT_TLS
tls_authentication: GETDNS_AUTHENTICATION_REQUIRED
tls_query_padding_blocksize: 128
edns_client_subnet_private : 1
idle_timeout: 10000
listen_addresses:
  - 127.0.0.1
round_robin_upstreams: 1
upstream_recursive_servers:
   - address_data: 1.1.1.1
     tls_auth_name: "cloudflare-dns.com"
     tls_port: 853
     tls_pubkey_pinset:
       - digest: "sha256"
         value: yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc=

or even

   - address_data: 1.1.1.1
     tls_auth_name: "cloudflare-dns.com"

ends up in

STUBBY: 1.1.1.1 : Verify failed : Transport=TLS - *Failure* - (20) "unable to get local issuer certificate"
STUBBY: *FAILURE* no valid transports or upstreams available!

@t5k6
Copy link

t5k6 commented Apr 2, 2018

echo | openssl s_client -connect '1.1.1.1:853' 2>/dev/null | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
returns
yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc=

So this seems to be working for me:

  • address_data: 1.1.1.1
    tls_port: 853
    tls_auth_name: "cloudflare-dns.com"
    tls_pubkey_pinset:
    • digest: "sha256"
      value: yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc=

@george-chakhidze
Copy link

george-chakhidze commented Apr 2, 2018

@t5k6 I have same config, but it fails with error: Verify failed : Transport=TLS - *Failure* - (20) "unable to get local issuer certificate". All CA certificates in the entire chain are present in Windows certificate store.

P.S.: Quad9 (9.9.9.9:853) fails with same error too.

@jankal
Copy link
Author

jankal commented Apr 2, 2018

@t5k6 I used the folllowing method:

> openssl s_client -connect 1.1.1.1:853 | openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64

which gives:

depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA
verify return:1
depth=1 C = US, O = DigiCert Inc, CN = DigiCert ECC Secure Server CA
verify return:1
depth=0 C = US, ST = CA, L = San Francisco, O = "Cloudflare, Inc.", CN = *.cloudflare-dns.com
verify return:1
140249323541760:error:0607907F:digital envelope routines:EVP_PKEY_get0_RSA:expecting an rsa key:../crypto/evp/p_lib.c:264:
47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=

When putting in 145.100.185.15 this also brings me 62lKu9HsDVbyiPenApnc4sfmSYTHOVfFgL3pyB+cBL4= as specified in the default stubby.yml
(for reference)

> openssl s_client -connect 145.100.185.15:853 | openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = dnsovertls.sinodun.com
verify return:1
writing RSA key
62lKu9HsDVbyiPenApnc4sfmSYTHOVfFgL3pyB+cBL4=

Conclusion:
I think DigiCert's root is not specified in the CA-bundle shipped with Stubby.

@jankal
Copy link
Author

jankal commented Apr 2, 2018

@t5k6 My method is usually right but failed due to the certificate not being an RSA certificate.
So I'm wrong with the sha256-pin

But even when I changed the sha256-pin, the error remains.

@jankal
Copy link
Author

jankal commented Apr 2, 2018

@nja0087 Problem still remains with your proposed configuration.

@4b69
Copy link

4b69 commented Apr 2, 2018

Output of dig for google.com running dnsmasq/stubby using config above with Cloudflare's 1.1.1.1 and DNSSEC:

; <<>> DiG 9.11.3-1-Debian <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16061
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1536
; PAD: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (".........................................................................................................................................................................................................................................................................................................................................................................................................................")
;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             35      IN      A       216.58.196.142

;; Query time: 186 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Apr 02 23:53:55 ACST 2018
;; MSG SIZE  rcvd: 478

for Stubby 1.4.1-1 on Debian/kernel 4.15

@jankal
Copy link
Author

jankal commented Apr 2, 2018

@nja0087 This thread is only about Windows.
Stubby uses the default ca-certififactes on other OS's. So it works fine on all the other OS's.

@jankal jankal changed the title Stubby unable to connect to Cloudflare's 1.1.1.1 Stubby unable to connect to Cloudflare's 1.1.1.1 (WINDOWS) Apr 2, 2018
@t5k6
Copy link

t5k6 commented Apr 2, 2018

It's working fine for me on Windows 10.
Output of "stubby -i":
...
"resolution_type": GETDNS_RESOLUTION_STUB,
"return_both_v4_and_v6": GETDNS_EXTENSION_FALSE,
"return_call_reporting": GETDNS_EXTENSION_FALSE,
"round_robin_upstreams": 1,
"specify_class": 1,
"suffix": [],
"timeout": 5000,
"tls_authentication": GETDNS_AUTHENTICATION_NONE,
"tls_backoff_time": 3600,
"tls_connection_retries": 2,
"tls_query_padding_blocksize": 256,
"trust_anchors_url": <bindata of "http://data.iana.org/root-anchor"...>,
"trust_anchors_verify_CA": <bindata of 0x2d2d2d2d2d424547494e204345525449...>,
"trust_anchors_verify_email": <bindata of "dnssec@iana.org">,
...
"openssl_build_version_number": 268443855,
"resolution_type": GETDNS_RESOLUTION_STUB,
"version_number": 16908737,
"version_string": <bindata of "1.2.2-rc1">

@jankal
Copy link
Author

jankal commented Apr 2, 2018

@t5k6 When you disable TLS verification / allow Stubby to resolve without DNS-over-TLS (GETDNS_AUTHENTICATION_NONE), it works. But that's not the goal of a DNS-over-TLS resolver.

Help states:

# Selects Strict or Opportunistic Usage profile as described in
# https://datatracker.ietf.org/doc/draft-ietf-dprive-dtls-and-tls-profiles/
# Strict mode requires that authentication information for the upstreams is
# specified below. Opportunistic may fallback to clear text DNS if UDP or TCP
# is included in the transport list above.
# For Strict use        GETDNS_AUTHENTICATION_REQUIRED
# For Opportunistic use GETDNS_AUTHENTICATION_NONE

@t5k6
Copy link

t5k6 commented Apr 2, 2018

@jankal This can be another problem, because the relevant part in my config is uncommented.
tls_authentication: GETDNS_AUTHENTICATION_REQUIRED.
And the log shows as:
STUBBY: 1.1.1.1 : Conn opened: TLS - Strict Profile

@jankal
Copy link
Author

jankal commented Apr 2, 2018

@t5k6 Looks promising. How on earth did it open a TLS connection now?

Maybe this got something to do with:

"openssl_build_version_number": 268443855,

@t5k6
Copy link

t5k6 commented Apr 2, 2018

@jankal Sorry, earlier I haven't directed the command to stubby.yml with
stubby -i -C stubby.yml

The correct output for comparison:
"resolution_type": GETDNS_RESOLUTION_STUB,
"return_both_v4_and_v6": GETDNS_EXTENSION_FALSE,
"return_call_reporting": GETDNS_EXTENSION_FALSE,
"round_robin_upstreams": 0,
"specify_class": 1,
"suffix": [],
"timeout": 5000,
"tls_authentication": GETDNS_AUTHENTICATION_REQUIRED,
"tls_backoff_time": 3600,
"tls_connection_retries": 2,
"tls_query_padding_blocksize": 128,
"trust_anchors_url": <bindata of "http://data.iana.org/root-anchor"...>,
"trust_anchors_verify_CA": <bindata of 0x2d2d2d2d2d424547494e204345525449...>,
"trust_anchors_verify_email": <bindata of "dnssec@iana.org">,
"upstream_recursive_servers":
...
"api_version_number": 132058112,
"api_version_string": <bindata of "December 2015">,
"compilation_comment": <bindata of "getdns 1.2.2-rc1 configured on 2"...>,
"default_hosts_location": <bindata of "C:\Windows\System32\Drivers\etc"...>,
"default_resolvconf_location": <bindata of "/etc/resolv.conf">,
"default_trust_anchor_location": <bindata of "/mingw64/etc/unbound/getdns-root"...>,
"implementation_string": <bindata of "https://getdnsapi.net">,
"listen_addresses":
[
<bindata of 0x7f000001>
],
"openssl_build_version_number": 268443855,
"resolution_type": GETDNS_RESOLUTION_STUB,
"version_number": 16908737,
"version_string": <bindata of "1.2.2-rc1">

@sergeevabc
Copy link

sergeevabc commented Apr 2, 2018

Fellows, haste makes waste, stop posting your “it works for me” without carefully reading first. Mr. @jankal stated clearly in the initial post that issue is related to Windows certificates store, which echoes last year still unresolved issue #46. Windows users have different state of certificates store, there are already three non-amateurs here (the author, @george-chakhidze and me), who suffer from this issue not because configuration is wrong, some whitespaces are omitted, or something else, but exactly because Stubby is a fledgling endeavour. And the only valuable feedback would come from Stubby’s maintainers, i.e. a fix.

@jankal
Copy link
Author

jankal commented Apr 3, 2018

For configuration see #89

@saradickinson
Copy link
Contributor

Firstly, apologies about the earlier misleading comment - the Windows installer does use the system CA cert store..... but it loads it dynamically into the internal OpenSSL cert store when Stubby starts. So any changes to that store require a restart of Stubby to be used.

However, I've just tested this on Windows 10, build 16299 and I am able to connect to both 1.1.1.1 and 9.9.9.9 with no problem using Strict mode. So something slightly deeper going on here.... continuing to investigate.

Also am updating the Windows installer to use 1.4.1 and will post here when available.

@sergeevabc
Copy link

sergeevabc commented Apr 4, 2018

@saradickinson, it would be easier for some of us, myself included, if you just put updated stubby.exe and stubby.yml into portable 7z/zip archive than deploy complex solutions like installers. Securing DNS traffic is and will be a geek topic per se, let alone changing configuration via text file, so it's reasonable to assume that average Joe here is skilled enough to manage DNS without Powershell scripts, etc. In the meantime I use Universal Extractor to get those files w/o running the installer first. Or, if you are somehow obsessed with installers, yours could be tweaked as follows, akin to what Wikipad or Foobar2000 offer.

@saradickinson
Copy link
Contributor

Hi All, A new Windows installer is a now available using getdns 1.4.1:
https://dnsprivacy.org/wiki/display/DP/Windows+installer+for+Stubby
However note @wtoorop the ca_path/ca-file settings are not used for the Windows cert config in 1.4.1, the code currently just loads from the system root store. We'll need to fix this.
But this release should allow using just pins for validation as a workaround.
@sergeevabc I've added a zip file to that page that just contains the same files as the installer

@sergeevabc
Copy link

sergeevabc commented Apr 5, 2018

Does not work me, I see the same error: "unable to get local issuer certificate".
Should I do something more than unpack, uncomment 1.1.1.1 and run Stubby?

@wtoorop
Copy link
Contributor

wtoorop commented Apr 5, 2018

@sergeevabc which version of Windows do you use?

@george-chakhidze
Copy link

@wtoorop Same here (Windows 8.1 x64 [Version 6.3.9600]).

@sergeevabc
Copy link

@wtoorop, Windows 7 x64.

@saradickinson
Copy link
Contributor

@sergeevabc @george-chakhidze Can you please test and confirm this fails if you use just a SPKI pin? The config uses the tls_auth name by default so replace it with the following:

upstream_recursive_servers:
  - address_data: 1.1.1.1
    tls_pubkey_pinset:
      - digest: "sha256"
        value: yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc=

@sergeevabc
Copy link

sergeevabc commented Apr 5, 2018

resolution_type: GETDNS_RESOLUTION_STUB
dns_transport_list:
  - GETDNS_TRANSPORT_TLS
tls_authentication: GETDNS_AUTHENTICATION_REQUIRED
tls_query_padding_blocksize: 128
edns_client_subnet_private : 1
idle_timeout: 10000
listen_addresses:
  - 127.0.0.1
round_robin_upstreams: 1
upstream_recursive_servers:
  - address_data: 1.1.1.1
    tls_pubkey_pinset:
      - digest: "sha256"
        value: yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc=

outputs

STUBBY: Read config from file stubby.yml
STUBBY: DNSSEC Validation is OFF
STUBBY: Transport list is:
STUBBY:   - TLS
STUBBY: Privacy Usage Profile is Strict (Authentication required)
STUBBY: (NOTE a Strict Profile only applies when TLS is the ONLY transport!!)
STUBBY: Starting DAEMON....
Could not schedule query: The context has internal deficiencies
STUBBY: 1.1.1.1                                  : Conn opened: TLS - Strict Profile
STUBBY: 1.1.1.1                                  : Verify failed : TLS - *Failure* -  (20) "unable to get local issuer certificate"
STUBBY: 1.1.1.1                                  : Conn closed: TLS - *Failure*
STUBBY:    *FAILURE* no valid transports or upstreams available!
STUBBY: 1.1.1.1                                  : Conn closed: TLS - Resps=     0, Timeouts  =     0, Curr_auth = Failed, Keepalive(ms)=     0
STUBBY: 1.1.1.1                                  : Upstream   : TLS - Resps=     0, Timeouts  =     0, Best_auth = Failed
STUBBY: 1.1.1.1                                  : Upstream   : TLS - Conns=     0, Conn_fails=     1, Conn_shuts=      0, Backoffs     =     0
STUBBY:    *FAILURE* no valid transports or upstreams available!
Could not schedule query: None of the configured upstreams could be used to send queries on the specified transports

So, I guess, it does not work on my end.

@lp123sun
Copy link

lp123sun commented Apr 5, 2018

C:\OpenSSL-Win32\bin>openssl s_client -connect 9.9.9.9:853 | openssl x509 -pubke
y -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | open
ssl enc -base64
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify error:num=20:unable to get local issuer certificate
writing RSA key
ZMZ1T16d9Qc5uvRpUn/mu6fh4+IdoJGOEKjANut91Io=

what's wrong?

win8.1 64 bit

@lp123sun
Copy link

lp123sun commented Apr 5, 2018

[11:50:26.832943] STUBBY: FAILURE no valid transports or upstreams availabl
e!
Could not schedule query: None of the configured upstreams could be used to send
queries on the specified transports
^C

When I changed GETDNS_AUTHENTICATION_REQUIRED to GETDNS_AUTHENTICATION_NONE, it would be ok.

C:\OpenSSL-Win64\bin>"C:\Program Files\Stubby\stubby.exe" -C "C:\Program Files\S
tubby\stubby.yml" -l
[12:00:22.188879] STUBBY: Read config from file C:\Program Files\Stubby\stubby.y
ml
[12:00:22.192881] STUBBY: DNSSEC Validation is OFF
[12:00:22.193955] STUBBY: Transport list is:
[12:00:22.194883] STUBBY: - TLS
[12:00:22.194883] STUBBY: Privacy Usage Profile is Opportunistic
[12:00:22.195884] STUBBY: (NOTE a Strict Profile only applies when TLS is the ON
LY transport!!)
[12:00:22.196884] STUBBY: Starting DAEMON....
[12:00:40.867252] STUBBY: 9.9.9.9 : Conn opened
: TLS - Opportunistic Profile
[12:00:41.455641] STUBBY: 9.9.9.9 : Verify pass
ed : TLS
[12:00:59.109342] STUBBY: 9.9.9.9 : Conn closed
: TLS - Resps= 10, Timeouts = 0, Curr_auth =Success, Keepalive(ms)= 1000
0
[12:00:59.112343] STUBBY: 9.9.9.9 : Upstream
: TLS - Resps= 10, Timeouts = 0, Best_auth =Success
[12:00:59.113345] STUBBY: 9.9.9.9 : Upstream
: TLS - Conns= 1, Conn_fails= 0, Conn_shuts= 0, Backoffs =
0
[12:01:06.323537] STUBBY: 9.9.9.9 : Conn opened
: TLS - Opportunistic Profile
[12:01:08.825509] STUBBY: 9.9.9.9 : Conn closed
: TLS - Failure
[12:01:08.827505] STUBBY: FAILURE no valid transports or upstreams availabl
e!
[12:01:08.828506] STUBBY: 9.9.9.9 : Conn closed
: TLS - Failure
[12:01:08.829507] STUBBY: FAILURE no valid transports or upstreams availabl
e!
[12:01:08.830508] STUBBY: 9.9.9.9 : Conn closed
: TLS - Failure
[12:01:08.831514] STUBBY: FAILURE no valid transports or upstreams availabl
e!
[12:01:08.832511] STUBBY: 9.9.9.9 : Conn closed
: TLS - Resps= 0, Timeouts = 0, Curr_auth = None, Keepalive(ms)=
0
[12:01:08.834509] STUBBY: 9.9.9.9 : Upstream
: TLS - Resps= 10, Timeouts = 0, Best_auth =Success

@jankal
Copy link
Author

jankal commented Apr 5, 2018

First: current version details:

"api_version_number": 132058112,
  "api_version_string": <bindata of "December 2015">,
  "compilation_comment": <bindata of "getdns 1.4.1 configured on 2018-"...>,
  "default_hosts_location": <bindata of "C:\Windows\System32\Drivers\etc\"...>,
  "default_resolvconf_location": <bindata of "/etc/resolv.conf">,
  "default_trust_anchor_location": <bindata of "/mingw64/etc/unbound/getdns-root"...>,
  "implementation_string": <bindata of "https://getdnsapi.net">,
  "openssl_build_version_number": 269484159,
  "openssl_built_on": <bindata of "built on: reproducible build, da"...>,
  "openssl_cflags": <bindata of "compiler: gcc -DDSO_WIN32 -DNDEB"...>,
  "openssl_dir": <bindata of "OPENSSLDIR: "C:/OpenSSL-1.1/ssl"">,
  "openssl_engines_dir": <bindata of "ENGINESDIR: "C:/OpenSSL-1.1/lib/"...>,
  "openssl_platform": <bindata of "platform: mingw64">,
  "openssl_version_number": 269484159,
  "openssl_version_string": <bindata of "OpenSSL 1.1.0g  2 Nov 2017">,
  "resolution_type": GETDNS_RESOLUTION_STUB,
  "version_number": 17039616,
  "version_string": <bindata of "1.4.1">

So this is my output on Windows 10 Build 16299 using the default config (uncommented Cloudflare entries):

C:\Program Files\Stubby>"C:\Program Files\Stubby\stubby.exe" -C "C:\Program Files\Stubby\stubby.yml" -l
[13:24:28.310641] STUBBY: Read config from file C:\Program Files\Stubby\stubby.yml
[13:24:28.315141] STUBBY: DNSSEC Validation is OFF
[13:24:28.315141] STUBBY: Transport list is:
[13:24:28.316142] STUBBY:   - TLS
[13:24:28.316643] STUBBY: Privacy Usage Profile is Strict (Authentication required)
[13:24:28.317140] STUBBY: (NOTE a Strict Profile only applies when TLS is the ONLY transport!!)
[13:24:28.317640] STUBBY: Starting DAEMON....
Could not schedule query: The context has internal deficiencies
[13:25:08.198874] STUBBY: 145.100.185.15                           : Conn opened: TLS - Strict Profile
[13:25:08.296425] STUBBY: 145.100.185.15                           : Verify passed : TLS
[13:25:11.514219] STUBBY: 145.100.185.16                           : Conn opened: TLS - Strict Profile
[13:25:11.596021] STUBBY: 145.100.185.16                           : Verify passed : TLS
[13:25:12.924874] STUBBY: 185.49.141.37                            : Conn opened: TLS - Strict Profile
[13:25:13.002964] STUBBY: 185.49.141.37                            : Verify passed : TLS
[13:25:13.920076] STUBBY: 2001:610:1:40ba:145:100:185:15           : Conn opened: TLS - Strict Profile
[13:25:14.013667] STUBBY: 2001:610:1:40ba:145:100:185:15           : Verify passed : TLS
[13:25:15.569710] STUBBY: 2001:610:1:40ba:145:100:185:16           : Conn opened: TLS - Strict Profile
[13:25:15.657170] STUBBY: 2001:610:1:40ba:145:100:185:16           : Verify passed : TLS
[13:25:16.825009] STUBBY: 2a04:b900:0:100::38                      : Conn opened: TLS - Strict Profile
[13:25:16.909271] STUBBY: 2a04:b900:0:100::38                      : Verify passed : TLS
[13:25:18.344658] STUBBY: 145.100.185.15                           : Conn closed: TLS - Resps=     1, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:25:18.345126] STUBBY: 145.100.185.15                           : Upstream   : TLS - Resps=     1, Timeouts  =     0, Best_auth =Success
[13:25:18.345625] STUBBY: 145.100.185.15                           : Upstream   : TLS - Conns=     1, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0
[13:25:18.705909] STUBBY: 1.1.1.1                                  : Conn opened: TLS - Strict Profile
[13:25:18.766131] STUBBY: 1.1.1.1                                  : Verify failed : TLS - *Failure* -  (20) "unable to get local issuer certificate"
[13:25:18.766618] STUBBY: 1.1.1.1                                  : Conn closed: TLS - *Failure*
[13:25:18.767622] STUBBY: 1.0.0.1                                  : Conn opened: TLS - Strict Profile
[13:25:18.768123] STUBBY: 1.1.1.1                                  : Conn closed: TLS - Resps=     0, Timeouts  =     0, Curr_auth = Failed, Keepalive(ms)=     0
[13:25:18.768621] STUBBY: 1.1.1.1                                  : Upstream   : TLS - Resps=     0, Timeouts  =     0, Best_auth = Failed
[13:25:18.769124] STUBBY: 1.1.1.1                                  : Upstream   : TLS - Conns=     0, Conn_fails=     1, Conn_shuts=      0, Backoffs     =     0
[13:25:18.821364] STUBBY: 1.0.0.1                                  : Verify failed : TLS - *Failure* -  (20) "unable to get local issuer certificate"
[13:25:18.821866] STUBBY: 1.0.0.1                                  : Conn closed: TLS - *Failure*
[13:25:18.822865] STUBBY: 2606:4700:4700::1111                     : Conn opened: TLS - Strict Profile
[13:25:18.823370] STUBBY: 1.0.0.1                                  : Conn closed: TLS - Resps=     0, Timeouts  =     0, Curr_auth = Failed, Keepalive(ms)=     0
[13:25:18.823865] STUBBY: 1.0.0.1                                  : Upstream   : TLS - Resps=     0, Timeouts  =     0, Best_auth = Failed
[13:25:18.824366] STUBBY: 1.0.0.1                                  : Upstream   : TLS - Conns=     0, Conn_fails=     1, Conn_shuts=      0, Backoffs     =     0
[13:25:18.885066] STUBBY: 2606:4700:4700::1111                     : Verify failed : TLS - *Failure* -  (20) "unable to get local issuer certificate"
[13:25:18.885571] STUBBY: 2606:4700:4700::1111                     : Conn closed: TLS - *Failure*
[13:25:18.886568] STUBBY: 2606:4700:4700::1001                     : Conn opened: TLS - Strict Profile
[13:25:18.886568] STUBBY: 2606:4700:4700::1111                     : Conn closed: TLS - Resps=     0, Timeouts  =     0, Curr_auth = Failed, Keepalive(ms)=     0
[13:25:18.887570] STUBBY: 2606:4700:4700::1111                     : Upstream   : TLS - Resps=     0, Timeouts  =     0, Best_auth = Failed
[13:25:18.888070] STUBBY: 2606:4700:4700::1111                     : Upstream   : TLS - Conns=     0, Conn_fails=     1, Conn_shuts=      0, Backoffs     =     0
[13:25:18.946233] STUBBY: 2606:4700:4700::1001                     : Verify failed : TLS - *Failure* -  (20) "unable to get local issuer certificate"
[13:25:18.947222] STUBBY: 2606:4700:4700::1001                     : Conn closed: TLS - *Failure*
[13:25:18.949219] STUBBY: 145.100.185.15                           : Conn opened: TLS - Strict Profile
[13:25:18.950216] STUBBY: 2606:4700:4700::1001                     : Conn closed: TLS - Resps=     0, Timeouts  =     0, Curr_auth = Failed, Keepalive(ms)=     0
[13:25:18.951717] STUBBY: 2606:4700:4700::1001                     : Upstream   : TLS - Resps=     0, Timeouts  =     0, Best_auth = Failed
[13:25:18.953219] STUBBY: 2606:4700:4700::1001                     : Upstream   : TLS - Conns=     0, Conn_fails=     1, Conn_shuts=      0, Backoffs     =     0
[13:25:21.641500] STUBBY: 145.100.185.16                           : Conn closed: TLS - Resps=     1, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:25:21.641934] STUBBY: 145.100.185.16                           : Upstream   : TLS - Resps=     1, Timeouts  =     0, Best_auth =Success
[13:25:21.642928] STUBBY: 145.100.185.16                           : Upstream   : TLS - Conns=     1, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0
[13:25:23.233241] STUBBY: 185.49.141.37                            : Conn closed: TLS - Resps=     1, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:25:23.233744] STUBBY: 185.49.141.37                            : Upstream   : TLS - Resps=     1, Timeouts  =     0, Best_auth =Success
[13:25:23.234747] STUBBY: 185.49.141.37                            : Upstream   : TLS - Conns=     1, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0
[13:25:24.043945] STUBBY: 2001:610:1:40ba:145:100:185:15           : Conn closed: TLS - Resps=     1, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:25:24.044949] STUBBY: 2001:610:1:40ba:145:100:185:15           : Upstream   : TLS - Resps=     1, Timeouts  =     0, Best_auth =Success
[13:25:24.046447] STUBBY: 2001:610:1:40ba:145:100:185:15           : Upstream   : TLS - Conns=     1, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0
[13:25:25.675440] STUBBY: 145.100.185.16                           : Conn opened: TLS - Strict Profile
[13:25:25.686441] STUBBY: 2001:610:1:40ba:145:100:185:16           : Conn closed: TLS - Resps=     1, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:25:25.686441] STUBBY: 2001:610:1:40ba:145:100:185:16           : Upstream   : TLS - Resps=     1, Timeouts  =     0, Best_auth =Success
[13:25:25.690443] STUBBY: 2001:610:1:40ba:145:100:185:16           : Upstream   : TLS - Conns=     1, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0
[13:25:26.848485] STUBBY: 185.49.141.37                            : Conn opened: TLS - Strict Profile
[13:25:27.008486] STUBBY: 2a04:b900:0:100::38                      : Conn closed: TLS - Resps=     1, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:25:27.008958] STUBBY: 2a04:b900:0:100::38                      : Upstream   : TLS - Resps=     1, Timeouts  =     0, Best_auth =Success
[13:25:27.009456] STUBBY: 2a04:b900:0:100::38                      : Upstream   : TLS - Conns=     1, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0
[13:25:27.281155] STUBBY: 185.49.141.37                            : Conn closed: TLS - Resps=     1, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:25:27.282156] STUBBY: 185.49.141.37                            : Upstream   : TLS - Resps=     2, Timeouts  =     0, Best_auth =Success
[13:25:27.282656] STUBBY: 185.49.141.37                            : Upstream   : TLS - Conns=     2, Conn_fails=     0, Conn_shuts=      1, Backoffs     =     0
[13:25:28.103091] STUBBY: 2001:610:1:40ba:145:100:185:15           : Conn opened: TLS - Strict Profile
[13:25:29.091185] STUBBY: 145.100.185.15                           : Conn closed: TLS - Resps=     1, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:25:29.092196] STUBBY: 145.100.185.15                           : Upstream   : TLS - Resps=     2, Timeouts  =     0, Best_auth =Success
[13:25:29.093196] STUBBY: 145.100.185.15                           : Upstream   : TLS - Conns=     2, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0
[13:25:29.347473] STUBBY: 2001:610:1:40ba:145:100:185:16           : Conn opened: TLS - Strict Profile
[13:25:30.504038] STUBBY: 2a04:b900:0:100::38                      : Conn opened: TLS - Strict Profile
[13:25:31.323132] STUBBY: 145.100.185.15                           : Conn opened: TLS - Strict Profile
[13:25:34.923187] STUBBY: 185.49.141.37                            : Conn opened: TLS - Strict Profile
[13:25:35.328475] STUBBY: 185.49.141.37                            : Conn closed: TLS - Resps=     1, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:25:35.328975] STUBBY: 185.49.141.37                            : Upstream   : TLS - Resps=     3, Timeouts  =     0, Best_auth =Success
[13:25:35.329475] STUBBY: 185.49.141.37                            : Upstream   : TLS - Conns=     3, Conn_fails=     0, Conn_shuts=      2, Backoffs     =     0
[13:25:44.462853] STUBBY: 145.100.185.16                           : Conn closed: TLS - Resps=     2, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:25:44.464848] STUBBY: 145.100.185.16                           : Upstream   : TLS - Resps=     3, Timeouts  =     0, Best_auth =Success
[13:25:44.469350] STUBBY: 145.100.185.16                           : Upstream   : TLS - Conns=     2, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0
[13:25:44.763387] STUBBY: 145.100.185.16                           : Conn opened: TLS - Strict Profile
[13:25:45.636939] STUBBY: 2001:610:1:40ba:145:100:185:15           : Conn closed: TLS - Resps=     2, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:25:45.637440] STUBBY: 2001:610:1:40ba:145:100:185:15           : Upstream   : TLS - Resps=     3, Timeouts  =     0, Best_auth =Success
[13:25:45.637944] STUBBY: 2001:610:1:40ba:145:100:185:15           : Upstream   : TLS - Conns=     2, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0
[13:25:45.854943] STUBBY: 185.49.141.37                            : Conn opened: TLS - Strict Profile
[13:25:46.868386] STUBBY: 2001:610:1:40ba:145:100:185:15           : Conn opened: TLS - Strict Profile
[13:25:47.650802] STUBBY: 2001:610:1:40ba:145:100:185:16           : Conn closed: TLS - Resps=     2, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:25:47.651792] STUBBY: 2001:610:1:40ba:145:100:185:16           : Upstream   : TLS - Resps=     3, Timeouts  =     0, Best_auth =Success
[13:25:47.653303] STUBBY: 2001:610:1:40ba:145:100:185:16           : Upstream   : TLS - Conns=     2, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0
[13:25:48.019401] STUBBY: 2001:610:1:40ba:145:100:185:16           : Conn opened: TLS - Strict Profile
[13:25:48.708012] STUBBY: 2a04:b900:0:100::38                      : Conn closed: TLS - Resps=     2, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:25:48.708506] STUBBY: 2a04:b900:0:100::38                      : Upstream   : TLS - Resps=     3, Timeouts  =     0, Best_auth =Success
[13:25:48.709503] STUBBY: 2a04:b900:0:100::38                      : Upstream   : TLS - Conns=     2, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0
[13:25:49.216558] STUBBY: 2a04:b900:0:100::38                      : Conn opened: TLS - Strict Profile

So it still fails using the tls_auth_name.

When using the SPKI pin, it still fails:

[13:31:33.079751] STUBBY: Read config from file C:\Program Files\Stubby\stubby.yml
[13:31:33.083748] STUBBY: DNSSEC Validation is OFF
[13:31:33.083748] STUBBY: Transport list is:
[13:31:33.084750] STUBBY:   - TLS
[13:31:33.085249] STUBBY: Privacy Usage Profile is Strict (Authentication required)
[13:31:33.085750] STUBBY: (NOTE a Strict Profile only applies when TLS is the ONLY transport!!)
[13:31:33.086750] STUBBY: Starting DAEMON....
Could not schedule query: The context has internal deficiencies
[13:31:36.964505] STUBBY: 145.100.185.15                           : Conn opened: TLS - Strict Profile
[13:31:37.082607] STUBBY: 145.100.185.15                           : Verify passed : TLS
[13:31:38.453486] STUBBY: 145.100.185.16                           : Conn opened: TLS - Strict Profile
[13:31:38.535119] STUBBY: 145.100.185.16                           : Verify passed : TLS
[13:31:39.822051] STUBBY: 185.49.141.37                            : Conn opened: TLS - Strict Profile
[13:31:39.899659] STUBBY: 185.49.141.37                            : Verify passed : TLS
[13:31:41.252671] STUBBY: 2001:610:1:40ba:145:100:185:15           : Conn opened: TLS - Strict Profile
[13:31:41.353786] STUBBY: 2001:610:1:40ba:145:100:185:15           : Verify passed : TLS
[13:31:42.645546] STUBBY: 2001:610:1:40ba:145:100:185:16           : Conn opened: TLS - Strict Profile
[13:31:42.737937] STUBBY: 2001:610:1:40ba:145:100:185:16           : Verify passed : TLS
[13:31:44.041735] STUBBY: 2a04:b900:0:100::38                      : Conn opened: TLS - Strict Profile
[13:31:44.124825] STUBBY: 2a04:b900:0:100::38                      : Verify passed : TLS
[13:31:44.350141] STUBBY: 2a04:b900:0:100::38                      : Conn closed: TLS - Resps=     1, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:31:44.350640] STUBBY: 2a04:b900:0:100::38                      : Upstream   : TLS - Resps=     1, Timeouts  =     0, Best_auth =Success
[13:31:44.351641] STUBBY: 2a04:b900:0:100::38                      : Upstream   : TLS - Conns=     1, Conn_fails=     0, Conn_shuts=      1, Backoffs     =     0
[13:31:47.135878] STUBBY: 145.100.185.15                           : Conn closed: TLS - Resps=     1, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:31:47.136306] STUBBY: 145.100.185.15                           : Upstream   : TLS - Resps=     1, Timeouts  =     0, Best_auth =Success
[13:31:47.137305] STUBBY: 145.100.185.15                           : Upstream   : TLS - Conns=     1, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0
[13:31:47.437755] STUBBY: 1.1.1.1                                  : Conn opened: TLS - Strict Profile
[13:31:47.510742] STUBBY: 1.1.1.1                                  : Verify failed : TLS - *Failure* -  (20) "unable to get local issuer certificate"
[13:31:47.511246] STUBBY: 1.1.1.1                                  : Conn closed: TLS - *Failure*
[13:31:47.511761] STUBBY: 145.100.185.15                           : Conn opened: TLS - Strict Profile
[13:31:47.512241] STUBBY: 1.1.1.1                                  : Conn closed: TLS - Resps=     0, Timeouts  =     0, Curr_auth = Failed, Keepalive(ms)=     0
[13:31:47.513245] STUBBY: 1.1.1.1                                  : Upstream   : TLS - Resps=     0, Timeouts  =     0, Best_auth = Failed
[13:31:47.513739] STUBBY: 1.1.1.1                                  : Upstream   : TLS - Conns=     0, Conn_fails=     1, Conn_shuts=      0, Backoffs     =     0
[13:31:48.577160] STUBBY: 145.100.185.16                           : Conn closed: TLS - Resps=     1, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:31:48.577611] STUBBY: 145.100.185.16                           : Upstream   : TLS - Resps=     1, Timeouts  =     0, Best_auth =Success
[13:31:48.579101] STUBBY: 145.100.185.16                           : Upstream   : TLS - Conns=     1, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0
[13:31:50.093550] STUBBY: 185.49.141.37                            : Conn closed: TLS - Resps=     1, Timeouts  =     0, Curr_auth =Success, Keepalive(ms)= 10000
[13:31:50.094022] STUBBY: 185.49.141.37                            : Upstream   : TLS - Resps=     1, Timeouts  =     0, Best_auth =Success
[13:31:50.095019] STUBBY: 185.49.141.37                            : Upstream   : TLS - Conns=     1, Conn_fails=     0, Conn_shuts=      0, Backoffs     =     0

SPKI-Pin config:

## Cloudflare 1.1.1.1 and 1.0.0.1
  - address_data: 1.1.1.1
    tls_pubkey_pinset:
      - digest: "sha256"
        value: yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc=

My certmgr DigiCert Root:
certmgr_store

@jankal
Copy link
Author

jankal commented Apr 5, 2018

I've not got openssl installed inside my Windows 10. I use the version from WSL.

jankal@ajank  /c/Users/alexa  openssl s_client -connect 1.1.1.1:853
CONNECTED(00000003)
depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA
verify return:1
depth=1 C = US, O = DigiCert Inc, CN = DigiCert ECC Secure Server CA
verify return:1
depth=0 C = US, ST = CA, L = San Francisco, O = "Cloudflare, Inc.", CN = *.cloudflare-dns.com
verify return:1
---
Certificate chain
 0 s:/C=US/ST=CA/L=San Francisco/O=Cloudflare, Inc./CN=*.cloudflare-dns.com
   i:/C=US/O=DigiCert Inc/CN=DigiCert ECC Secure Server CA
 1 s:/C=US/O=DigiCert Inc/CN=DigiCert ECC Secure Server CA
   i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Global Root CA
---
Server certificate
-----BEGIN CERTIFICATE-----
MIID9DCCA3qgAwIBAgIQBWzetBRl/ycHFsBukRYuGTAKBggqhkjOPQQDAjBMMQsw
CQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMSYwJAYDVQQDEx1EaWdp
Q2VydCBFQ0MgU2VjdXJlIFNlcnZlciBDQTAeFw0xODAzMzAwMDAwMDBaFw0yMDAz
MjUxMjAwMDBaMGwxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMN
U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQQ2xvdWRmbGFyZSwgSW5jLjEdMBsGA1UE
AwwUKi5jbG91ZGZsYXJlLWRucy5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC
AASyRQsxrFBjziHmfDQjGsXBU0WWl3oxh7vg6h2V9f8lBMp18PY/td9R6VvJPa20
AwVzIJI+dL6OSxviaIZEbmK7o4ICHDCCAhgwHwYDVR0jBBgwFoAUo53mH/naOU/A
buiRy5Wl2jHiCp8wHQYDVR0OBBYEFN+XTeVDs7BBp0LykM+Jf64SV4ThMGMGA1Ud
EQRcMFqCFCouY2xvdWRmbGFyZS1kbnMuY29thwQBAQEBhwQBAAABghJjbG91ZGZs
YXJlLWRucy5jb22HECYGRwBHAAAAAAAAAAAAERGHECYGRwBHAAAAAAAAAAAAEAEw
DgYDVR0PAQH/BAQDAgeAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBp
BgNVHR8EYjBgMC6gLKAqhihodHRwOi8vY3JsMy5kaWdpY2VydC5jb20vc3NjYS1l
Y2MtZzEuY3JsMC6gLKAqhihodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vc3NjYS1l
Y2MtZzEuY3JsMEwGA1UdIARFMEMwNwYJYIZIAYb9bAEBMCowKAYIKwYBBQUHAgEW
HGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwCAYGZ4EMAQICMHsGCCsGAQUF
BwEBBG8wbTAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEUG
CCsGAQUFBzAChjlodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRF
Q0NTZWN1cmVTZXJ2ZXJDQS5jcnQwDAYDVR0TAQH/BAIwADAKBggqhkjOPQQDAgNo
ADBlAjEAjoyy2Ogh1i1/Kh9+psMc1OChlQIvQF6AkojZS8yliar6m8q5nqC3qe0h
HR0fExwLAjAueWRnHX4QJ9loqMhsPk3NB0Cs0mStsNDNG6/DpCYw7XmjoG3y1LS7
ZkZZmqNn2Q8=
-----END CERTIFICATE-----
subject=/C=US/ST=CA/L=San Francisco/O=Cloudflare, Inc./CN=*.cloudflare-dns.com
issuer=/C=US/O=DigiCert Inc/CN=DigiCert ECC Secure Server CA
---
No client certificate CA names sent
Peer signing digest: SHA512
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 2255 bytes and written 269 bytes
Verification: OK
---
New, TLSv1.2, Cipher is ECDHE-ECDSA-AES256-GCM-SHA384
Server public key is 256 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-ECDSA-AES256-GCM-SHA384
    Session-ID: AC7DF7BC5D4FEAA612052088E98CB0FC176FEFD82CD1D8B8840B6563BDDF88B1
    Session-ID-ctx:
    Master-Key: 630B327B2DDE936E876F561F46B748B1E730E04D80AD984F7A767BCBF814A1E57399071D10C5CFBE7F399277535FC710
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1522935291
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
    Extended master secret: yes
---
closed

@jankal
Copy link
Author

jankal commented Apr 5, 2018

I just installed a compiled openssl for Windows (OpenSSL-Win64) and performed the test again:

C:\OpenSSL-Win64\bin>openssl.exe s_client -connect 1.1.1.1:853
CONNECTED(00000150)
depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA
verify return:1
depth=1 C = US, O = DigiCert Inc, CN = DigiCert ECC Secure Server CA
verify return:1
depth=0 C = US, ST = CA, L = San Francisco, O = "Cloudflare, Inc.", CN = *.cloudflare-dns.com
verify return:1
---
Certificate chain
 0 s:/C=US/ST=CA/L=San Francisco/O=Cloudflare, Inc./CN=*.cloudflare-dns.com
   i:/C=US/O=DigiCert Inc/CN=DigiCert ECC Secure Server CA
 1 s:/C=US/O=DigiCert Inc/CN=DigiCert ECC Secure Server CA
   i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Global Root CA
---
Server certificate
-----BEGIN CERTIFICATE-----
MIID9DCCA3qgAwIBAgIQBWzetBRl/ycHFsBukRYuGTAKBggqhkjOPQQDAjBMMQsw
CQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMSYwJAYDVQQDEx1EaWdp
Q2VydCBFQ0MgU2VjdXJlIFNlcnZlciBDQTAeFw0xODAzMzAwMDAwMDBaFw0yMDAz
MjUxMjAwMDBaMGwxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMN
U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQQ2xvdWRmbGFyZSwgSW5jLjEdMBsGA1UE
AwwUKi5jbG91ZGZsYXJlLWRucy5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC
AASyRQsxrFBjziHmfDQjGsXBU0WWl3oxh7vg6h2V9f8lBMp18PY/td9R6VvJPa20
AwVzIJI+dL6OSxviaIZEbmK7o4ICHDCCAhgwHwYDVR0jBBgwFoAUo53mH/naOU/A
buiRy5Wl2jHiCp8wHQYDVR0OBBYEFN+XTeVDs7BBp0LykM+Jf64SV4ThMGMGA1Ud
EQRcMFqCFCouY2xvdWRmbGFyZS1kbnMuY29thwQBAQEBhwQBAAABghJjbG91ZGZs
YXJlLWRucy5jb22HECYGRwBHAAAAAAAAAAAAERGHECYGRwBHAAAAAAAAAAAAEAEw
DgYDVR0PAQH/BAQDAgeAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBp
BgNVHR8EYjBgMC6gLKAqhihodHRwOi8vY3JsMy5kaWdpY2VydC5jb20vc3NjYS1l
Y2MtZzEuY3JsMC6gLKAqhihodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vc3NjYS1l
Y2MtZzEuY3JsMEwGA1UdIARFMEMwNwYJYIZIAYb9bAEBMCowKAYIKwYBBQUHAgEW
HGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwCAYGZ4EMAQICMHsGCCsGAQUF
BwEBBG8wbTAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEUG
CCsGAQUFBzAChjlodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRF
Q0NTZWN1cmVTZXJ2ZXJDQS5jcnQwDAYDVR0TAQH/BAIwADAKBggqhkjOPQQDAgNo
ADBlAjEAjoyy2Ogh1i1/Kh9+psMc1OChlQIvQF6AkojZS8yliar6m8q5nqC3qe0h
HR0fExwLAjAueWRnHX4QJ9loqMhsPk3NB0Cs0mStsNDNG6/DpCYw7XmjoG3y1LS7
ZkZZmqNn2Q8=
-----END CERTIFICATE-----
subject=/C=US/ST=CA/L=San Francisco/O=Cloudflare, Inc./CN=*.cloudflare-dns.com
issuer=/C=US/O=DigiCert Inc/CN=DigiCert ECC Secure Server CA
---
No client certificate CA names sent
Peer signing digest: SHA512
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 2254 bytes and written 269 bytes
Verification: OK
---
New, TLSv1.2, Cipher is ECDHE-ECDSA-AES256-GCM-SHA384
Server public key is 256 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-ECDSA-AES256-GCM-SHA384
    Session-ID: 74C35DDB935986345091C9D81B3EDE6DEE3E1EB648C5916F9B0AFCADD7F89BEF
    Session-ID-ctx:
    Master-Key: 6D94634F7F6EB2A6C67D4A0BB4BC14B18A8C96422DBAD98DA86207287683F6B1AF649F1A5FE7E276ECC540CA96C81578
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1522936287
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
    Extended master secret: yes
---
closed

C:\OpenSSL-Win64\bin>openssl.exe version
OpenSSL 1.1.0f  25 May 2017

OpenSSL seems to be able to verify the CA certificate here, too.

@saradickinson
Copy link
Contributor

saradickinson commented Apr 5, 2018

Hi All, Thanks so much for the testing and feedback and sorry for this ongoing problem. It looks like you all have the right certs in your store and are getting the right cert in the handshake so it is still not obvious why only Cloudflare is failing to authenticate on your systems. I've attached a zipped version of getdns_query.exe which has some additional debugging messages enabled. If you are able to test with this using these commands it might help:

getdns_query.exe -s -L -m -y 7 @1.1.1.1~cloudflare-dns.com example.com +return_call_reporting
getdns_query.exe -s -L -m -y 7 @1.1.1.1 -K 'pin-sha256="yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc="'example.com +return_call_reporting
getdns_query.exe -s -L -y 7 @1.1.1.1 -K 'pin-sha256="yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc="' example.com +return_call_reporting

Many thanks!
getdns_query.zip

@sergeevabc
Copy link

sergeevabc commented Apr 5, 2018

$ getdns_query -s -L -m @1.1.1.1~cloudflare-dns.com example.com
$ getdns_query -s -L -m @1.1.1.1 'pin-sha256="yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc="' example.com

outputs

--- SETUP(TLS):  add_WIN_cacerts_to_openssl_store   : Adding Windows certificates to CA store
--- SETUP(TLS):  add_WIN_cacerts_to_openssl_store   : Error adding certificate 0:error:0B07C065:x509 certificate routines:X509_STORE_add_cert:cert already in hash table
An error occurred: 301 'The context has internal deficiencies'

while

$ getdns_query -s -L @1.1.1.1 'pin-sha256="yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc="' example.com

outputs
https://privatebin.net/?50d6593352cbcc7c#2g3KKUrpjIViVLobi0PW1QBEgVRdVYHkdi5q3d+V5Lo=

@jankal
Copy link
Author

jankal commented Apr 5, 2018

@saradickinson This is what I get:

>getdns_query.exe -s -L -m @1.1.1.1~cloudflare-dns.com example.com
[14:42:44.682878] --- SETUP(TLS):  add_WIN_cacerts_to_openssl_store   : Adding Windows certificates to CA store
[14:42:44.693879] --- SETUP(TLS):  add_WIN_cacerts_to_openssl_store   : Error adding certificate 0:error:0B07C065:x509 certificate routines:X509_STORE_add_cert:cert already in hash table
An error occurred: 301 'The context has internal deficiencies'

>getdns_query.exe -s -L -m @1.1.1.1 'pin-sha256="yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc="' example.com
[14:42:53.850840] --- SETUP(TLS):  add_WIN_cacerts_to_openssl_store   : Adding Windows certificates to CA store
[14:42:53.862843] --- SETUP(TLS):  add_WIN_cacerts_to_openssl_store   : Error adding certificate 0:error:0B07C065:x509 certificate routines:X509_STORE_add_cert:cert already in hash table
An error occurred: 301 'The context has internal deficiencies'

>getdns_query.exe -s -L @1.1.1.1 'pin-sha256="yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc="' example.com
[14:43:06.535639] --- SETUP(TLS):  add_WIN_cacerts_to_openssl_store   : Adding Windows certificates to CA store
[14:43:06.547135] --- SETUP(TLS):  add_WIN_cacerts_to_openssl_store   : Error adding certificate 0:error:0B07C065:x509 certificate routines:X509_STORE_add_cert:cert already in hash table
[14:43:06.559799] --- SETUP(TLS):  _getdns_context_prepare_for_resolution: DEBUG: SSL_CTX_dane_enable() -> 1
[14:43:06.566800] => ENTRY:        _getdns_submit_stub_request        : MSG: 00000000029F50E0 TYPE: 2
[14:43:06.566800] --- SETUP:       upstream_select_stateful           : Testing upstreams  0 0 for transport 1202
[14:43:06.566800] --- SETUP:       upstream_select_stateful           : Testing upstreams  1 0 for transport 1202
[14:43:06.566800] --- SETUP:       upstream_connect                   : Getting upstream connection:  00000000029F9210
[14:43:06.566800] --- SETUP:       tcp_connect                        : Creating TCP connection:      00000000029F9210
[14:43:06.567799] --- SETUP(TLS):  tls_create_object                  : Proceeding even though no hostname provided!
[14:43:06.568803] --- SETUP(TLS):  tls_create_object                  : WARNING: Using Oppotunistic TLS (fallback allowed)!
[14:43:06.568803] --- SETUP(TLS):  tls_create_object                  : DEBUG: SSL_dane_enable("") -> 1
[14:43:06.568803] --- SETUP:       upstream_find_for_transport        : FD:  708 Connecting to upstream: 00000000029F9210   No: 1
[14:43:06.568803] ----- SCHEDULE:  upstream_find_for_netreq           : MSG: 00000000029F50E0 found upstream 00000000029F9210 with transport 1202, fd: 708
[14:43:06.568803] ----- SCHEDULE:  upstream_schedule_netreq           : MSG: 00000000029F50E0 (schedule event)
[14:43:06.586868] ------- WRITE:   upstream_write_cb                  : MSG: 00000000029F50E0 (writing)
[14:43:06.587801] --- SETUP(TLS):  tls_do_handshake                   : FD:  708
[14:43:06.604867] ------- READ:    upstream_read_cb                   : FD:  708
[14:43:06.605804] --- SETUP(TLS):  tls_do_handshake                   : FD:  708
[14:43:06.605804] ------- READ:    upstream_read_cb                   : FD:  708
[14:43:06.606800] --- SETUP(TLS):  tls_do_handshake                   : FD:  708
[14:43:06.606800] DEBUG Cert verify: depth=1 verify=0 err=20 subject=/C=US/O=DigiCert Inc/CN=DigiCert ECC Secure Server CA errorstr=unable to get local issuer certificate
[14:43:06.608799] DEBUG Cert verify: depth=0 verify=1 err=20 subject=/C=US/ST=CA/L=San Francisco/O=Cloudflare, Inc./CN=*.cloudflare-dns.com errorstr=unable to get local issuer certificate
[14:43:06.626870] ------- READ:    upstream_read_cb                   : FD:  708
[14:43:06.626870] --- SETUP(TLS):  tls_do_handshake                   : FD:  708
[14:43:06.627805] --- SETUP(TLS):  tls_do_handshake                   : FD:  708 Handshake succeeded with auth state None. Session is new.
[14:43:06.627805] ------- WRITE:   upstream_write_cb                  : MSG: 00000000029F50E0 (writing)
[14:43:06.645882] ------- READ:    upstream_read_cb                   : FD:  708
[14:43:06.646380] ------- READ:    upstream_read_cb                   : MSG: 00000000029F50E0 (read)
[14:43:06.646882] --- CLEANUP:     stub_cleanup                       : MSG: 00000000029F50E0
[14:43:06.647349] ----- SCHEDULE:  upstream_reschedule_events         : FD:  708
[14:43:06.647860] ----- SCHEDULE:  upstream_reschedule_events         : FD:  708 Connection idle - timeout is 0
[14:43:06.647860] --- CLEANUP:     upstream_idle_timeout_cb           : FD:  708 Closing connection
{
  "answer_type": GETDNS_NAMETYPE_DNS,
  "canonical_name": <bindata for example.com.>,
  "replies_full":
  [
     <bindata of 0xa5448180000100020000000107657861...>
  ],
  "replies_tree":
  [
    {
      "additional":
      [
        {
          "do": 0,
          "extended_rcode": 0,
          "rdata":
          {
            "options":
            [
              {
                "option_code": 12,
                "option_data": <bindata of 0x00000000000000000000000000000000...>
              }
            ],
            "rdata_raw": <bindata of 0x000c0178000000000000000000000000...>
          },
          "type": GETDNS_RRTYPE_OPT,
          "udp_payload_size": 1536,
          "version": 0,
          "z": 0
        }
      ],
      "answer":
      [
        {
          "class": GETDNS_RRCLASS_IN,
          "name": <bindata for example.com.>,
          "rdata":
          {
            "nsdname": <bindata for a.iana-servers.net.>,
            "rdata_raw": <bindata for a.iana-servers.net.>
          },
          "ttl": 3405,
          "type": GETDNS_RRTYPE_NS
        },
        {
          "class": GETDNS_RRCLASS_IN,
          "name": <bindata for example.com.>,
          "rdata":
          {
            "nsdname": <bindata for b.iana-servers.net.>,
            "rdata_raw": <bindata of 0x0162c02b>
          },
          "ttl": 3405,
          "type": GETDNS_RRTYPE_NS
        }
      ],
      "answer_type": GETDNS_NAMETYPE_DNS,
      "authority": [],
      "canonical_name": <bindata for example.com.>,
      "header":
      {
        "aa": 0,
        "ad": 0,
        "ancount": 2,
        "arcount": 1,
        "cd": 0,
        "id": 42308,
        "nscount": 0,
        "opcode": GETDNS_OPCODE_QUERY,
        "qdcount": 1,
        "qr": 1,
        "ra": 1,
        "rcode": GETDNS_RCODE_NOERROR,
        "rd": 1,
        "tc": 0,
        "z": 0
      },
      "question":
      {
        "qclass": GETDNS_RRCLASS_IN,
        "qname": <bindata for example.com.>,
        "qtype": GETDNS_RRTYPE_NS
      }
    }
  ],
  "status": GETDNS_RESPSTATUS_GOOD
}

@wtoorop
Copy link
Contributor

wtoorop commented Apr 5, 2018

We need -K before pin spec, and -y 7 and +return_call_reporting would be nice to have's too.
So the set of calls to getdns_query.exe would be:

getdns_query.exe -s -L -m @1.1.1.1~cloudflare-dns.com example.com -y 7
getdns_query.exe -s -L -m @1.1.1.1 -y 7 -K 'pin-sha256="yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc="'example.com
getdns_query.exe -s -L @1.1.1.1 -y 7 -K 'pin-sha256="yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc="' example.com
getdns_query.exe -s -L @1.1.1.1~cloudflare-dns.com -y 7 -K 'pin-sha256="yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc="' example.com

@jankal
Copy link
Author

jankal commented Apr 5, 2018

@wtoorop This only leaves me with errors:

>getdns_query.exe -s -L -m @1.1.1.1~cloudflare-dns.com example.com -y 7
[15:08:46.124224] --- SETUP(TLS):  add_WIN_cacerts_to_openssl_store   : Adding Windows certificates to CA store
[15:08:46.136201] --- SETUP(TLS):  add_WIN_cacerts_to_openssl_store   : Error adding certificate 0:error:0B07C065:x509 certificate routines:X509_STORE_add_cert:cert already in hash table
An error occurred: 301 'The context has internal deficiencies'

>getdns_query.exe -s -L -m @1.1.1.1 -y 7 -K 'pin-sha256="yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc="'example.com
could not convert ''pin-sha256=yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='example.com' into a public key pin.
Good pins look like: pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g="
Please see RFC 7469 for details about the format

>getdns_query.exe -s -L @1.1.1.1 -y 7 -K 'pin-sha256="yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc="' example.com
could not convert ''pin-sha256=yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='' into a public key pin.
Good pins look like: pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g="
Please see RFC 7469 for details about the format

>getdns_query.exe -s -L @1.1.1.1~cloudflare-dns.com -y 7 -K 'pin-sha256="yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc="' example.com
could not convert ''pin-sha256=yioEpqeR4WtDwE9YxNVnCEkTxIjx6EEIwFSQW+lJsbc='' into a public key pin.
Good pins look like: pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g="
Please see RFC 7469 for details about the format

@saradickinson
Copy link
Contributor

Thanks All again for the debugging! I've fixed the error condition shown in the traces above and here is a new version of getdns_query.exe for testing. If this fixes the problem for you all I will produce new packages.
getdns_query.zip

@jankal
Copy link
Author

jankal commented Apr 5, 2018

@saradickinson Just dropped the new version of getdns_query in my Stubby folder.

The problem is still there (even just with the tls_pubkey_pinset).

@sergeevabc
Copy link

I see the same as @jankal.

@saradickinson
Copy link
Contributor

OK, try this please:
getdns_query.zip

@sergeevabc
Copy link

sergeevabc commented Apr 5, 2018

@saradickinson, it seems to be working now, but you be the judge.

getdns_query.exe -s -L -m @1.1.1.1~cloudflare-dns.com example.com -y 7
https://privatebin.net/?118e2aad3e6e17e3#/dXwKTRiVp/4kokLuTh78x6XQPJG5qwxJce1n0y2yK0=

@saradickinson
Copy link
Contributor

@sergeevabc Thanks - that looks good to me.

@sergeevabc
Copy link

@saradickinson, so what was the problem after all?

@saradickinson
Copy link
Contributor

When Stubby built the local certificate store it hit an error condition if there was a duplicate certificate in the root cert store and stopped processing. The fix is to ignore duplicate certs.

@saradickinson
Copy link
Contributor

I've created a 0.0.4 installer with a custom fix for this issue - please see if this works. I've also opened getdnsapi/getdns#392 to implement a review of this code and a fix for the CA path/file issue for the next release.

saradickinson added a commit to saradickinson/getdns that referenced this issue Apr 5, 2018
@sergeevabc
Copy link

sergeevabc commented Apr 5, 2018

@saradickinson, verified, issue is fixed on my end.

P.S. I wonder why don’t you output Stubby’s version at once and require -V switch. Also I would stick to case-insensitive switches and stay away from capitalized ones like -C as long as possible. Also I don’t understand why stubby.exe does not use stubby.yml from the same folder (WARNING: No Stubby config file found… ) and we have to specify stubby.exe -C stubby.yml every time.

@rwfeldmann
Copy link

Perhaps I've missed something, but after downloading the latest installer and the getdns_query.zip from earlier today 1.1.1.1 still isn't working for me?

@sergeevabc
Copy link

@rwfeldmann, indeed, you’ve missed something, i.e. to provide the output of the following command:
getdns_query.exe -s -L -m @1.1.1.1~cloudflare-dns.com example.com -y 7

@rwfeldmann
Copy link

@saradickinson
Copy link
Contributor

@rwfeldmann Thanks for the logs. I looks to me that the version of getdns_query.exe you have is the latest and is working just fine which means that the very latest installer (0.0.4) should also work for you. From the log I believe you still have the 0.0.3 version of Stubby installed - can you re-install the latest version and test Stubby again please?

@rwfeldmann
Copy link

Success. I thought I'd downloaded the latest before I posted, but it's possible I overlooked it. It's working great. Thanks!

@saradickinson
Copy link
Contributor

Closing as resolved.

wtoorop added a commit to getdnsapi/getdns that referenced this issue May 11, 2018
wtoorop added a commit to getdnsapi/getdns that referenced this issue May 11, 2018
wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this issue Jan 28, 2019
Package changes:
 * PLIST adjustment; stubby no longer built by default

Upstream changes:
* 2018-12-21: Version 1.5.0
  * RFE getdnsapi/stubby#121 log re-instantiating TLS
    upstreams (because they reached tls_backoff_time) at
    log level 4 (WARNING)
  * GETDNS_RESPSTATUS_NO_NAME for NODATA answers too
  * ZONEMD rr-type
  * getdns_query queries for addresses when a query name
    without a type is given.
  * RFE #408: Fetching of trust anchors will be retried
    after failure, after a certain backoff time. The time
    can be configured with
    getdns_context_set_trust_anchors_backoff_time().
  * RFE #408: A "dnssec" extension that requires DNSSEC
    verification.  When this extension is set, Indeterminate
    DNSSEC status will not be returned.
  * Issue #410: Unspecified ownership of get_api_information()
  * Fix for DNSSEC bug in finding most specific key when
    trust anchor proves non-existance of one of the labels
    along the authentication chain other than the non-
    existance of a DS record on a zonecut.
  * Enhancement getdnsapi/stubby#56 & getdnsapi/stubby#130:
    Configurable minimum and maximum TLS versions with
    getdns_context_set_tls_min_version() and
    getdns_context_set_tls_max_version() functions and
    tls_min_version and tls_max_version configuration parameters
    for upstreams.
  * Configurable TLS1.3 ciphersuites with the
    getdns_context_set_tls_ciphersuites() function and
    tls_ciphersuites config parameter for upstreams.
  * Bugfix in upstream string configurations: tls_cipher_list and
    tls_curve_list
  * Bugfix finding signer for validating NSEC and NSEC3s, which
    caused trouble with the partly tracing DNSSEC from the root
    up, introduced in 1.4.2.  Thanks Philip Homburg

* 2018-05-11: Version 1.4.2
  * Bugfix getdnsapi/stubby#87: Detect and ignore duplicate certs
    in the Windows root CA store.
  * PR #397: No TCP sendto without TCP_FASTOPEN
    Thanks Emery Hemingway
  * Bugfix getdnsapi/stubby#106: Core dump when printing certain
    configuration. Thanks Han Vinke
  * Bugfix getdnsapi/stubby#99: Partly trace DNSSEC from the root
    up (for tld and sld), to find insecure delegations quicker.
    Thanks UniverseXXX
  * Bugfix: Allow NSEC spans starting from (unexpanded) wildcards
    Bug was introduced when dealing with CVE-2017-15105
  * Bugfix getdnsapi/stubby#46: Don't assume trailing zero with
    string bindata's.  Thanks Lonnie Abelbeck
  * Bugfix #394: Update src/compat/getentropy_linux.c in order to
    handle ENOSYS (not implemented) fallback.
    Thanks Brent Blood
  * Bugfix #395: Clarify that libidn2 dependency is for version 2.0.0
    or higher. Thanks mire3212

* 2018-03-12: Version 1.4.1
  * Bugfix #388: Prevent fallback to an earlier tries upstream within a
    single query.  Thanks Robert Groenenberg
  * PR #387: Compile with OpenSSL with deprecated APIs disabled.
    Thanks Rosen Penev
  * PR #386: UDP failover improvements:
    - When all UDP upstreams fail, retry them (more or less) equally
    - Limit maximum UDP backoff (default to 1000)
      This is configurable with the --with-max-udp-backoff configure
      option.
    Thanks Robert Groenenberg
  * Bugfix: Find zonecut with DS queries (instead of SOA queries).
    Thanks Elmer Lastdrager
  * Bugfix #385: Verifying insecure NODATA answers (broken since 1.2.1).
    Thanks hanvinke
  * PR #384: Fix minor spelling and formatting.  Thanks dkg.
  * Bugfix #382: Parallel install of getdns_query and getdns_server_mon

* 2018-02-21: Version 1.4.0
  * .so revision bump to please fedora packaging system.
    Thanks Paul Wouters
  * Specify the supported curves with getdns_context_set_tls_curves_list()
    An upstream specific list of supported curves may also be given
    with the tls_curves_list setting in the upstream dict with
    getdns_context_set_upstream_recursive_servers()
  * New tool getdns_server_mon for checking upstream recursive
    resolver's capabilities.
  * Improved handling of opportunistic back-off.  If other transports
    are working, don't forcibly promote failed upstreams just wait for
    the re-try timer.
  * Hostname authentication with libressl
    Thanks Norbert Copones
  * Security bugfix in response to CVE-2017-15105.  Although getdns was
    not vulnerable for this specific issue, as a precaution code has been
    adapted so that signatures of DNSKEYs, DSs, NSECs and NSEC3s can not
    be wildcard expansions when used with DNSSEC proofs.  Only direct
    queries for those types are allowed to be wildcard expansions.
  * Bugfix PR#379: Miscelleneous double free or corruption, and corrupted
    memory double linked list detected issue, with serving functionality.
    Thanks maddie and Bruno Pagani
  * Security Bugfix PR#293: Check sha256 pinset's
    with OpenSSL native DANE functions for OpenSSL >= 1.1.0
    with Viktor Dukhovni's danessl library for OpenSSL >= 1.0.0
    don't allow for authentication exceptions (like self-signed
    certificates) otherwise.  Thanks Viktor Dukhovni
  * libidn2 support.  Thanks Paul Wouters

* 2017-12-21: Version 1.3.0
  * Bugfix #300: Detect dnsmasq and skip unit test that fails with it.
    Thanks Tim Rohsen and Konomi Kitten
  * Specify default available cipher suites for authenticated TLS
    upstreams with getdns_context_set_tls_ciphers_list()
    An upstream specific available cipher suite may also be given
    with the tls_cipher_list setting in the upstream dict with
    getdns_context_set_upstream_recursive_servers()
  * PR #366: Add support for TLS 1.3 and Chacha20-Poly1305
    Thanks Pascal Ernster
  * Bugfix #356: Do Zero configuration DNSSEC meta queries over on the
    context configured upstreams.  Thanks Andreas Schulze
  * Report default extension settings with
    getdns_context_get_api_information()
  * Specify locations at which CA certificates for verification purposes
    are located: getdns_context_set_tls_ca_path()
    getdns_context_set_tls_ca_file()
  * getdns_context_set_resolvconf() function to initialize a context
    upstreams and suffices with a resolv.conf file.
    getdns_context_get_resolvconf() to get the file used to initialize
    the context's upstreams and suffixes.
    getdns_context_set_hosts() function to initialize a context's
    LOCALNAMES namespace.
    getdns_context_get_hosts() function to get the file used to initialize
    the context's LOCALNAMES namespace.
  * get which version of OpenSSL was used at build time and at run time
    when available with getdns_context_get_api_information()
  * GETDNS_RETURN_IO_ERROR return error code
  * Bugfix #359: edns_client_subnet_private should set family
    Thanks Daniel Areiza & Andreas Schulze
  * Bugfix getdnsapi/stubby#34: Segfault issue with native DNSSEC
    validation.  Thanks Bruno Pagani

* 2017-11-11: Version 1.2.1
  * Handle more I/O error cases.  Also, when an I/O error does occur,
    never stop listening (with servers), and
    never exit (when running the built-in event loop).
  * Bugfix: Tolerate unsigned and unused RRsets in the authority section.
            Fixes DNSSEC with BIND upstream.
  * Bugfix: DNSSEC validation without support records
  * Bugfix: Validation of full recursive DNSKEY lookups
  * Bugfix: Retry to validate full recursion BOGUS replies with zero
    configuration DNSSEC only when DNSSEC was actually requested
  * Bugfix #348: Fix a linking issue in stubby when libbsd is present
    Thanks Remi Gacogne
  * More robust scheduling; Eliminating a segfault with long running
    applications.
  * Miscellaneous Windows portability fixes from Jim Hague.
  * Fix Makefile dependencies for parallel install.
    Thanks ilovezfs

* 2017-09-29: Version 1.2.0
  * Bugfix of rc1: authentication of first query with TLS
    Thanks Travis Burtrum
  * A function to set the location for library specific data,
    like trust-anchors: getdns_context_set_appdata().
  * Zero configuration DNSSEC - build upon the scheme
    described in RFC7958.  The URL from which to fetch
    the trust anchor, the verification CA and email
    can be set with the new getdns_context_set_trust_anchor_url(),
    getdns_context_set_trust_anchor_verify_CA() and
    getdns_context_set_trust_anchor_verify_email() functions.
    The default values are to fetch from IANA and to validate
    with the ICANN CA.
  * Update of Stubby with yaml configuration file and
    logging from a certain severity support.
  * Fix tpkg exit status on test failure. Thanks Jim Hague.
  * Refined logging levels for upstream statistics
  * Reuse (best behaving) backed-off TLS upstreams when non are usable.
  * Let TLS upstreams back-off a incremental amount of time.
    Back-off time starts with 1 second and is doubled each failure, but
    will not exceed the time given by getdns_context_set_tls_backoff_time()
  * Make TLS upstream management more resilient to temporary outages
    (like laptop sleeps)

* 2017-09-04: Version 1.1.3
  * Small bugfixes that came out of static analysis
  * No annotations with the output of getdns_query anymore,
    unless -V option is given to increase verbosity
    Thanks Ollivier Robert
  * getdns_query will now exit with failure status if replies are BOGUS
  * Bugfix: dnssec_return_validation_chain now also works when fallback
    to full recursion was needed with dnssec_roadblock_avoidance
  * More clear build instructions from Paul Hoffman.  Thanks.
  * Bugfix #320.1: Eliminate multiple closing of file descriptors
    Thanks Neil Cook
  * Bugfix #320.2: Array bounds bug in upstream_select
    Thanks Neil Cook
  * Bugfix #318: getdnsapi/getdns/README.md links to nonexistent wiki
    pages.  Thanks James Raftery
  * Bugfix #322: MacOS 10.10 (Yosemite) provides TCP fastopen interface
    but does not have it implemented.  Thanks Joel Purra
  * Compile without Stubby by default.  Stubby now has a git repository
    of its own.  The new Stubby repository is added as a submodule.
    Stubby will still be build alongside getdns with the --with-stubby
    configure option.

* 2017-07-03: Version 1.1.2
  * Bugfix for parallel make install
  * Bugfix to trigger event callbacks on socket errors
  * A getdns_context_set_logfunc() function with which one may
    register a callback log function for certain library subsystems
    at certain levels.  Currently this can only be used for
    upstream stastistics subsystem.

* 2017-06-15: Version 1.1.1
  * Bugfix #306 hanging/segfaulting on certain (IPv6) upstream failures
  * Spelling fix s/receive/receive.  Thanks Andreas Schulze.
  * Added stubby-setdns-macos.sh script to support Homebrew formula
  * Include stubby.conf in the districution tarball
  * Bugfix #286 reschedule reused listening addresses
  * Bugfix #166 Allow parallel builds and unit-tests
  * NSAP-PTR, EID and NIMLOC, TALINK, AVC support
  * Bugfix of TA RR type
  * OPENPGPKEY and SMIMEA support
  * Bugfix TAG rdata type presentation format for CAA RR type
  * Bugfix Zero sized gateways with IPSECKEY gateway_type 0
  * Guidance for integration with systemd
  * Also check for memory leaks with advances server capabilities.
  * Bugfix convert IP string to IP dict with getdns_str2dict() directly.

ok'ed by root@zta.lk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants