Skip to content
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

Use OpenSSL::PKey.read to read private keys #190

Merged
merged 4 commits into from
Jul 18, 2024

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented May 22, 2024

This utilizes a method where OpenSSL itself determines the encryption type rather than a static parameter. This is more flexible because it requires fewer parameters to be specified.

Prior to that it does several cleanups to the tests.

Copy link
Member

@bastelfreak bastelfreak left a comment

Choose a reason for hiding this comment

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

looks good to me, but I'm really not an rspec nor openssl expert

@ekohl
Copy link
Member Author

ekohl commented May 22, 2024

I'd feel more comfortable if we had acceptance tests. I'll see if I can come up with something.

@ekohl
Copy link
Member Author

ekohl commented May 23, 2024

Further creating preparation work: #192.

In 7285844 the method was changed from
File.open to File.write, but the mocks weren't modified. This changes
from allow to expect so that if it's refactored, it will fail the tests.

Fixes: 7285844 ("Auto-correct rubocop offenses")
This makes the mocking stronger because tests will fail if they aren't
called in a certain way.
This utilizes a method where OpenSSL itself determines the encryption
type rather than a static parameter. This is more flexible because it
requires fewer parameters to be specified.
@ekohl ekohl mentioned this pull request Jul 18, 2024
@bastelfreak bastelfreak merged commit cac0733 into voxpupuli:master Jul 18, 2024
11 checks passed
@ekohl ekohl deleted the use-openssl-pkey-read branch July 18, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants