diff options
author | Steven Barth <steven@midlink.org> | 2009-05-28 07:21:22 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-05-28 07:21:22 +0000 |
commit | 658b3db2da59440ee8fd24cfee5d849a11055261 (patch) | |
tree | 451f3d0e27e83345d507b86043c86eb3a77fb7ae /libs/nixio/axtls-root/usr | |
parent | b3825387988fc9280843028b9a967eb03dd378d3 (diff) |
Würg around some nasty axTLS keying bugs
Diffstat (limited to 'libs/nixio/axtls-root/usr')
-rwxr-xr-x | libs/nixio/axtls-root/usr/sbin/nixio-axtls-checkkey | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/nixio/axtls-root/usr/sbin/nixio-axtls-checkkey b/libs/nixio/axtls-root/usr/sbin/nixio-axtls-checkkey index 4bfee88b02..22bb1f8cc5 100755 --- a/libs/nixio/axtls-root/usr/sbin/nixio-axtls-checkkey +++ b/libs/nixio/axtls-root/usr/sbin/nixio-axtls-checkkey @@ -1,8 +1,12 @@ #!/usr/bin/lua local nixio = require "nixio" +local fs = require "nixio.fs" local posix local defkey = nixio.meta_tls_context.tls_defaultkey -if not defkey or io.open(defkey) then +local okey = "646e6b90d1ad02719cb1b221b7ce447a" + +if (not defkey or io.open(defkey)) and +not (nixio.crypto.hash("md5"):update(fs.readfile(defkey)):final()) == okey then os.exit(0) end |