Skip to content

Allow SimpleHTTP - #351

Merged
rolandshoemaker merged 4 commits into
masterfrom
allow-simplehttp
Jun 12, 2015
Merged

rolandshoemaker merged 4 commits into
masterfrom
allow-simplehttp

Conversation

@rolandshoemaker

Copy link
Copy Markdown
Contributor

Fixes #330, I've added the TLS field specified in the spec to the core.Challenge object and the underlying logic.

I think it would be somewhat cleaner if the field was actually named noTLS and it's purpose flipped (...obviously). Because of how JSON omitempty works if the client omits the TLS field it is unmarshaled to false, which is probably the opposite of what we want (HTTPS use by default). If the field was noTLS we could just assume that the omission of this field assumes default behavior and only trigger HTTP use if we get an explicit noTLS: true in the POSTed challenge.

@jcjones

jcjones commented Jun 12, 2015

Copy link
Copy Markdown
Contributor

Ugh, spec says optional, default to true.

I think all we can do here is make TLS a pointer to a bool instead, and test for nil. I would feel more comfortable doing that than doing the opposite of the spec.

@rolandshoemaker

Copy link
Copy Markdown
Contributor Author

This is indeed a much better solution, I'll redo it in a bit.

@kuba

kuba commented Jun 12, 2015

Copy link
Copy Markdown
Contributor

Challenge name (and corresponding types IMO) should be renamed to "simpleHttp". Support in client: certbot/certbot#498

@jcjones

jcjones commented Jun 12, 2015

Copy link
Copy Markdown
Contributor

Changeset going to the pointer looks fine to me. After you resolve the naming issue Kuba brought up, you're good to merge. Thanks!

Comment thread va/validation-authority.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a little more aesthetic to call this "scheme"

rolandshoemaker added a commit that referenced this pull request Jun 12, 2015
@rolandshoemaker
rolandshoemaker merged commit aa71088 into master Jun 12, 2015
@rolandshoemaker
rolandshoemaker deleted the allow-simplehttp branch July 15, 2015 21:59
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

Successfully merging this pull request may close these issues.

4 participants