summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio/axtls-root
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-03-04 18:30:56 +0000
committerSteven Barth <steven@midlink.org>2009-03-04 18:30:56 +0000
commitf1b667fc6fd9e9d8eab8a90f5f8f2f4346364597 (patch)
tree82078481c1fd03da44e37c3c64434e729c8db7c5 /libs/nixio/axtls-root
parentfc45514531d686dbea23c963c65f1bd627be9d24 (diff)
nixio: Fix generation of private key for axtls
Diffstat (limited to 'libs/nixio/axtls-root')
-rwxr-xr-xlibs/nixio/axtls-root/usr/sbin/nixio-axtls-checkkey4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/nixio/axtls-root/usr/sbin/nixio-axtls-checkkey b/libs/nixio/axtls-root/usr/sbin/nixio-axtls-checkkey
index 994f24e7b..4bfee88b0 100755
--- a/libs/nixio/axtls-root/usr/sbin/nixio-axtls-checkkey
+++ b/libs/nixio/axtls-root/usr/sbin/nixio-axtls-checkkey
@@ -6,11 +6,11 @@ if not defkey or io.open(defkey) then
os.exit(0)
end
-if os.execute("which openssl") then
+if os.execute("which openssl >/dev/null") == 0 then
io.stderr:write("Warning: OpenSSL detected "..
"but it looks like nixio was linked against axtls\n")
os.execute("umask 0077;openssl genrsa -out '" .. defkey .. "' 2048")
-elseif os.execute("which dropbearkey && which dropbearconvert") then
+elseif os.execute("which dropbearkey >/dev/null && which dropbearconvert >/dev/null") == 0 then
os.execute("dropbearkey -t rsa -s 2048 -f /tmp/dbkey.rsa")
os.execute("umask 0077;dropbearconvert dropbear openssh /tmp/dbkey.rsa '"..defkey.."'")
os.remove("/tmp/dbkey.rsa")