mirror of
https://github.com/SSLMate/certspotter.git
synced 2025-06-27 10:15:33 +02:00
Validate log list after loading it
This commit is contained in:
parent
6d5e2395a1
commit
74a7329c00
@ -54,5 +54,8 @@ func unmarshal(jsonBytes []byte) (*List, error) {
|
||||
if err := json.Unmarshal(jsonBytes, list); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := list.Validate(); err != nil {
|
||||
return nil, fmt.Errorf("Invalid log list: %s", err)
|
||||
}
|
||||
return list, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user