@@ -79,19 +79,21 @@ func NewCertificateLocalStorage(rootDir string) (*CertificateLocalStorage, error
7979 }
8080
8181 for _ , truststoreType := range truststore .Types {
82- defaultTruststore := path .Join (dir , "truststore" , "x509" , string (truststoreType ), truststoreName )
82+ if truststoreType != truststore .TypeTSA {
83+ defaultTruststore := path .Join (dir , "truststore" , "x509" , string (truststoreType ), truststoreName )
84+
85+ _ , err = os .Stat (defaultTruststore )
86+ if os .IsNotExist (err ) {
87+ err = os .MkdirAll (defaultTruststore , defaultDirPerms )
88+ if err != nil {
89+ return nil , err
90+ }
91+ }
8392
84- _ , err = os .Stat (defaultTruststore )
85- if os .IsNotExist (err ) {
86- err = os .MkdirAll (defaultTruststore , defaultDirPerms )
8793 if err != nil {
8894 return nil , err
8995 }
9096 }
91-
92- if err != nil {
93- return nil , err
94- }
9597 }
9698
9799 return certStorage , nil
@@ -117,7 +119,9 @@ func InitTrustpolicyFile(notationStorage certificateStorage) error {
117119 truststores := []string {}
118120
119121 for _ , truststoreType := range truststore .Types {
120- truststores = append (truststores , fmt .Sprintf ("\" %s:%s\" " , string (truststoreType ), truststoreName ))
122+ if truststoreType != truststore .TypeTSA {
123+ truststores = append (truststores , fmt .Sprintf ("\" %s:%s\" " , string (truststoreType ), truststoreName ))
124+ }
121125 }
122126
123127 defaultTruststores := strings .Join (truststores , "," )
0 commit comments