certificate.Store: Clean scope path in Load
Clean the scope path so that trimming the path from the scope works for relative paths.
This commit is contained in:
parent
649b20659b
commit
e7a06a12bf
@ -191,7 +191,8 @@ func (s *Store) Load(path string) error {
|
||||
continue
|
||||
}
|
||||
|
||||
scope := strings.TrimPrefix(crtPath, path)
|
||||
scope := filepath.Clean(crtPath)
|
||||
scope = strings.TrimPrefix(crtPath, filepath.Clean(path))
|
||||
scope = strings.TrimPrefix(scope, "/")
|
||||
scope = strings.TrimSuffix(scope, ".crt")
|
||||
s.Add(scope, cert)
|
||||
|
Loading…
Reference in New Issue
Block a user