aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatarLibravatar william <william@25tandclement.com> 2014-03-27 23:02:32 -0700
committerLibravatarLibravatar william <william@25tandclement.com> 2014-03-27 23:02:32 -0700
commitf6a21f8cd2bc3325a81d85ff58611db000a1f491 (patch)
tree22fef841067bc26a97b7b7064a6d8ccb94970bdd /examples
parent47532cac8cdd5d697a56445e5946703de13b19d8 (diff)
downloadluaossl-f6a21f8cd2bc3325a81d85ff58611db000a1f491.tar.gz
luaossl-f6a21f8cd2bc3325a81d85ff58611db000a1f491.tar.bz2
luaossl-f6a21f8cd2bc3325a81d85ff58611db000a1f491.zip
fixup examples/ for pubkey -> pkey changes
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/self.x5098
-rwxr-xr-xexamples/vrfy.sig6
2 files changed, 7 insertions, 7 deletions
diff --git a/examples/self.x509 b/examples/self.x509
index 39525d0..31d6058 100755
--- a/examples/self.x509
+++ b/examples/self.x509
@@ -7,15 +7,15 @@
-- CSR generation.
--
-local pubkey = require"openssl.pubkey"
+local pkey = require"openssl.pkey"
local x509 = require"openssl.x509"
local name = require"openssl.x509.name"
local altname = require"openssl.x509.altname"
-- generate our public/private key pair
---local key = pubkey.new{ type = "RSA", bits = 1024 }
---local key = pubkey.new{ type = "DSA", bits = 1024 }
-local key = pubkey.new{ type = "EC", curve = "prime192v1" }
+--local key = pkey.new{ type = "RSA", bits = 1024 }
+--local key = pkey.new{ type = "DSA", bits = 1024 }
+local key = pkey.new{ type = "EC", curve = "prime192v1" }
-- our Subject and Issuer DN (self-signed, so same)
local dn = name.new()
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 @@
-- Example public-key signature verification.
--
-local pubkey = require"openssl.pubkey"
+local pkey = require"openssl.pkey"
local digest = require"openssl.digest"
-- generate a public/private key pair
-local key = pubkey.new{ type = "EC", curve = "prime192v1" }
+local key = pkey.new{ type = "EC", curve = "prime192v1" }
-- digest our message using an appropriate digest ("ecdsa-with-SHA1" for EC;
-- "dss1" for DSA; and "sha1", "sha256", etc for RSA).
@@ -19,7 +19,7 @@ local sig = key:sign(data)
-- to prove verification works, instantiate a new object holding just
-- the public key
-local pub = pubkey.new(key:toPEM"public")
+local pub = pkey.new(key:toPEM"public")
-- a utility routine to output our signature
local function tohex(b)