diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-07-17 13:57:45 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-07-19 13:44:40 +0000 |
commit | 6ec7b8da05d21a3878bd21c691b41e675d74bb1c (patch) | |
tree | b87f250bc19413750b9bb9cdbf2da20ef5014820 /chromium/components/crx_file/crx3.proto | |
parent | ec02ee4181c49b61fce1c8fb99292dbb8139cc90 (diff) | |
download | qtwebengine-chromium-6ec7b8da05d21a3878bd21c691b41e675d74bb1c.tar.gz |
BASELINE: Update Chromium to 60.0.3112.70
Change-Id: I9911c2280a014d4632f254857876a395d4baed2d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/components/crx_file/crx3.proto')
-rw-r--r-- | chromium/components/crx_file/crx3.proto | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/chromium/components/crx_file/crx3.proto b/chromium/components/crx_file/crx3.proto new file mode 100644 index 00000000000..2ea91f1c937 --- /dev/null +++ b/chromium/components/crx_file/crx3.proto @@ -0,0 +1,55 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file + +syntax = "proto2"; + +option optimize_for = LITE_RUNTIME; + +package crx_file; + +// A CRX₃ file is a binary file of the following format: +// [4 octets]: "Cr24", a magic number. +// [4 octets]: The version of the *.crx file format used (currently 3). +// [4 octets]: N, little-endian, the length of the header section. +// [N octets]: The header (the binary encoding of a CrxFileHeader). +// [M octets]: The ZIP archive. +// Clients should reject CRX₃ files that contain an N that is too large for the +// client to safely handle in memory. + +message CrxFileHeader { + // 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. + repeated AsymmetricKeyProof sha256_with_rsa = 2; + + // 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. + repeated AsymmetricKeyProof sha256_with_ecdsa = 3; + + // 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. + optional bytes signed_header_data = 10000; +} + +message AsymmetricKeyProof { + optional bytes public_key = 1; + optional bytes signature = 2; +} + +message SignedData { + // This is simple binary, not UTF-8 encoded mpdecimal; i.e. it is exactly + // 16 bytes long. + optional bytes crx_id = 1; +} |