Browse Source

generate a isakmpd (host) key; ok henning, deraadt, cedric

OPENBSD_3_6
markus 20 years ago
parent
commit
7cb9289915
1 changed files with 14 additions and 1 deletions
  1. +14
    -1
      src/etc/rc

+ 14
- 1
src/etc/rc View File

@ -1,4 +1,4 @@
# $OpenBSD: rc,v 1.243 2004/04/26 02:00:57 deraadt Exp $
# $OpenBSD: rc,v 1.244 2004/04/27 22:51:28 markus Exp $
# System startup script run by init on autoboot
# or after single-user.
@ -441,6 +441,19 @@ if [ ! -f /etc/ssh/ssh_host_key ]; then
fi
fi
if [ ! -f /etc/isakmpd/private/local.key ]; then
echo -n "openssl: generating new isakmpd RSA key... "
if /usr/sbin/openssl genrsa -out /etc/isakmpd/private/local.key 1024 \
> /dev/null 2>&1; then
chmod 600 /etc/isakmpd/private/local.key
openssl rsa -out /etc/isakmpd/private/local.pub \
-in /etc/isakmpd/private/local.key -pubout > /dev/null 2>&1
echo done.
else
echo failed.
fi
fi
echo -n starting network daemons:
# $routed_flags are imported from /etc/rc.conf.


Loading…
Cancel
Save