New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow certificate_key to be specified like account_key #93

Merged
merged 2 commits into from May 2, 2018

Conversation

Projects
None yet
3 participants
@dnet
Contributor

dnet commented Apr 28, 2018

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 from allow certificate_key to be specified like account_key to Allow certificate_key to be specified like account_key Apr 28, 2018

@komuw

This comment has been minimized.

Owner

komuw commented Apr 29, 2018

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

if account_key:

@komuw komuw self-requested a review Apr 29, 2018

@codecov

This comment has been minimized.

codecov bot commented May 1, 2018

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%) ⬇️
@codacy-bot

This comment has been minimized.

codacy-bot commented May 1, 2018

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- sewer/client.py  2
         

See the complete overview on Codacy

Repository owner deleted a comment from codacy-bot May 1, 2018

@dnet

This comment has been minimized.

Contributor

dnet commented May 1, 2018

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

This comment has been minimized.

Owner

komuw commented May 2, 2018

@dnet Thanks for working on this.

ci is failing because of this upstream bugs in flake8:

@komuw komuw merged commit 10ffa6d into komuw:master May 2, 2018

1 of 2 checks passed

ci/circleci Your tests failed on CircleCI
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details

@dnet dnet deleted the dnet:cert-key branch May 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment