Skip to content

Allow certificate_key to be specified like account_key#93

Merged
komuw merged 2 commits into
komuw:masterfrom
dnet:cert-key
May 2, 2018
Merged

Allow certificate_key to be specified like account_key#93
komuw merged 2 commits into
komuw:masterfrom
dnet:cert-key

Conversation

@dnet

@dnet dnet commented Apr 28, 2018

Copy link
Copy Markdown
Contributor

What

I added an option to the Client constructor named certificate_key which behaves just like the optional parameter account_key -- it allows the user to specify a private key instead of generating one.

Why

While I'm all for generating new keys upon each renewal as it dramatically lowers the time window in which a leaked key can be abused, there are situations when a pre-existing key must be used.

For example if HPKP is already set up and clients expects private keys to be selected from a limited pool already advertised in the header, there's no other option but to generate a certificate that matches at least one of the entries already known by User-Agents.

@dnet dnet changed the title allow certificate_key to be specified like account_key Allow certificate_key to be specified like account_key Apr 28, 2018
@komuw

komuw commented Apr 29, 2018

Copy link
Copy Markdown
Owner

@dnet
You would also need to add it to the command line app:

if account_key:

@komuw komuw self-requested a review April 29, 2018 19:20
@codecov

codecov Bot commented May 1, 2018

Copy link
Copy Markdown

Codecov Report

Merging #93 into master will decrease coverage by 0.18%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #93      +/-   ##
=========================================
- Coverage   93.39%   93.2%   -0.19%     
=========================================
  Files           6       6              
  Lines         469     471       +2     
=========================================
+ Hits          438     439       +1     
- Misses         31      32       +1
Impacted Files Coverage Δ
sewer/client.py 93.6% <66.66%> (-0.3%) ⬇️

Repository owner deleted a comment May 1, 2018
@dnet

dnet commented May 1, 2018

Copy link
Copy Markdown
Contributor Author

You would also need to add it to the command line app

OK, I added that in c34a91b. CircleCI seems to fail on that, but I cannot comprehend its error message. It seems like some kind of internal error during the flake8 test, however flake8 reports no problems on my machine. (And the CircleCI output only contains stack traces showing that it couldn't run flake8...)

@komuw

komuw commented May 2, 2018

Copy link
Copy Markdown
Owner

@komuw komuw merged commit 10ffa6d into komuw:master May 2, 2018
@dnet dnet deleted the cert-key branch May 2, 2018 08:16
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