forked from mmadfox/go-crx3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
crx3.pb.go
210 lines (185 loc) · 8.21 KB
/
crx3.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: pb/crx3.proto
package pb
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type CrxFileHeader struct {
// PSS signature with RSA public key. The public key is formatted as a
// X.509 SubjectPublicKeyInfo block, as in CRX₂. In the common case of a
// developer key proof, the first 128 bits of the SHA-256 hash of the
// public key must equal the crx_id.
Sha256WithRsa []*AsymmetricKeyProof `protobuf:"bytes,2,rep,name=sha256_with_rsa,json=sha256WithRsa" json:"sha256_with_rsa,omitempty"`
// ECDSA signature, using the NIST P-256 curve. Public key appears in
// named-curve format.
// The pinned algorithm will be this, at least on 2017-01-01.
Sha256WithEcdsa []*AsymmetricKeyProof `protobuf:"bytes,3,rep,name=sha256_with_ecdsa,json=sha256WithEcdsa" json:"sha256_with_ecdsa,omitempty"`
// The binary form of a SignedData message. We do not use a nested
// SignedData message, as handlers of this message must verify the proofs
// on exactly these bytes, so it is convenient to parse in two steps.
//
// All proofs in this CrxFile message are on the value
// "CRX3 SignedData\x00" + signed_header_size + signed_header_data +
// archive, where "\x00" indicates an octet with value 0, "CRX3 SignedData"
// is encoded using UTF-8, signed_header_size is the size in octets of the
// contents of this field and is encoded using 4 octets in little-endian
// order, signed_header_data is exactly the content of this field, and
// archive is the remaining contents of the file following the header.
SignedHeaderData []byte `protobuf:"bytes,10000,opt,name=signed_header_data,json=signedHeaderData" json:"signed_header_data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CrxFileHeader) Reset() { *m = CrxFileHeader{} }
func (m *CrxFileHeader) String() string { return proto.CompactTextString(m) }
func (*CrxFileHeader) ProtoMessage() {}
func (*CrxFileHeader) Descriptor() ([]byte, []int) {
return fileDescriptor_ffbe72ecdb1edd73, []int{0}
}
func (m *CrxFileHeader) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CrxFileHeader.Unmarshal(m, b)
}
func (m *CrxFileHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CrxFileHeader.Marshal(b, m, deterministic)
}
func (m *CrxFileHeader) XXX_Merge(src proto.Message) {
xxx_messageInfo_CrxFileHeader.Merge(m, src)
}
func (m *CrxFileHeader) XXX_Size() int {
return xxx_messageInfo_CrxFileHeader.Size(m)
}
func (m *CrxFileHeader) XXX_DiscardUnknown() {
xxx_messageInfo_CrxFileHeader.DiscardUnknown(m)
}
var xxx_messageInfo_CrxFileHeader proto.InternalMessageInfo
func (m *CrxFileHeader) GetSha256WithRsa() []*AsymmetricKeyProof {
if m != nil {
return m.Sha256WithRsa
}
return nil
}
func (m *CrxFileHeader) GetSha256WithEcdsa() []*AsymmetricKeyProof {
if m != nil {
return m.Sha256WithEcdsa
}
return nil
}
func (m *CrxFileHeader) GetSignedHeaderData() []byte {
if m != nil {
return m.SignedHeaderData
}
return nil
}
type AsymmetricKeyProof struct {
PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey" json:"public_key,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AsymmetricKeyProof) Reset() { *m = AsymmetricKeyProof{} }
func (m *AsymmetricKeyProof) String() string { return proto.CompactTextString(m) }
func (*AsymmetricKeyProof) ProtoMessage() {}
func (*AsymmetricKeyProof) Descriptor() ([]byte, []int) {
return fileDescriptor_ffbe72ecdb1edd73, []int{1}
}
func (m *AsymmetricKeyProof) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AsymmetricKeyProof.Unmarshal(m, b)
}
func (m *AsymmetricKeyProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AsymmetricKeyProof.Marshal(b, m, deterministic)
}
func (m *AsymmetricKeyProof) XXX_Merge(src proto.Message) {
xxx_messageInfo_AsymmetricKeyProof.Merge(m, src)
}
func (m *AsymmetricKeyProof) XXX_Size() int {
return xxx_messageInfo_AsymmetricKeyProof.Size(m)
}
func (m *AsymmetricKeyProof) XXX_DiscardUnknown() {
xxx_messageInfo_AsymmetricKeyProof.DiscardUnknown(m)
}
var xxx_messageInfo_AsymmetricKeyProof proto.InternalMessageInfo
func (m *AsymmetricKeyProof) GetPublicKey() []byte {
if m != nil {
return m.PublicKey
}
return nil
}
func (m *AsymmetricKeyProof) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
type SignedData struct {
// This is simple binary, not UTF-8 encoded mpdecimal; i.e. it is exactly
// 16 bytes long.
CrxId []byte `protobuf:"bytes,1,opt,name=crx_id,json=crxId" json:"crx_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SignedData) Reset() { *m = SignedData{} }
func (m *SignedData) String() string { return proto.CompactTextString(m) }
func (*SignedData) ProtoMessage() {}
func (*SignedData) Descriptor() ([]byte, []int) {
return fileDescriptor_ffbe72ecdb1edd73, []int{2}
}
func (m *SignedData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignedData.Unmarshal(m, b)
}
func (m *SignedData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SignedData.Marshal(b, m, deterministic)
}
func (m *SignedData) XXX_Merge(src proto.Message) {
xxx_messageInfo_SignedData.Merge(m, src)
}
func (m *SignedData) XXX_Size() int {
return xxx_messageInfo_SignedData.Size(m)
}
func (m *SignedData) XXX_DiscardUnknown() {
xxx_messageInfo_SignedData.DiscardUnknown(m)
}
var xxx_messageInfo_SignedData proto.InternalMessageInfo
func (m *SignedData) GetCrxId() []byte {
if m != nil {
return m.CrxId
}
return nil
}
func init() {
proto.RegisterType((*CrxFileHeader)(nil), "pb.CrxFileHeader")
proto.RegisterType((*AsymmetricKeyProof)(nil), "pb.AsymmetricKeyProof")
proto.RegisterType((*SignedData)(nil), "pb.SignedData")
}
func init() { proto.RegisterFile("pb/crx3.proto", fileDescriptor_ffbe72ecdb1edd73) }
var fileDescriptor_ffbe72ecdb1edd73 = []byte{
// 254 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x8e, 0xcd, 0x4a, 0xc3, 0x40,
0x14, 0x85, 0x49, 0x82, 0x42, 0xaf, 0x86, 0xea, 0x80, 0x92, 0x85, 0x42, 0x89, 0x9b, 0x6e, 0x8c,
0x50, 0xd1, 0xa5, 0x60, 0xfd, 0xa1, 0x52, 0x10, 0x8d, 0x0b, 0x97, 0xc3, 0xcd, 0xcc, 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