From 45810c9ff3cd69f1394d6c66c473ce033b71ea8b Mon Sep 17 00:00:00 2001 From: Tinnus Napbus Date: Mon, 23 Jan 2023 21:48:08 +1300 Subject: [PATCH] acme: handle https redirect in self-check also: libdns handle 301 redirect during self-check --- pkg/arvo/app/acme.hoon | 10 +++++----- pkg/arvo/lib/dns.hoon | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/arvo/app/acme.hoon b/pkg/arvo/app/acme.hoon index cd2a2a09b..c92b46b8a 100644 --- a/pkg/arvo/app/acme.hoon +++ b/pkg/arvo/app/acme.hoon @@ -584,10 +584,11 @@ ~| [%no-next-domain idx=idx] (head (skim pending |=([turf idx=@ud ?] =(idx ^idx)))) :: XX should confirm that :turf points to us - :: confirms that domain exists (and an urbit is on :80) + :: confirms that domain exists :: + =/ sec=? p:.^(hart:eyre %e /(scot %p our.bow)/host/(scot %da now.bow)) =/ =purl - :- [sec=| por=~ host=[%& turf.next]] + :- [sec=sec por=~ host=[%& turf.next]] [[ext=~ path=/'~debug'] query=~] =/ =wire (acme-wire try %validate-domain /idx/(scot %ud idx.next)) @@ -754,9 +755,8 @@ ?> ?=(%wake sas.u.rod) =* aut u.active.aut.u.rod =/ pat=path /'.well-known'/acme-challenge/[tok.cal.aut] - :: note: requires port 80, just as the ACME service will - :: - =/ url=purl [[sec=| por=~ hos=[%& dom.aut]] [ext=~ pat] hed=~] + =/ sec=? p:.^(hart:eyre %e /(scot %p our.bow)/host/(scot %da now.bow)) + =/ url=purl [[sec=sec por=~ hos=[%& dom.aut]] [ext=~ pat] hed=~] :: =/ url=purl [[sec=| por=`8.081 hos=[%& /localhost]] [ext=~ pat] hed=~] :: XX idx in wire? :: diff --git a/pkg/arvo/lib/dns.hoon b/pkg/arvo/lib/dns.hoon index cbad20271..f2891ca39 100644 --- a/pkg/arvo/lib/dns.hoon +++ b/pkg/arvo/lib/dns.hoon @@ -36,7 +36,7 @@ ;< ~ bind:m (backoff:strandio try ~h1) ;< rep=(unit httr:eyre) bind:m (hiss-request:strandio hiss) ?: ?& ?=(^ rep) - |(=(200 p.u.rep) =(307 p.u.rep)) + |(=(200 p.u.rep) =(307 p.u.rep) =(301 p.u.rep)) == (pure:m &) ?. ?| ?=(~ rep)