summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2020-09-05 21:24:12 +0200
committerPřemysl Eric Janouch <p@janouch.name>2020-09-05 21:32:05 +0200
commit524eea9b2fa3e2cff4617f785c62c80a9feec09b (patch)
tree8d8755e98f5323d44605f22d9a41252a9b7f2320
parent3ce08d33f6bad9931b32082f598b0e98599dd120 (diff)
downloadpdf-simple-sign-524eea9b2fa3e2cff4617f785c62c80a9feec09b.tar.gz
pdf-simple-sign-524eea9b2fa3e2cff4617f785c62c80a9feec09b.tar.xz
pdf-simple-sign-524eea9b2fa3e2cff4617f785c62c80a9feec09b.zip
Manual: fix the example
Things managed to work once but for rather arbitrary reasons.
-rw-r--r--pdf-simple-sign.adoc7
1 files changed, 4 insertions, 3 deletions
diff --git a/pdf-simple-sign.adoc b/pdf-simple-sign.adoc
index 4bc3227..491fa64 100644
--- a/pdf-simple-sign.adoc
+++ b/pdf-simple-sign.adoc
@@ -50,10 +50,11 @@ Examples
Create a self-signed certificate, make a document containing the current date,
sign it and verify the attached signature:
- $ openssl req -newkey rsa:2048 -subj "/CN=Test" -nodes
- -keyout key.pem -x509 -out cert.pem 2>/dev/null
+ $ openssl req -newkey rsa:2048 -subj /CN=Test -nodes \
+ -keyout key.pem -x509 -addext keyUsage=digitalSignature \
+ -out cert.pem 2>/dev/null
$ openssl pkcs12 -inkey key.pem -in cert.pem \
- -export -passout pass:test -out key-cert.p12
+ -export -passout pass: -out key-pair.p12
$ date | groff -T pdf > test.pdf
$ pdf-simple-sign test.pdf test.signed.pdf key-pair.p12 ""
$ pdfsig test.signed.pdf