New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-signpdf

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-signpdf - npm Package Compare versions

Comparing version

to
1.5.1

4

CHANGELOG.md
# CHANGELOG
## [1.5.1]
* Reorder authenticatedAttributes so that EU's verification passes;
## [1.5.0]

@@ -4,0 +8,0 @@

@@ -26,1 +26,4 @@ # Contributing

* [dhensby](https://github.com/dhensby)
* [pernikov](https://github.com/pernikov)
* [timotheeg](https://github.com/timotheeg)
* [ElTimuro](https://github.com/ElTimuro)

9

dist/signpdf.js

@@ -143,2 +143,5 @@ "use strict";

} // Add a sha256 signer. That's what Adobe.PPKLite adbe.pkcs7.detached expects.
// Note that the authenticatedAttributes order is relevant for correct
// EU signature validation:
// https://ec.europa.eu/digital-building-blocks/DSS/webapp-demo/validation

@@ -154,5 +157,2 @@

}, {
type: _nodeForge.default.pki.oids.messageDigest // value will be auto-populated at signing time
}, {
type: _nodeForge.default.pki.oids.signingTime,

@@ -163,2 +163,5 @@ // value can also be auto-populated at signing time

value: new Date()
}, {
type: _nodeForge.default.pki.oids.messageDigest // value will be auto-populated at signing time
}]

@@ -165,0 +168,0 @@ }); // Sign in detached mode.

{
"name": "node-signpdf",
"version": "1.5.0",
"version": "1.5.1",
"description": "Simple signing of PDFs in node.",

@@ -5,0 +5,0 @@ "repository": {

@@ -35,3 +35,3 @@ # ![node-signpdf](https://raw.githubusercontent.com/vbuch/node-signpdf/master/resources/logo-horizontal.svg?sanitize=true)

You have already created a PDF using foliojs/pdfkit and you want to sign that. Before saving (writing to fs, or just converting to `Buffer`) your file, you need to a add a signature placeholder to it. We have a helper for that. This is demonstrated in [the `signs input PDF` test](./src/signpdf.test.js#L111).
You have already created a PDF using foliojs/pdfkit and you want to sign that. Before saving (writing to fs, or just converting to `Buffer`) your file, you need to a add a signature placeholder to it. We have a helper for that. This is demonstrated in [the `signs input PDF` test](./src/signpdf.test.js#L125).

@@ -42,3 +42,3 @@ Once you have the placeholder, just [[sign the document]](#sign-the-document).

Yes. This is new since version 1.0. We have a helper that can add a signature placeholder in at least the most basic PDFs without depending on pdfkit. You can see how this is done in [the `signs a ready pdf` test](./src/signpdf.test.js#L136).
Yes. This is new since version 1.0. We have a helper that can add a signature placeholder in at least the most basic PDFs without depending on pdfkit. You can see how this is done in [the `signs a ready pdf` test](./src/signpdf.test.js#L167).

@@ -60,3 +60,3 @@ Once you have the placeholder, just [[sign the document]](#sign-the-document).

* The process of signing a document is described in the [Digital Signatures in PDF](https://www.adobe.com/devnet-docs/etk_deprecated/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf) document. As Adobe's files are deprecated, [here is the standard as defined by ETSI](https://ec.europa.eu/cefdigital/wiki/display/CEFDIGITAL/eSignature+standards#eSignaturestandards-PAdES%28PDFAdvancedElectronicSignature%29BaselineProfile).
* The process of signing a document is described in the [Digital Signatures in PDF](https://www.adobe.com/devnet-docs/etk_deprecated/tools/DigSig/Acrobat_DigitalSignatures_in_PDF.pdf) document. As Adobe's files are deprecated, [here is the standard as defined by ETSI](<https://ec.europa.eu/digital-building-blocks/wikis/display/DIGITAL/Standards+and+specifications#Standardsandspecifications-PAdES(PDFAdvancedElectronicSignature)BaselineProfile>).
* This lib:

@@ -63,0 +63,0 @@ * requires the [signature placeholder](#append-a-signature-placeholder) to already be in the document (There are helpers included that can try to add it);

@@ -131,2 +131,5 @@ import forge from 'node-forge';

// Add a sha256 signer. That's what Adobe.PPKLite adbe.pkcs7.detached expects.
// Note that the authenticatedAttributes order is relevant for correct
// EU signature validation:
// https://ec.europa.eu/digital-building-blocks/DSS/webapp-demo/validation
p7.addSigner({

@@ -141,5 +144,2 @@ key: privateKey,

}, {
type: forge.pki.oids.messageDigest,
// value will be auto-populated at signing time
}, {
type: forge.pki.oids.signingTime,

@@ -150,2 +150,5 @@ // value can also be auto-populated at signing time

value: new Date(),
}, {
type: forge.pki.oids.messageDigest,
// value will be auto-populated at signing time
},

@@ -152,0 +155,0 @@ ],

Sorry, the diff of this file is not supported yet