Skip to content

Initial support for user-supplied CSRs (fixes: #370) - #504

Merged
jdkasten merged 7 commits into
certbot:masterfrom
kuba:csr
Jun 25, 2015
Merged

jdkasten merged 7 commits into
certbot:masterfrom
kuba:csr

Conversation

@kuba

@kuba kuba commented Jun 15, 2015

Copy link
Copy Markdown
Contributor

This PR enables users to supply their own CSRs, by running letsencrypt auth --csr csr.der. No access to private key is required, domains are read from the CSR.

Unfortunately, issued certificates are not enrolled in renewer, as this requires substantial changes to the renewer code, to be done in future PRs. For now certificate and chain are stored in good old /etc/letsencrypt/certs (which would justify existence of --cert-dir, rather than --csr-dir, c.f. #440).

Tested with current demo instance: Boulder=(master +9af2742 Sun Jun 14 07:37:53 UTC 2015) Golang=(go1.4) BuildHost=(ubuntu@ip-172-30-0-34)

Together with #502, this provides the same functionality as https://github.com/diafygi/letsencrypt-nosudo by @diafygi.

kuba added a commit to kuba/letsencrypt that referenced this pull request Jun 23, 2015
Conflicts:
	letsencrypt/cli.py
	letsencrypt/client.py
	letsencrypt/tests/client_test.py
@kuba

kuba commented Jun 25, 2015

Copy link
Copy Markdown
Contributor Author

Merged with master. Changed --cert-path and --chain-path to the following defaults: ./cert.pem and ./chain.pem respectively (instead of storing them both in cert_dir).

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.

Order is pretty important even if we don't include a CN in certificates.

Comment thread letsencrypt/crypto_util.py 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.

The CA will ignore fields other than the CN in the subject. An ACME CA will definitely use the SANs and public key. So stripping out extraneous info is fine. I think a bit more thought should go into exactly what might be useful to include.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I allowed myself to remove these commented subject fields, and left an appropriate TODO instead.

@jdkasten

Copy link
Copy Markdown
Contributor

Thanks! LGTM. Tested auth with csr, and without csr with Apache. Tested run with Apache

jdkasten added a commit that referenced this pull request Jun 25, 2015
Initial support for user-supplied CSRs (fixes: #370)
@jdkasten
jdkasten merged commit bf69cf1 into certbot:master Jun 25, 2015
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.

2 participants