mirror of
https://github.com/project-zot/zot.git
synced 2026-06-20 06:37:56 +08:00
build(deps): bump github.com/notaryproject/notation-go from 1.1.1 to 1.2.1 (#2785)
Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com>
This commit is contained in:
@@ -79,19 +79,21 @@ func NewCertificateLocalStorage(rootDir string) (*CertificateLocalStorage, error
|
||||
}
|
||||
|
||||
for _, truststoreType := range truststore.Types {
|
||||
defaultTruststore := path.Join(dir, "truststore", "x509", string(truststoreType), truststoreName)
|
||||
if truststoreType != truststore.TypeTSA {
|
||||
defaultTruststore := path.Join(dir, "truststore", "x509", string(truststoreType), truststoreName)
|
||||
|
||||
_, err = os.Stat(defaultTruststore)
|
||||
if os.IsNotExist(err) {
|
||||
err = os.MkdirAll(defaultTruststore, defaultDirPerms)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
_, err = os.Stat(defaultTruststore)
|
||||
if os.IsNotExist(err) {
|
||||
err = os.MkdirAll(defaultTruststore, defaultDirPerms)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return certStorage, nil
|
||||
@@ -117,7 +119,9 @@ func InitTrustpolicyFile(notationStorage certificateStorage) error {
|
||||
truststores := []string{}
|
||||
|
||||
for _, truststoreType := range truststore.Types {
|
||||
truststores = append(truststores, fmt.Sprintf("\"%s:%s\"", string(truststoreType), truststoreName))
|
||||
if truststoreType != truststore.TypeTSA {
|
||||
truststores = append(truststores, fmt.Sprintf("\"%s:%s\"", string(truststoreType), truststoreName))
|
||||
}
|
||||
}
|
||||
|
||||
defaultTruststores := strings.Join(truststores, ",")
|
||||
|
||||
Reference in New Issue
Block a user