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
I have been working on a project where this error is significant
go-pkcs12/pkcs12.go
Line 256 in 426fe5a
Can we create a predefined error value for this?. It makes it easy for error value comparison. I suggest something like this
var ErrExpectedTwoSafeBags error = errors.New("pkcs12: expected exactly two safe bags in the PFX PDU")
So We can do something like this
pfx, cert, err := pkcs12.Decode(pfxData, password) if errors.Is(err,pkcs12.ErrExpectedTwoSafeBags){ // LoadChain }
instead of
if err.Error() == "pkcs12: expected exactly two safe bags in the PFX PDU" { }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have been working on a project where this error is significant
go-pkcs12/pkcs12.go
Line 256 in 426fe5a
Can we create a predefined error value for this?. It makes it easy for error value comparison. I suggest something like this
So We can do something like this
instead of
The text was updated successfully, but these errors were encountered: