Skip to content

Commit 11b253e

Browse files
committed
MINOR: acme: only accept lowercased challenge names
To comply with RFC and IANA specifications. Discussed in haproxy/haproxy#1864
1 parent 4870562 commit 11b253e

7 files changed

Lines changed: 18 additions & 16 deletions

File tree

.aspell.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ allowed:
8181
- http
8282
- https
8383
- httpCLF
84+
- iana
8485
- ineffassign
8586
- infos
8687
- ioutil
@@ -97,6 +98,7 @@ allowed:
9798
- lifecycle
9899
- linter
99100
- linters
101+
- lowercased
100102
- lookups
101103
- lts
102104
- makefile

models/acme_provider.go

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/build/haproxy_spec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11854,10 +11854,10 @@ definitions:
1185411854
x-nullable: true
1185511855
x-omitempty: true
1185611856
challenge:
11857-
description: ACME challenge type. Only HTTP-01 and DNS-01 are supported.
11857+
description: ACME challenge type. Only http-01 and dns-01 are supported.
1185811858
enum:
11859-
- HTTP-01
11860-
- DNS-01
11859+
- http-01
11860+
- dns-01
1186111861
type: string
1186211862
contact:
1186311863
description: Contact email for the ACME account

specification/models/configuration/acme.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ acme:
2222
x-nullable: true
2323
challenge:
2424
type: string
25-
enum: ['HTTP-01', 'DNS-01']
26-
description: ACME challenge type. Only HTTP-01 and DNS-01 are supported.
25+
enum: ['http-01', 'dns-01']
26+
description: ACME challenge type. Only http-01 and dns-01 are supported.
2727
contact:
2828
type: string
2929
description: Contact email for the ACME account

test/acme_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func TestCreateEditDeleteAcmeProvider(t *testing.T) {
9797
Name: "ninja",
9898
AccountKey: "ninja-acme.key",
9999
Bits: misc.Int64P(2048),
100-
Challenge: "HTTP-01",
100+
Challenge: "http-01",
101101
Contact: "me@example.com",
102102
Curves: "dem curves",
103103
Directory: "https://acme.ninja.com/directory",

test/configuration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ mailers localmailer1
10131013
acme test
10141014
contact me@example.com
10151015
bits 4096
1016-
challenge HTTP-01
1016+
challenge http-01
10171017
directory https://acme.example.com/directory
10181018
keytype ECDSA
10191019
map acme@t

test/expected/structured.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3173,7 +3173,7 @@
31733173
"test": {
31743174
"contact": "me@example.com",
31753175
"bits": 4096,
3176-
"challenge": "HTTP-01",
3176+
"challenge": "http-01",
31773177
"directory": "https://acme.example.com/directory",
31783178
"keytype": "ECDSA",
31793179
"map": "acme@t"

0 commit comments

Comments
 (0)