Add preferred-chain option to support "alternate" certificate links (#1227)
Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>
This commit is contained in:
parent
dd38dce6aa
commit
30e4987f99
9 changed files with 281 additions and 62 deletions
|
@ -41,6 +41,10 @@ func TestOrderService_New(t *testing.T) {
|
|||
return
|
||||
}
|
||||
|
||||
w.Header().Add("Link", `<https://example.com/acme/cert/1>;rel="alternate"`)
|
||||
w.Header().Add("Link", `<https://example.com/acme/cert/2>;title="foo";rel="alternate"`)
|
||||
w.Header().Add("Link", `<https://example.com/acme/cert/3>;title="foo";rel="alternate", <https://example.com/acme/cert/4>;rel="alternate"`)
|
||||
|
||||
err = tester.WriteJSONResponse(w, acme.Order{
|
||||
Status: acme.StatusValid,
|
||||
Identifiers: order.Identifiers,
|
||||
|
@ -62,6 +66,12 @@ func TestOrderService_New(t *testing.T) {
|
|||
Status: "valid",
|
||||
Identifiers: []acme.Identifier{{Type: "dns", Value: "example.com"}},
|
||||
},
|
||||
AlternateChainLinks: []string{
|
||||
"https://example.com/acme/cert/1",
|
||||
"https://example.com/acme/cert/2",
|
||||
"https://example.com/acme/cert/3",
|
||||
"https://example.com/acme/cert/4",
|
||||
},
|
||||
}
|
||||
assert.Equal(t, expected, order)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue