test29-pem-dir.sh (hitch-1.7.0) | : | test29-pem-dir.sh (hitch-1.7.2) | ||
---|---|---|---|---|
skipping to change at line 26 | skipping to change at line 26 | |||
start_hitch --config=hitch.cfg | start_hitch --config=hitch.cfg | |||
if openssl s_client -help 2>&1 | grep -q -e -noservername; | if openssl s_client -help 2>&1 | grep -q -e -noservername; | |||
then | then | |||
NOSNI="-noservername" | NOSNI="-noservername" | |||
else | else | |||
NOSNI="" | NOSNI="" | |||
fi | fi | |||
s_client -servername site1.example.com -connect localhost:$LISTENPORT >site1.dum p | s_client -servername site1.example.com -connect localhost:$LISTENPORT >site1.dum p | |||
subj_name_eq "site1.example.com" site1.dump | subject_field_eq CN "site1.example.com" site1.dump | |||
s_client -servername site2.example.com -connect localhost:$LISTENPORT >site2.dum p | s_client -servername site2.example.com -connect localhost:$LISTENPORT >site2.dum p | |||
subj_name_eq "site2.example.com" site2.dump | subject_field_eq CN "site2.example.com" site2.dump | |||
s_client -servername default.example.com -connect localhost:$LISTENPORT >default .dump | s_client -servername default.example.com -connect localhost:$LISTENPORT >default .dump | |||
subj_name_eq "default.example.com" default.dump | subject_field_eq CN "default.example.com" default.dump | |||
! s_client -servername invalid.example.com -connect localhost:$LISTENPORT >unkno wn.dump | ! s_client -servername invalid.example.com -connect localhost:$LISTENPORT >unkno wn.dump | |||
run_cmd grep 'unrecognized name' unknown.dump | run_cmd grep 'unrecognized name' unknown.dump | |||
stop_hitch | stop_hitch | |||
cat >hitch.cfg <<EOF | cat >hitch.cfg <<EOF | |||
frontend = { | frontend = { | |||
host = "localhost" | host = "localhost" | |||
port = "$LISTENPORT" | port = "$LISTENPORT" | |||
} | } | |||
pem-dir = "${CERTSDIR}/pemdirtest" | pem-dir = "${CERTSDIR}/pemdirtest" | |||
pem-dir-glob = "*site*" | pem-dir-glob = "*site*" | |||
sni-nomatch-abort = on | sni-nomatch-abort = on | |||
EOF | EOF | |||
start_hitch --config=hitch.cfg | start_hitch --config=hitch.cfg | |||
s_client -servername site1.example.com -connect localhost:$LISTENPORT >site1.dum p | s_client -servername site1.example.com -connect localhost:$LISTENPORT >site1.dum p | |||
subj_name_eq "site1.example.com" site1.dump | subject_field_eq CN "site1.example.com" site1.dump | |||
s_client -servername site2.example.com -connect localhost:$LISTENPORT >site2.dum p | s_client -servername site2.example.com -connect localhost:$LISTENPORT >site2.dum p | |||
subj_name_eq "site2.example.com" site2.dump | subject_field_eq CN "site2.example.com" site2.dump | |||
s_client -servername site3.example.com -connect localhost:$LISTENPORT >site3.dum p | s_client -servername site3.example.com -connect localhost:$LISTENPORT >site3.dum p | |||
subj_name_eq "site3.example.com" site3.dump | subject_field_eq CN "site3.example.com" site3.dump | |||
! s_client -servername default.example.com -connect localhost:$LISTENPORT >defau lt.dump | ! s_client -servername default.example.com -connect localhost:$LISTENPORT >defau lt.dump | |||
run_cmd grep 'unrecognized name' unknown.dump | run_cmd grep 'unrecognized name' unknown.dump | |||
s_client $NOSNI >cfg-no-sni.dump | s_client $NOSNI >cfg-no-sni.dump | |||
subj_name_eq "site1.example.com" cfg-no-sni.dump | subject_field_eq CN "site1.example.com" cfg-no-sni.dump | |||
End of changes. 7 change blocks. | ||||
6 lines changed or deleted | 6 lines changed or added |