-
Notifications
You must be signed in to change notification settings - Fork 50
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
Change DSA test key format + adopt test code #264
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for resolving this issue @lukpueh !
tests/test_gpg.py
Outdated
cryptography for the sake of comparison """ | ||
since there's very little we can do to check key parameters are right | ||
we pre-exported the public key to an x.509 SubjectPublicKeyInfo key, | ||
which we can load with cryptography for the sake of comparison """ | ||
|
||
# export our gpg key, using our functions | ||
key_data = export_pubkey(self.default_keyid, homedir=self.gnupg_home) | ||
our_exported_key = dsa_create_pubkey(key_data) | ||
|
||
# load the equivalent ssh key, and make sure that we get the same RSA key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this is not an ssh key any more, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and not an rsa key either. 🤦 thanks for catching!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated and squashed into 492f7e5
A recent pyca/cryptography update dropped support for DSA ssh public keys with bit size other than 1024, which broke our tests. See pyca/cryptography#5373 This commit changes the test key format to X.509 SubjectPublicKeyInfo PEM and updates the corresponding test code. ``` ssh-keygen -f C242A830DAAF1C2BEF604A9EF033A3A3E267B3B1.ssh \ -e -m pkcs8 > C242A830DAAF1C2BEF604A9EF033A3A3E267B3B1.pem ``` Note: ssh-keygen mistakingly calls the format pkcs8 although it is X.509 SubjectPublicKeyInfo PEM.
Bumps [cryptography](https://github.com/pyca/cryptography) from 2.9.2 to 3.0. - [Release notes](https://github.com/pyca/cryptography/releases) - [Changelog](https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst) - [Commits](pyca/cryptography@2.9.2...3.0) Signed-off-by: dependabot-preview[bot] <[email protected]>
e058c99
to
15028a4
Compare
Fixes issue #:
Related #261, #251
Description of the changes being introduced by the pull request:
A recent pyca/cryptography update dropped support for DSA ssh public keys with bit size other than 1024, which broke our tests. See pyca/cryptography#5373.
This PR changes the test key format to X.509 SubjectPublicKeyInfo PEM and updates the corresponding test code.
Note: ssh-keygen mistakingly calls the format pkcs8 although it is X.509 SubjectPublicKeyInfo PEM.
Please verify and check that the pull request fulfils the following
requirements: