8000 Refactor the inefficient function to parse PKCS#8 encrypted private keys · Issue #29 · Zomato/espresso · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Refactor the inefficient function to parse PKCS#8 encrypted private keys #29
Open
@akkahshh24

Description

@akkahshh24

Description

Currently, the function to parse the encrypted private key invokes the openssl command, writes temporary files, and reads back the decrypted output. While this works, it's very inefficient.

espresso/lib/certmanager/certmanager.go:122

// Helper function to parse PKCS#8 encrypted private keys
func parseEncryptedPKCS8PrivateKey(data, password []byte) (interface{}, error)

Go's x509 and pem standard libraries already provide support for decrypting encrypted PEM blocks using x509.DecryptPEMBlock.

Benefits

  1. No call to external dependencies like openssl
  2. No writing to and reading from temp files.

I'd be happy to work on this and create a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0