mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 10:14:55 +00:00
The old (v2.0) parser is compatible with new (v2.1) structs. That is, this won't break existing firmware or vbutil_firmware. A new (v2.1) parser parsing an old (v2.0) struct will return 0 for the flags. This will be used to support the RO-normal code path in a subsequent CL. BUG=chromium-os:17304 TEST=added unit tests; make && make runtests Change-Id: I73bcd8acd3330b0d7d143061b5ef838e6d79cf1a Reviewed-on: http://gerrit.chromium.org/gerrit/4030 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
54 lines
1.1 KiB
C
54 lines
1.1 KiB
C
/* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
#include <stdio.h>
|
|
|
|
#include "host_common.h"
|
|
#include "file_keys.h"
|
|
#include "signature_digest.h"
|
|
|
|
int main(void)
|
|
{
|
|
/* host_key.h */
|
|
PrivateKeyReadPem(0, 0);
|
|
PrivateKeyFree(0);
|
|
PublicKeyAlloc(0, 0, 0);
|
|
PublicKeyRead(0);
|
|
PublicKeyReadKeyb(0, 0, 0);
|
|
PublicKeyWrite(0, 0);
|
|
|
|
/* host_keyblock.h */
|
|
KeyBlockCreate(0, 0, 0);
|
|
KeyBlockRead(0);
|
|
KeyBlockWrite(0, 0);
|
|
|
|
/* host_misc.h */
|
|
ReadFile(0, 0);
|
|
WriteFile(0, 0, 0);
|
|
|
|
/* host_signature.h */
|
|
SignatureInit(0, 0, 0, 0);
|
|
SignatureAlloc(0, 0);
|
|
SignatureCopy(0, 0);
|
|
CalculateChecksum(0, 0);
|
|
CalculateSignature(0, 0, 0);
|
|
|
|
/* host_common.h */
|
|
CreateFirmwarePreamble(0, 0, 0, 0, 0);
|
|
CreateKernelPreamble(0, 0, 0, 0, 0, 0, 0);
|
|
|
|
/* file_keys.h */
|
|
BufferFromFile(0, 0);
|
|
RSAPublicKeyFromFile(0);
|
|
DigestFile(0, 0);
|
|
SignatureFile(0, 0, 0);
|
|
|
|
/* signature_digest.h */
|
|
PrependDigestInfo(0, 0);
|
|
SignatureDigest(0, 0, 0);
|
|
SignatureBuf(0, 0, 0, 0);
|
|
|
|
return 0;
|
|
}
|