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

Fix TestGetRsaKey running with openssl 1.1 #517

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

cbosdo
Copy link
Contributor

@cbosdo cbosdo commented Dec 13, 2024

What does this PR change?

openssl 1.1 generates PKCS#1 (wrapped in RSA PRIVATE KEY block) while the test was expecting the behavior of more recent openssl generating PKCS#8 (wrapped in PRIVATE KEY block).

Handle both in the unit test.

Codespace

Check if you already have a running container clicking on Running CodeSpace

Create CodeSpace About billing for Github Codespaces CodeSpace Billing Summary CodeSpace Limit

Test coverage

  • Unit tests were changed

  • DONE

Links

Issue(s): https://github.com/SUSE/spacewalk/issues/24832 https://github.com/SUSE/spacewalk/issues/24842

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Before you merge

Check How to branch and merge properly!

@cbosdo cbosdo requested a review from deneb-alpha December 13, 2024 17:08
openssl 1.1 generates PKCS#1 (wrapped in RSA PRIVATE KEY block)
while the test was expecting the behavior of more recent openssl
generating PKCS#8 (wrapped in PRIVATE KEY block).

Handle both in the unit test.
Copy link
Contributor

@deneb-alpha deneb-alpha left a comment

Choose a reason for hiding this comment

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

go test -v github.com/uyuni-project/uyuni-tools/shared/ssl -run TestGetRsaKey

=== RUN   TestGetRsaKey
--- PASS: TestGetRsaKey (0.00s)
PASS
ok      github.com/uyuni-project/uyuni-tools/shared/ssl 0.007s

Thanks!

@deneb-alpha deneb-alpha merged commit 3933b2c into uyuni-project:main Dec 13, 2024
7 checks passed
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