Created
August 15, 2017 18:07
-
-
Save solarfly73/c49591c5c06d22a23fa24020db86b2e1 to your computer and use it in GitHub Desktop.
foo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func ParsePKCS8PrivateKey(der []byte, v ...[]byte) (interface{}, error) { | |
// No password provided, assume the private key is unencrypted | |
if v == nil || len(v[0]) == 0 { | |
return x509.ParsePKCS8PrivateKey(der) | |
} | |
// Use the password provided to decrypt the private key | |
password := v[0] | |
var privKey encryptedPrivateKeyInfo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment