Magellan Linux

Contents of /mcore-src/trunk/mcore-tools/nsslsay

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2047 - (show annotations) (download)
Wed May 8 11:07:44 2013 UTC (11 years ago) by niro
File size: 569 byte(s)
-added nsslsay helper script
1 #!/bin/sh
2
3 : ${IP="192.168.0.14"}
4 : ${PORT="6666"}
5 : ${SSLSAY_USER="mcore"}
6 : ${SSLSAY_PASS="foobar"}
7 : ${QUIET=""}
8 : ${NOCOLORS=""}
9 : ${WEBCRLF=""}
10 : ${MROOT=""}
11
12 nsslsay()
13 {
14 local message
15
16 [[ ${QUIET} = true ]] && message+="quiet"$'\n'
17 [[ ${NOCOLORS} = true ]] && message+="nocolors"$'\n'
18 [[ ${WEBCRLF} = true ]] && message+="webcrlf"$'\n'
19
20 message+="auth ${SSLSAY_USER} ${SSLSAY_PASS}"$'\n'
21 [[ ! -z ${MROOT} ]] && message+="set daemon.mroot ${MROOT}"$'\n'
22 message+="$@"$'\n'
23 message+="quit"$'\n'
24
25 nssl "${IP}" "${PORT}" << EOF
26 ${message}
27 EOF
28
29 }
30
31 nsslsay $@