Skip to content

Commit

Permalink
Merge pull request #45 from basak/keysize
Browse files Browse the repository at this point in the history
Increase key size to 2048 bits
  • Loading branch information
njsmith committed Apr 15, 2019
2 parents b928870 + b06ad87 commit 15c60e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions newsfragments/45.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update key size to 2048 bits, as required by recent Debian.
9 changes: 5 additions & 4 deletions trustme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
except NameError:
unicode = str

# On my laptop, making a CA + server certificate using 1024 bit keys takes ~40
# ms, and using 4096 bit keys takes ~2 seconds. We want tests to run in 40 ms,
# not 2 seconds.
_KEY_SIZE = 1024
# On my laptop, making a CA + server certificate using 2048 bit keys takes ~160
# ms, and using 4096 bit keys takes ~2 seconds. We want tests to run in 160 ms,
# not 2 seconds. And we can't go lower, since Debian (and probably others)
# by default reject any keys with <2048 bits (see #45).
_KEY_SIZE = 2048


def _name(name, common_name=None):
Expand Down

0 comments on commit 15c60e6

Please sign in to comment.