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

Parse encrypted private keys in PKCS#8 format #135

Merged
merged 4 commits into from
Jun 23, 2023

Conversation

jsoriano
Copy link
Member

What does this PR do?

Add support to parse encrypted private keys in PKCS#8 format.

Why is it important?

At least OpenSSL 3 uses PKCS#8 format by default. ReadPEMFile silently left private keys on this format encrypted, what produces problems later when trying to use them.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.md

Author's Checklist

  • [ ]

Related issues

@jsoriano jsoriano requested a review from a team as a code owner June 20, 2023 15:23
@jsoriano jsoriano self-assigned this Jun 20, 2023
@jsoriano jsoriano requested review from ycombinator and rdner and removed request for a team June 20, 2023 15:23
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 20, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-06-23T11:08:01.117+0000

  • Duration: 9 min 40 sec

Test stats 🧪

Test Results
Failed 0
Passed 791
Skipped 11
Total 802

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@cmacknz cmacknz added the Team:Elastic-Agent Label for the Agent team label Jun 20, 2023
@jsoriano jsoriano force-pushed the tls-parse-pkcs8-private-key branch from a755369 to 900dc38 Compare June 20, 2023 20:10
transport/tlscommon/tls.go Outdated Show resolved Hide resolved
@cmacknz cmacknz requested a review from belimawr June 21, 2023 17:41
transport/tlscommon/tls.go Outdated Show resolved Hide resolved
transport/tlscommon/tls.go Outdated Show resolved Hide resolved
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @jsoriano

@jsoriano jsoriano requested a review from belimawr June 23, 2023 11:17
@jsoriano jsoriano merged commit fc80ba6 into elastic:main Jun 23, 2023
@jsoriano jsoriano deleted the tls-parse-pkcs8-private-key branch June 23, 2023 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ReadPEMFile doesn't properly read PKCS#8 encrypted keys
4 participants