summaryrefslogtreecommitdiff
path: root/examples/vrfy.sig
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xexamples/vrfy.sig6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/vrfy.sig b/examples/vrfy.sig
index 94daf43..cf60995 100755
--- a/examples/vrfy.sig
+++ b/examples/vrfy.sig
@@ -3,11 +3,11 @@
3-- Example public-key signature verification. 3-- Example public-key signature verification.
4-- 4--
5 5
6local pubkey = require"openssl.pubkey" 6local pkey = require"openssl.pkey"
7local digest = require"openssl.digest" 7local digest = require"openssl.digest"
8 8
9-- generate a public/private key pair 9-- generate a public/private key pair
10local key = pubkey.new{ type = "EC", curve = "prime192v1" } 10local key = pkey.new{ type = "EC", curve = "prime192v1" }
11 11
12-- digest our message using an appropriate digest ("ecdsa-with-SHA1" for EC; 12-- digest our message using an appropriate digest ("ecdsa-with-SHA1" for EC;
13-- "dss1" for DSA; and "sha1", "sha256", etc for RSA). 13-- "dss1" for DSA; and "sha1", "sha256", etc for RSA).
@@ -19,7 +19,7 @@ local sig = key:sign(data)
19 19
20-- to prove verification works, instantiate a new object holding just 20-- to prove verification works, instantiate a new object holding just
21-- the public key 21-- the public key
22local pub = pubkey.new(key:toPEM"public") 22local pub = pkey.new(key:toPEM"public")
23 23
24-- a utility routine to output our signature 24-- a utility routine to output our signature
25local function tohex(b) 25local function tohex(b)