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

View File

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

View File

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