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

added -pem-password to der2ascii to support PEM decryption #27

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

alex
Copy link
Contributor

@alex alex commented Jan 16, 2025

No description provided.

@@ -70,7 +77,16 @@ func main() {
if pemBlock == nil {
break
}
inputs = append(inputs, input{comment: pemBlock.Type, bytes: pemBlock.Bytes})
if *pemPassword != "" {
bytes, err := x509.DecryptPEMBlock(pemBlock, []byte(*pemPassword))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Apparently this is deprecated, but not in a way that's useful for this PR so okay whatever. :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. It's deprecated because PEM encryption is bad (politifact check: true), but I think under go's stability policy it's not going anywhere.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yup. Yeah I was just waiting for CI to clear and then stepped away from screen. :-)

@davidben davidben merged commit 92a0052 into google:main Jan 16, 2025
2 checks passed
@alex alex deleted the pem-decrypt branch January 16, 2025 20:38
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