forked from fullsailor/pkcs7
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Panic when parsing invalid certificate #67
Labels
ARCHIVED
CLOSED at time of archiving
Comments
liranwiz
changed the title
Panic when parsing Invalid certificate
Panic when parsing invalid certificate
Feb 6, 2022
Does #68 fix this? |
@reedloden I checked and looks like it does. Here is another one, which is valid for both. package pkcs7
import (
"testing"
)
func TestBer2Der_Panic(t *testing.T) {
fixtures := []struct {
Input []byte
ErrorContains string
}{
{[]byte{0x5f, 0x4d}, "panic test"},
}
for _, fixture := range fixtures {
ber2der(fixture.Input)
}
}
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Calling Parse with the following input result in panic:
[48,130,6]
at https://github.com/mozilla-services/pkcs7/blob/master/ber.go#L191
Expected behavior would have been returning an error
The text was updated successfully, but these errors were encountered: