@@ -80,12 +80,23 @@ func (s *Signature) Manifest(ctx context.Context, publisher, name string, versio
8080//
8181// The signed payload and signing process is taken from:
8282// https://github.com/filiptronicek/node-ovsx-sign
83+ //
84+ // Some notes:
85+ //
86+ // - VSCodium requires a signature to exist, but it does appear to actually read
87+ // the signature. Meaning the signature could be empty, incorrect, or a
88+ // picture of cat and it would work. There is so signature verification.
89+ //
90+ // - VSCode requires a signature payload to exist, but the context appear
91+ // to be somewhat optional.
92+ // Following another open source implementation, it appears the '.signature.p7s'
93+ // file must exist, but it can be empty.
94+ // The signature is stored in a '.signature.sig' file, although it is unclear
95+ // is VSCode ever reads this file.
96+ // TODO: Properly implement the p7s file, and diverge from the other open
97+ // source implementation. Ideally this marketplace would match Microsoft's
98+ // marketplace API.
8399func (s * Signature ) Open (ctx context.Context , fp string ) (fs.File , error ) {
84- if s .SigningEnabled () && filepath .Base (fp ) == "p7s.sig" {
85- // This file must exist, and it is always empty
86- return mem .NewFileHandle (mem .CreateFile ("p7s.sig" )), nil
87- }
88-
89100 if s .SigningEnabled () && filepath .Base (fp ) == sigzipFilename {
90101 // hijack this request, sign the sig manifest
91102 manifest , err := s .Storage .Open (ctx , filepath .Join (filepath .Dir (fp ), sigManifestName ))
0 commit comments