We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version
go version go1.7 darwin/amd64
go env
GOOS="darwin" GOARCH="amd64"
Program:
package main import ( "fmt" "io/ioutil" "golang.org/x/crypto/pkcs12" ) func check(err error) { if err != nil { panic(err) } } func main() { certPath := "Certificate.p12" pfxData, err := ioutil.ReadFile(certPath) check(err) password := "invalid" blocks, err := pkcs12.ToPEM(pfxData, password) check(err) fmt.Printf("Number of blocks: %d\n", len(blocks)) }
For Certificate.p12, I downloaded https://github.com/golang/go/files/95892/Certificate.p12.zip (password: googler) mentioned in #14015.
A panic resulting from a crypto.ErrIncorrectPassword error being returned.
crypto.ErrIncorrectPassword
Number of blocks: 0
Looks like the pkcs12.ToPEM function does not check the error returned by pkcs12.getSafeContents
The text was updated successfully, but these errors were encountered:
This was fixed in #19542 / https://go-review.googlesource.com/c/crypto/+/38261
Sorry, something went wrong.
No branches or pull requests
What version of Go are you using (
go version
)?go version go1.7 darwin/amd64
What operating system and processor architecture are you using (
go env
)?GOOS="darwin"
GOARCH="amd64"
What did you do?
Program:
For Certificate.p12, I downloaded https://github.com/golang/go/files/95892/Certificate.p12.zip (password: googler) mentioned in #14015.
What did you expect to see?
A panic resulting from a
crypto.ErrIncorrectPassword
error being returned.What did you see instead?
Looks like the pkcs12.ToPEM function does not check the error returned by pkcs12.getSafeContents
The text was updated successfully, but these errors were encountered: