Skip to content

Commit 61fc1bc

Browse files
authored
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>
1 parent 28ffa38 commit 61fc1bc

3 files changed

Lines changed: 17 additions & 12 deletions

File tree

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ require (
3939
github.com/mitchellh/mapstructure v1.5.0
4040
github.com/nmcclain/ldap v0.0.0-20210720162743-7f8d1e44eeba
4141
github.com/notaryproject/notation-core-go v1.1.0
42-
github.com/notaryproject/notation-go v1.1.1
42+
github.com/notaryproject/notation-go v1.2.1
4343
github.com/olekukonko/tablewriter v0.0.5
4444
github.com/opencontainers/distribution-spec/specs-go v0.0.0-20240201174943-0f98d91a0afe
4545
github.com/opencontainers/go-digest v1.0.0
@@ -443,6 +443,7 @@ require (
443443
github.com/urfave/cli/v2 v2.27.4 // indirect
444444
github.com/vbatts/tar-split v0.11.6 // indirect
445445
github.com/vbauerster/mpb/v8 v8.8.3 // indirect
446+
github.com/veraison/go-cose v1.2.1 // indirect
446447
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
447448
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
448449
github.com/x448/float16 v0.8.4 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,8 +1227,8 @@ github.com/nmcclain/ldap v0.0.0-20210720162743-7f8d1e44eeba h1:DO8NFYdcRv1dnyAIN
12271227
github.com/nmcclain/ldap v0.0.0-20210720162743-7f8d1e44eeba/go.mod h1:4S0XndRL8HNOaQBfdViJ2F/GPCgL524xlXRuXFH12/U=
12281228
github.com/notaryproject/notation-core-go v1.1.0 h1:xCybcONOKcCyPNihJUSa+jRNsyQFNkrk0eJVVs1kWeg=
12291229
github.com/notaryproject/notation-core-go v1.1.0/go.mod h1:+6AOh41JPrnVLbW/19SJqdhVHwKgIINBO/np0e7nXJA=
1230-
github.com/notaryproject/notation-go v1.1.1 h1:EAY8ERBWhrdaG9MIumSZ9xyUHktgr6OkCByd75HR+FA=
1231-
github.com/notaryproject/notation-go v1.1.1/go.mod h1:XykI2i5jHb6cGf+bcG/cIeNfNO2u4Xoy2mkuOKHjVVI=
1230+
github.com/notaryproject/notation-go v1.2.1 h1:fbCMBcvg1xttrisd5CyM60QDectGYYF701Us0M3cKN8=
1231+
github.com/notaryproject/notation-go v1.2.1/go.mod h1:re9V+TfuNRaUq5e3NuNcCJN53++sL2KbnJrjGyOUpgE=
12321232
github.com/notaryproject/notation-plugin-framework-go v1.0.0 h1:6Qzr7DGXoCgXEQN+1gTZWuJAZvxh3p8Lryjn5FaLzi4=
12331233
github.com/notaryproject/notation-plugin-framework-go v1.0.0/go.mod h1:RqWSrTOtEASCrGOEffq0n8pSg2KOgKYiWqFWczRSics=
12341234
github.com/notaryproject/tspclient-go v0.2.0 h1:g/KpQGmyk/h7j60irIRG1mfWnibNOzJ8WhLqAzuiQAQ=

pkg/extensions/imagetrust/notation.go

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)