Use openssl s_client instead of ncat

This commit is contained in:
cel 2019-11-06 10:02:16 -10:00
parent 41a475909d
commit 4e26a3c71d
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@
## Install
dillo-gemini requires `ncat`, which is included in the `nmap` package on Debian.
dillo-gemini requires the `openssl` command-line tool.
This repo is hosted on the [SSB Network][SSB] using [git-ssb][].

View File

@ -120,7 +120,7 @@ serve_gemini() {
port=${hostname##*:}
if [ "$host" = "$port" ]; then port=1965; fi
send_status_msg "Sending request..."
printf "%s\r\n" "$url" | ncat --no-shutdown --ssl "$host" "$port" | {
printf "%s\r\n" "$url" | openssl s_client -verify_quiet -quiet "$host:$port" | {
read status meta
send_status_msg "Status: $status"
meta=$(echo "$meta" | sed 's/\s*$//')