summaryrefslogtreecommitdiff
path: root/regress/cert-hostkey.sh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-05-17 13:28:36 +1000
committerDarren Tucker <dtucker@zip.com.au>2013-05-17 13:28:36 +1000
commit56347efe796a0506e846621ae65562b978e45f1d (patch)
tree0202d8efec2ba2bd1904f445f4c009ea8a05a091 /regress/cert-hostkey.sh
parent91af05c5167fe0aa5bd41d2e4a83757d9f627c18 (diff)
- dtucker@cvs.openbsd.org 2013/05/17 00:37:40
[regress/agent.sh regress/keytype.sh regress/cfgmatch.sh regress/forcecommand.sh regress/proto-version.sh regress/test-exec.sh regress/cipher-speed.sh regress/cert-hostkey.sh regress/cert-userkey.sh regress/ssh-com.sh] replace 'echo -n' with 'printf' since it's more portable also remove "echon" hack.
Diffstat (limited to 'regress/cert-hostkey.sh')
-rw-r--r--regress/cert-hostkey.sh48
1 files changed, 24 insertions, 24 deletions
diff --git a/regress/cert-hostkey.sh b/regress/cert-hostkey.sh
index 6216abd87..35cd39293 100644
--- a/regress/cert-hostkey.sh
+++ b/regress/cert-hostkey.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: cert-hostkey.sh,v 1.6 2011/05/20 02:43:36 djm Exp $ 1# $OpenBSD: cert-hostkey.sh,v 1.7 2013/05/17 00:37:40 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="certified host keys" 4tid="certified host keys"
@@ -18,8 +18,8 @@ HOSTS='localhost-with-alias,127.0.0.1,::1'
18${SSHKEYGEN} -q -N '' -t rsa -f $OBJ/host_ca_key ||\ 18${SSHKEYGEN} -q -N '' -t rsa -f $OBJ/host_ca_key ||\
19 fail "ssh-keygen of host_ca_key failed" 19 fail "ssh-keygen of host_ca_key failed"
20( 20(
21 echon '@cert-authority ' 21 printf '@cert-authority '
22 echon "$HOSTS " 22 printf "$HOSTS "
23 cat $OBJ/host_ca_key.pub 23 cat $OBJ/host_ca_key.pub
24) > $OBJ/known_hosts-cert 24) > $OBJ/known_hosts-cert
25 25
@@ -66,25 +66,25 @@ done
66 66
67# Revoked certificates with key present 67# Revoked certificates with key present
68( 68(
69 echon '@cert-authority ' 69 printf '@cert-authority '
70 echon "$HOSTS " 70 printf "$HOSTS "
71 cat $OBJ/host_ca_key.pub 71 cat $OBJ/host_ca_key.pub
72 echon '@revoked ' 72 printf '@revoked '
73 echon "* " 73 printf "* "
74 cat $OBJ/cert_host_key_rsa.pub 74 cat $OBJ/cert_host_key_rsa.pub
75 if test "x$TEST_SSH_ECC" = "xyes"; then 75 if test "x$TEST_SSH_ECC" = "xyes"; then
76 echon '@revoked ' 76 printf '@revoked '
77 echon "* " 77 printf "* "
78 cat $OBJ/cert_host_key_ecdsa.pub 78 cat $OBJ/cert_host_key_ecdsa.pub
79 fi 79 fi
80 echon '@revoked ' 80 printf '@revoked '
81 echon "* " 81 printf "* "
82 cat $OBJ/cert_host_key_dsa.pub 82 cat $OBJ/cert_host_key_dsa.pub
83 echon '@revoked ' 83 printf '@revoked '
84 echon "* " 84 printf "* "
85 cat $OBJ/cert_host_key_rsa_v00.pub 85 cat $OBJ/cert_host_key_rsa_v00.pub
86 echon '@revoked ' 86 printf '@revoked '
87 echon "* " 87 printf "* "
88 cat $OBJ/cert_host_key_dsa_v00.pub 88 cat $OBJ/cert_host_key_dsa_v00.pub
89) > $OBJ/known_hosts-cert 89) > $OBJ/known_hosts-cert
90for privsep in yes no ; do 90for privsep in yes no ; do
@@ -108,11 +108,11 @@ done
108 108
109# Revoked CA 109# Revoked CA
110( 110(
111 echon '@cert-authority ' 111 printf '@cert-authority '
112 echon "$HOSTS " 112 printf "$HOSTS "
113 cat $OBJ/host_ca_key.pub 113 cat $OBJ/host_ca_key.pub
114 echon '@revoked ' 114 printf '@revoked '
115 echon "* " 115 printf "* "
116 cat $OBJ/host_ca_key.pub 116 cat $OBJ/host_ca_key.pub
117) > $OBJ/known_hosts-cert 117) > $OBJ/known_hosts-cert
118for ktype in rsa dsa $ecdsa rsa_v00 dsa_v00 ; do 118for ktype in rsa dsa $ecdsa rsa_v00 dsa_v00 ; do
@@ -132,8 +132,8 @@ done
132 132
133# Create a CA key and add it to known hosts 133# Create a CA key and add it to known hosts
134( 134(
135 echon '@cert-authority ' 135 printf '@cert-authority '
136 echon "$HOSTS " 136 printf "$HOSTS "
137 cat $OBJ/host_ca_key.pub 137 cat $OBJ/host_ca_key.pub
138) > $OBJ/known_hosts-cert 138) > $OBJ/known_hosts-cert
139 139
@@ -200,7 +200,7 @@ for v in v01 v00 ; do
200 -n $HOSTS $OBJ/cert_host_key_${ktype} || 200 -n $HOSTS $OBJ/cert_host_key_${ktype} ||
201 fail "couldn't sign cert_host_key_${ktype}" 201 fail "couldn't sign cert_host_key_${ktype}"
202 ( 202 (
203 echon "$HOSTS " 203 printf "$HOSTS "
204 cat $OBJ/cert_host_key_${ktype}.pub 204 cat $OBJ/cert_host_key_${ktype}.pub
205 ) > $OBJ/known_hosts-cert 205 ) > $OBJ/known_hosts-cert
206 ( 206 (
@@ -220,8 +220,8 @@ done
220 220
221# Wrong certificate 221# Wrong certificate
222( 222(
223 echon '@cert-authority ' 223 printf '@cert-authority '
224 echon "$HOSTS " 224 printf "$HOSTS "
225 cat $OBJ/host_ca_key.pub 225 cat $OBJ/host_ca_key.pub
226) > $OBJ/known_hosts-cert 226) > $OBJ/known_hosts-cert
227for v in v01 v00 ; do 227for v in v01 v00 ; do