1 // Copyright (c) 2013 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef XWALK_APPLICATION_BROWSER_INSTALLER_XPK_PACKAGE_H_
6 #define XWALK_APPLICATION_BROWSER_INSTALLER_XPK_PACKAGE_H_
11 #include "base/files/file_path.h"
12 #include "base/memory/scoped_handle.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "xwalk/application/browser/installer/package.h"
17 namespace application {
19 class XPKPackage : public Package {
21 static const char kXPKPackageHeaderMagic[];
22 static const size_t kXPKPackageHeaderMagicSize = 4;
23 static const uint32 kMaxPublicKeySize = 1 << 16;
24 static const uint32 kMaxSignatureKeySize = 1 << 16;
27 char magic[kXPKPackageHeaderMagicSize];
29 uint32 signature_size;
31 virtual ~XPKPackage();
32 explicit XPKPackage(const base::FilePath& path);
35 // verify the signature in the xpk package
36 virtual bool VerifySignature();
39 std::vector<uint8> signature_;
40 std::vector<uint8> key_;
41 // It's the beginning address of the zip file
45 } // namespace application
48 #endif // XWALK_APPLICATION_BROWSER_INSTALLER_XPK_PACKAGE_H_