aboutsummaryrefslogtreecommitdiffstats
path: root/security/openssh
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2001-12-02 04:12:14 +0800
committerdinoex <dinoex@FreeBSD.org>2001-12-02 04:12:14 +0800
commit088f179ada069e0548db768fadb46fb3fb1d3403 (patch)
tree01babfbf9f27b5e0519b67fdb8cd66e055a52d59 /security/openssh
parentb94763c4a3c517198e555dc8ea0df5d729feb5c7 (diff)
downloadfreebsd-ports-gnome-088f179ada069e0548db768fadb46fb3fb1d3403.tar.gz
freebsd-ports-gnome-088f179ada069e0548db768fadb46fb3fb1d3403.tar.zst
freebsd-ports-gnome-088f179ada069e0548db768fadb46fb3fb1d3403.zip
- generate now all 3 host keyes if they don't exists before
- save patchfile from openbsd, it has been removed.
Diffstat (limited to 'security/openssh')
-rw-r--r--security/openssh/Makefile11
-rw-r--r--security/openssh/pkg-plist5
2 files changed, 11 insertions, 5 deletions
diff --git a/security/openssh/Makefile b/security/openssh/Makefile
index dcced01ec6df..d9f2a1d2f466 100644
--- a/security/openssh/Makefile
+++ b/security/openssh/Makefile
@@ -14,7 +14,8 @@ MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/ \
DISTNAME= openssh-${PORTVERSION}
EXTRACT_SUFX= .tgz
-PATCH_SITES= ${MASTER_SITES}
+PATCH_SITES= ${MASTER_SITE_LOCAL}
+PATCH_SITE_SUBDIR=dinoex
PATCHFILES= openbsd2x_3.0.1.patch
MAINTAINER= dinoex@FreeBSD.org
@@ -102,12 +103,16 @@ pre-install:
post-install:
.if !defined(BATCH)
.if !exists(${PREFIX}/etc/ssh_host_key)
- @${ECHO_MSG} ">> Generating an RSA secret host key."
+ @${ECHO_MSG} ">> Generating an RSA1 secret host key."
${PREFIX}/bin/ssh-keygen -N "" -f ${PREFIX}/etc/ssh_host_key
.endif
+.if !exists(${PREFIX}/etc/ssh_host_rsa_key)
+ @${ECHO_MSG} ">> Generating a RSA secret host key."
+ ${PREFIX}/bin/ssh-keygen -t rsa -N "" -f ${PREFIX}/etc/ssh_host_rsa_key
+.endif
.if !exists(${PREFIX}/etc/ssh_host_dsa_key)
@${ECHO_MSG} ">> Generating a DSA secret host key."
- ${PREFIX}/bin/ssh-keygen -d -N "" -f ${PREFIX}/etc/ssh_host_dsa_key
+ ${PREFIX}/bin/ssh-keygen -t dsa -N "" -f ${PREFIX}/etc/ssh_host_dsa_key
.endif
.endif
.if !exists(${PREFIX}/etc/rc.d/sshd.sh)
diff --git a/security/openssh/pkg-plist b/security/openssh/pkg-plist
index da957bc95996..e8e2f4fb57ed 100644
--- a/security/openssh/pkg-plist
+++ b/security/openssh/pkg-plist
@@ -13,6 +13,7 @@ sbin/sshd
libexec/sftp-server
libdata/ssh/Ssh.bin
@dirrm libdata/ssh
-@exec if [ ! -f %D/etc/ssh_host_key ]; then echo ">> Generating a secret RSA host key."; %D/bin/ssh-keygen -N "" -f %D/etc/ssh_host_key; fi
-@exec if [ ! -f %D/etc/ssh_host_dsa_key ]; then echo ">> Generating a secret DSA host key."; %D/bin/ssh-keygen -d -N "" -f %D/etc/ssh_host_dsa_key; fi
+@exec if [ ! -f %D/etc/ssh_host_key ]; then echo ">> Generating a secret RSA1 host key."; %D/bin/ssh-keygen -t rsa1 -N "" -f %D/etc/ssh_host_key; fi
+@exec if [ ! -f %D/etc/ssh_host_rsa_key ]; then echo ">> Generating a secret RSA host key."; %D/bin/ssh-keygen -t rsa -N "" -f %D/etc/ssh_host_rsa_key; fi
+@exec if [ ! -f %D/etc/ssh_host_dsa_key ]; then echo ">> Generating a secret DSA host key."; %D/bin/ssh-keygen -t dsa -N "" -f %D/etc/ssh_host_dsa_key; fi
@exec if [ ! -x %D/etc/rc.d/sshd.sh ]; then echo "#!/bin/sh" > %D/etc/rc.d/sshd.sh && exec echo "[ -x %D/sbin/sshd ] && %D/sbin/sshd && echo -n ' sshd'" >> %D/etc/rc.d/sshd.sh && exec chmod 0555 %D/etc/rc.d/sshd.sh; fi