@@ -141,6 +141,9 @@ func genTestDoc(t *testing.T) VEX {
141
141
{
142
142
Vulnerability : Vulnerability {
143
143
Name : "CVE-1234-5678" ,
144
+ Aliases : []VulnerabilityID {
145
+ VulnerabilityID ("some vulnerability alias" ),
146
+ },
144
147
},
145
148
Products : []Product {
146
149
{
@@ -163,7 +166,7 @@ func genTestDoc(t *testing.T) VEX {
163
166
}
164
167
165
168
func TestCanonicalHash (t * testing.T ) {
166
- goldenHash := `a85519b483f5740f787986d9a72aa4990e79636c7c526d5e2bd7114dc05269d2 `
169
+ goldenHash := `3edda795cc8f075902800f0bb6a24f89b49e7e45fbceea96ce6061097460f139 `
167
170
168
171
otherTS , err := time .Parse (time .RFC3339 , "2019-01-22T16:36:43-05:00" )
169
172
require .NoError (t , err )
@@ -186,7 +189,7 @@ func TestCanonicalHash(t *testing.T) {
186
189
Status : "affected" ,
187
190
})
188
191
},
189
- "d5e5fc62190aaf6128139ac45d24a73dbcf6564a3404621c6b5c9e440f072c86 " ,
192
+ "662d88a939419d4dc61406c3180711a89a729272abeabf2be7ef76c8c42fdfda " ,
190
193
false ,
191
194
},
192
195
// Changing metadata should not change hash
@@ -216,15 +219,15 @@ func TestCanonicalHash(t *testing.T) {
216
219
func (v * VEX ) {
217
220
v .Statements [0 ].Products [0 ].ID = "cool router, bro"
218
221
},
219
- "b875594ad77fed770931b15854c861a8d098fc15a36aec13526ec0abb4d2ace3 " ,
222
+ "6caa2fb361667bb70c5be5e70df2982c75a7a848d9de050397a87dc4c515566c " ,
220
223
false ,
221
224
},
222
225
// Changing document time changes the hash
223
226
{
224
227
func (v * VEX ) {
225
228
v .Timestamp = & otherTS
226
229
},
227
- "9d7c3f6a441332f7f04d78a7d311174a0622209204228aa31dd4d5dffb6bb884 " ,
230
+ "b9e10ecafe5afbdd36582f932550ae42e4301849909a12305d75a7c268d95922 " ,
228
231
false ,
229
232
},
230
233
// Same timestamp in statement as doc should not change the hash
@@ -256,7 +259,7 @@ func TestGenerateCanonicalID(t *testing.T) {
256
259
{
257
260
// Normal generation
258
261
prepare : func (v * VEX ) {},
259
- expectedID : "https://openvex.dev/docs/public/vex-a85519b483f5740f787986d9a72aa4990e79636c7c526d5e2bd7114dc05269d2 " ,
262
+ expectedID : "https://openvex.dev/docs/public/vex-3edda795cc8f075902800f0bb6a24f89b49e7e45fbceea96ce6061097460f139 " ,
260
263
},
261
264
{
262
265
// Existing IDs should not be changed
0 commit comments