@mkabatek/pptx-viewer 1.5.3 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -9
- package/package.json +2 -9
- package/node_modules/emf-converter/LICENSE +0 -21
- package/node_modules/emf-converter/README.md +0 -629
- package/node_modules/emf-converter/dist/index.d.mts +0 -86
- package/node_modules/emf-converter/dist/index.d.ts +0 -86
- package/node_modules/emf-converter/dist/index.js +0 -4257
- package/node_modules/emf-converter/dist/index.mjs +0 -4253
- package/node_modules/emf-converter/package.json +0 -53
- package/node_modules/mtx-decompressor/LICENSE +0 -373
- package/node_modules/mtx-decompressor/README.md +0 -271
- package/node_modules/mtx-decompressor/dist/index.d.mts +0 -84
- package/node_modules/mtx-decompressor/dist/index.d.ts +0 -84
- package/node_modules/mtx-decompressor/dist/index.js +0 -1532
- package/node_modules/mtx-decompressor/dist/index.mjs +0 -1528
- package/node_modules/mtx-decompressor/package.json +0 -44
- package/node_modules/pptx-viewer-core/LICENSE +0 -21
- package/node_modules/pptx-viewer-core/NOTICE +0 -16
- package/node_modules/pptx-viewer-core/README.md +0 -1294
- package/node_modules/pptx-viewer-core/dist/SvgExporter-BtZczTlB.d.ts +0 -557
- package/node_modules/pptx-viewer-core/dist/SvgExporter-D4mBWJHE.d.mts +0 -557
- package/node_modules/pptx-viewer-core/dist/cli/index.d.mts +0 -150
- package/node_modules/pptx-viewer-core/dist/cli/index.d.ts +0 -150
- package/node_modules/pptx-viewer-core/dist/cli/index.js +0 -0
- package/node_modules/pptx-viewer-core/dist/cli/index.mjs +0 -0
- package/node_modules/pptx-viewer-core/dist/converter/index.d.mts +0 -48
- package/node_modules/pptx-viewer-core/dist/converter/index.d.ts +0 -48
- package/node_modules/pptx-viewer-core/dist/converter/index.js +0 -0
- package/node_modules/pptx-viewer-core/dist/converter/index.mjs +0 -0
- package/node_modules/pptx-viewer-core/dist/index.d.mts +0 -12744
- package/node_modules/pptx-viewer-core/dist/index.d.ts +0 -12744
- package/node_modules/pptx-viewer-core/dist/index.js +0 -66894
- package/node_modules/pptx-viewer-core/dist/index.mjs +0 -66420
- package/node_modules/pptx-viewer-core/dist/presentation-nZxgWvXq.d.mts +0 -5645
- package/node_modules/pptx-viewer-core/dist/presentation-nZxgWvXq.d.ts +0 -5645
- package/node_modules/pptx-viewer-core/dist/signature-inspection-status-BCUpfCQh.d.mts +0 -220
- package/node_modules/pptx-viewer-core/dist/signature-inspection-status-BCUpfCQh.d.ts +0 -220
- package/node_modules/pptx-viewer-core/dist/signature-node/index.d.mts +0 -177
- package/node_modules/pptx-viewer-core/dist/signature-node/index.d.ts +0 -177
- package/node_modules/pptx-viewer-core/dist/signature-node/index.js +0 -1206
- package/node_modules/pptx-viewer-core/dist/signature-node/index.mjs +0 -1143
- package/node_modules/pptx-viewer-core/dist/text-operations-DCTGMltY.d.mts +0 -134
- package/node_modules/pptx-viewer-core/dist/text-operations-DYmhoi7U.d.ts +0 -134
- package/node_modules/pptx-viewer-core/package.json +0 -96
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { p as SignatureCertificateInfo, L as LoadedSigningMaterial, C as CertificateRevocationStatus, T as TimestampAuthorityStatus, r as SignatureValidationPolicy, k as ParsedReferenceTransform, R as ReferenceTransformResult, q as SignatureReferenceCheck, l as SignOptions, m as SignResult, d as DigitalSignatureReport } from '../signature-inspection-status-BCUpfCQh.js';
|
|
2
|
-
export { D as DIGEST_ALGORITHM_TO_HASH, a as DIGEST_ALGORITHM_TO_WEB_CRYPTO, b as DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, c as DIGITAL_SIGNATURE_REL_TYPE, e as DigitalSignatureVerificationStatus, E as ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, f as ENTERPRISE_REQUIRE_REVOCATION_ENV, g as ENTERPRISE_REQUIRE_TIMESTAMP_ENV, h as ENTERPRISE_TRUST_ROOTS_FILE_ENV, i as ENTERPRISE_TRUST_ROOTS_PEM_ENV, O as OPC_RELATIONSHIP_TRANSFORM, j as OfficeSignatureReference, P as PPTX_VIEWER_MANIFEST_NS, S as SUPPORTED_XML_CANON_TRANSFORMS, n as SignatureDetail, o as SignatureDetailStatus, X as XMLDSIG_NS, s as XML_TRANSFORM_ENVELOPED_SIGNATURE, t as computeDetailStatus, u as computeDigestBase64WebCrypto, v as computeVerificationStatus, w as escapeXmlAttr, x as escapeXmlText, y as extractAllTagText, z as extractFirstTagText, A as extractTagAttribute, B as isValidBase64, F as normalizePartPath, G as resolveReferenceUriToPart } from '../signature-inspection-status-BCUpfCQh.js';
|
|
3
|
-
import JSZip from 'jszip';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* XML canonicalization and DOM navigation utilities for digital signatures.
|
|
7
|
-
*
|
|
8
|
-
* Node-only — depends on `@xmldom/xmldom` and `xml-crypto`.
|
|
9
|
-
*/
|
|
10
|
-
/** Get the local name of a DOM node, stripping any namespace prefix. */
|
|
11
|
-
declare function getNodeLocalName(node: Node): string;
|
|
12
|
-
/**
|
|
13
|
-
* Find the first descendant element matching a local name,
|
|
14
|
-
* ignoring namespace prefixes.
|
|
15
|
-
*/
|
|
16
|
-
declare function getFirstDescendantElementByLocalName(parent: Document | Element, localName: string): Element | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Canonicalize a DOM node using the specified canonicalization algorithm.
|
|
19
|
-
* Delegates to xml-crypto's C14N implementation.
|
|
20
|
-
*/
|
|
21
|
-
declare function canonicalizeNode(node: Node, algorithm: string): string;
|
|
22
|
-
/**
|
|
23
|
-
* Canonicalize a `<SignedInfo>` XML fragment for signature verification.
|
|
24
|
-
* Uses Exclusive XML Canonicalization (exc-c14n#).
|
|
25
|
-
*/
|
|
26
|
-
declare function canonicalizeSignedInfoXml(signedInfoXml: string): string;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Certificate handling utilities for digital signature processing.
|
|
30
|
-
*
|
|
31
|
-
* Node-only — depends on `node:crypto`, `node:tls`, `node-forge`, `@xmldom/xmldom`.
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/** Extract certificate metadata from a Base64-encoded DER certificate. */
|
|
35
|
-
declare function certificateInfoFromBase64(certBase64: string): SignatureCertificateInfo | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* Validate a certificate chain against system trust roots and optional additional roots.
|
|
38
|
-
*/
|
|
39
|
-
declare function validateCertificateChain(certBase64List: string[], additionalRootsPem: string[]): {
|
|
40
|
-
status: 'trusted' | 'untrusted' | 'not-checked';
|
|
41
|
-
error?: string;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Cryptographically verify the SignatureValue in an XML signature
|
|
45
|
-
* using the embedded certificate.
|
|
46
|
-
*/
|
|
47
|
-
declare function verifySignatureValue(signatureXml: string, certBase64List: string[]): 'verified' | 'invalid' | 'not-checked';
|
|
48
|
-
/**
|
|
49
|
-
* Load a private key and certificate from a PKCS#12 (.pfx/.p12) or PEM buffer.
|
|
50
|
-
*/
|
|
51
|
-
declare function loadSigningMaterialFromBuffer(certificateBuffer: Uint8Array, certificatePath: string, certificatePassword?: string): LoadedSigningMaterial;
|
|
52
|
-
/** Convert a PEM certificate to Base64-encoded DER (strip armour + whitespace). */
|
|
53
|
-
declare function pemCertificateToBase64(pem: string): string;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* PKI validation utilities — certificate revocation (OCSP) and
|
|
57
|
-
* timestamp-authority evaluation for OOXML digital signatures.
|
|
58
|
-
*
|
|
59
|
-
* Node-only — depends on `node:crypto`, `node:http`, `node:https`, and `node-forge`.
|
|
60
|
-
*/
|
|
61
|
-
|
|
62
|
-
/** Wrap a Base64-encoded DER certificate in PEM armour. */
|
|
63
|
-
declare function certPemFromBase64(certBase64: string): string | undefined;
|
|
64
|
-
/** SHA-256 fingerprint of a PEM certificate (lowercase hex, no colons). */
|
|
65
|
-
declare function certFingerprintSha256(certPem: string): string | undefined;
|
|
66
|
-
declare function extractOcspUrls(certPem: string): string[];
|
|
67
|
-
declare function buildOcspRequestDer(leafPem: string, issuerPem: string): Buffer | undefined;
|
|
68
|
-
declare function parseOcspResponseStatus(data: Buffer): CertificateRevocationStatus;
|
|
69
|
-
declare function evaluateCertificateRevocation(leafCertPem: string, issuerCertPem: string | undefined): Promise<{
|
|
70
|
-
status: CertificateRevocationStatus;
|
|
71
|
-
error?: string;
|
|
72
|
-
checkedOcspUrls: string[];
|
|
73
|
-
checkedCrlUrls: string[];
|
|
74
|
-
}>;
|
|
75
|
-
declare function evaluateTimestampAuthority(signatureXml: string): Promise<{
|
|
76
|
-
status: TimestampAuthorityStatus;
|
|
77
|
-
error?: string;
|
|
78
|
-
}>;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Environment-based configuration for digital signature validation.
|
|
82
|
-
*
|
|
83
|
-
* Node-only — reads trust roots from the file system and validation
|
|
84
|
-
* policy from environment variables.
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
|
-
/** Extract individual PEM certificates from a text block. */
|
|
88
|
-
declare function extractPemCertificatesFromText(text: string): string[];
|
|
89
|
-
/**
|
|
90
|
-
* Load enterprise trust root certificates from environment-configured sources.
|
|
91
|
-
*
|
|
92
|
-
* Checks `PPTX_VIEWER_TRUST_ROOTS_PEM` for inline PEM data and
|
|
93
|
-
* `PPTX_VIEWER_TRUST_ROOTS_FILE` for file paths (semicolon/comma-separated).
|
|
94
|
-
*/
|
|
95
|
-
declare function loadEnterpriseTrustRoots(): Promise<string[]>;
|
|
96
|
-
/**
|
|
97
|
-
* Read the signature validation policy from environment variables.
|
|
98
|
-
*/
|
|
99
|
-
declare function getSignatureValidationPolicy(): SignatureValidationPolicy;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* XML reference transform processing for digital signature verification.
|
|
103
|
-
*
|
|
104
|
-
* Node-only — depends on `@xmldom/xmldom` for DOM parsing and
|
|
105
|
-
* `xml-crypto` (via xml-canonicalization) for C14N transforms.
|
|
106
|
-
*/
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Parse `<ds:Transform>` elements from a `<ds:Reference>` node.
|
|
110
|
-
*/
|
|
111
|
-
declare function extractReferenceTransforms(referenceNode: Element): ParsedReferenceTransform[];
|
|
112
|
-
/**
|
|
113
|
-
* Apply a chain of transforms to binary part data.
|
|
114
|
-
* Supports OPC Relationship Transform and XML canonicalization algorithms.
|
|
115
|
-
*/
|
|
116
|
-
declare function applyReferenceTransforms(partBytes: Uint8Array, transforms: ParsedReferenceTransform[]): ReferenceTransformResult;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Full reference digest verification for digital signatures.
|
|
120
|
-
*
|
|
121
|
-
* Node-only — uses `node:crypto` for synchronous hashing,
|
|
122
|
-
* `jszip` for ZIP access, and `@xmldom/xmldom` for DOM parsing.
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Compute a Base64-encoded digest using Node.js `crypto` (synchronous).
|
|
127
|
-
*/
|
|
128
|
-
declare function computeDigestBase64(content: Uint8Array, digestAlgorithmUri: string): string | undefined;
|
|
129
|
-
/**
|
|
130
|
-
* Verify all `<ds:Reference>` digests in an XML signature.
|
|
131
|
-
*/
|
|
132
|
-
declare function buildReferenceChecksFromSignatureXml(zip: JSZip, signatureXml: string): Promise<SignatureReferenceCheck[]>;
|
|
133
|
-
/**
|
|
134
|
-
* Verify references from a PptxViewer manifest extension in the signature XML.
|
|
135
|
-
*/
|
|
136
|
-
declare function buildReferenceChecksFromPptxViewerManifest(zip: JSZip, signatureXml: string): Promise<SignatureReferenceCheck[]>;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* PPTX digital signature creation.
|
|
140
|
-
*
|
|
141
|
-
* Node-only — signs all content in a PPTX package with a certificate
|
|
142
|
-
* and returns the signed data along with a verification report.
|
|
143
|
-
*/
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Sign all content in a PPTX package with a certificate.
|
|
147
|
-
*
|
|
148
|
-
* Removes any existing signatures, creates a new XML-DSig signature
|
|
149
|
-
* covering all non-signature parts, and returns the signed data
|
|
150
|
-
* along with a post-sign verification report.
|
|
151
|
-
*/
|
|
152
|
-
declare function signPptxWithCertificate(data: Uint8Array, certificateBuffer: Uint8Array, options: SignOptions): Promise<SignResult>;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Full PPTX digital signature inspection (Node-only).
|
|
156
|
-
*
|
|
157
|
-
* Orchestrates all sub-modules to analyze every signature in a PPTX package:
|
|
158
|
-
* reference digest checks, certificate chain validation, OCSP revocation,
|
|
159
|
-
* and timestamp authority evaluation.
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Inspect all digital signatures in a PPTX package.
|
|
164
|
-
*
|
|
165
|
-
* Performs full cryptographic verification including:
|
|
166
|
-
* - Reference digest checks (standard XML-DSig + PptxViewer manifest)
|
|
167
|
-
* - Signature value verification (RSA-SHA256/384/512)
|
|
168
|
-
* - Certificate chain validation against system + enterprise trust roots
|
|
169
|
-
* - OCSP revocation checking
|
|
170
|
-
* - Timestamp authority evaluation
|
|
171
|
-
*
|
|
172
|
-
* @param data - The raw PPTX file bytes.
|
|
173
|
-
* @returns A comprehensive digital signature report.
|
|
174
|
-
*/
|
|
175
|
-
declare function inspectPptxDigitalSignatures(data: Uint8Array): Promise<DigitalSignatureReport>;
|
|
176
|
-
|
|
177
|
-
export { CertificateRevocationStatus, DigitalSignatureReport, LoadedSigningMaterial, ParsedReferenceTransform, ReferenceTransformResult, SignOptions, SignResult, SignatureCertificateInfo, SignatureReferenceCheck, SignatureValidationPolicy, TimestampAuthorityStatus, applyReferenceTransforms, buildOcspRequestDer, buildReferenceChecksFromPptxViewerManifest, buildReferenceChecksFromSignatureXml, canonicalizeNode, canonicalizeSignedInfoXml, certFingerprintSha256, certPemFromBase64, certificateInfoFromBase64, computeDigestBase64, evaluateCertificateRevocation, evaluateTimestampAuthority, extractOcspUrls, extractPemCertificatesFromText, extractReferenceTransforms, getFirstDescendantElementByLocalName, getNodeLocalName, getSignatureValidationPolicy, inspectPptxDigitalSignatures, loadEnterpriseTrustRoots, loadSigningMaterialFromBuffer, parseOcspResponseStatus, pemCertificateToBase64, signPptxWithCertificate, validateCertificateChain, verifySignatureValue };
|