Debian Codegraph @

lib/signappx/structs.go

raw symbols SCIP
1 //
2 // Copyright (c) SAS Institute Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 package signappx
18
19 import (
20 "archive/zip"
21 "crypto"
22
23 "github.com/sassoftware/relic/v7/lib/authenticode"
24 "github.com/sassoftware/relic/v7/lib/pkcs9"
25 )
26
27 const (
28 appxSignature = "AppxSignature.p7x"
29 appxCodeIntegrity = "AppxMetadata/CodeIntegrity.cat"
30 appxBlockMap = "AppxBlockMap.xml"
31 appxManifest = "AppxManifest.xml"
32 appxContentTypes = "[Content_Types].xml"
33
34 bundleManifestFile = "AppxMetadata/AppxBundleManifest.xml"
35 )
36
37 type AppxSignature struct {
38 Signature *pkcs9.TimestampedSignature
39 Name, DisplayName string
40 Version string
41 IsBundle bool
42 Hash crypto.Hash
43 HashValues map[string][]byte
44 Bundled map[string]*AppxSignature
45 OpusInfo *authenticode.SpcSpOpusInfo
46 }
47
48 type zipFiles map[string]*zip.File