Removed Schemas.Manifest

This commit is contained in:
Alexander Cerutti
2021-09-30 22:44:20 +02:00
parent 342f3934b8
commit 38fe473f07
3 changed files with 13 additions and 17 deletions

View File

@@ -481,8 +481,9 @@ export default class PKPass extends Bundle {
} }
private [createManifestSymbol]() { private [createManifestSymbol]() {
return Object.entries(this[filesSymbol]).reduce<Schemas.Manifest>( return Object.entries(this[filesSymbol]).reduce<{
(acc, [fileName, buffer]) => { [key: string]: string;
}>((acc, [fileName, buffer]) => {
const hashFlow = forge.md.sha1.create(); const hashFlow = forge.md.sha1.create();
hashFlow.update(buffer.toString("binary")); hashFlow.update(buffer.toString("binary"));
@@ -491,9 +492,7 @@ export default class PKPass extends Bundle {
...acc, ...acc,
[fileName]: hashFlow.digest().toHex(), [fileName]: hashFlow.digest().toHex(),
}; };
}, }, {});
{},
);
} }
private [closePassSymbol]() { private [closePassSymbol]() {

View File

@@ -21,9 +21,6 @@ import { Semantics } from "./SemanticTags";
const schemaDebug = debug("Schema"); const schemaDebug = debug("Schema");
export interface Manifest {
[key: string]: string;
}
/* export interface Certificates { /* export interface Certificates {
wwdr?: string; wwdr?: string;

View File

@@ -5,12 +5,12 @@ import type * as Schemas from "./schemas";
* Generates the PKCS #7 cryptografic signature for the manifest file. * Generates the PKCS #7 cryptografic signature for the manifest file.
* *
* @method create * @method create
* @params {Object} manifest - Manifest content. * @params manifest - Manifest content.
* @returns {Buffer} * @returns
*/ */
export function create( export function create(
manifest: Schemas.Manifest, manifest: { [key: string]: string },
certificates: Schemas.CertificatesSchema, certificates: Schemas.CertificatesSchema,
): Buffer { ): Buffer {
const signature = forge.pkcs7.createSignedData(); const signature = forge.pkcs7.createSignedData();