Try downloading libssh directly from www.libssh.org.
authorGuy Harris <guy@alum.mit.edu>
Fri, 21 Sep 2018 05:20:48 +0000 (22:20 -0700)
committerGuy Harris <guy@alum.mit.edu>
Fri, 21 Sep 2018 05:21:24 +0000 (05:21 +0000)
Downloading from red.libssh.org got "curl: (51) SSL: no alternative
certificate subject name matches target host name 'red.libssh.org'" on
my Mojave virtual machine.

Change-Id: Iab8016c4dc5200c80bff3c0cdc776bc922f4dd59
Reviewed-on: https://code.wireshark.org/review/29768
Reviewed-by: Guy Harris <guy@alum.mit.edu>
tools/macos-setup.sh

index decff171cb1086317120738bcc9875aaa9aa601e..71f5662df330be34701b93e79e9b9ba6894e07ad 100755 (executable)
@@ -1467,7 +1467,11 @@ uninstall_c_ares() {
 install_libssh() {
     if [ "$LIBSSH_VERSION" -a ! -f libssh-$LIBSSH_VERSION-done ] ; then
         echo "Downloading, building, and installing libssh:"
-        [ -f libssh-$LIBSSH_VERSION.tar.xz ] || curl -L -O https://red.libssh.org/attachments/download/$LIBSSH_FILENUM/libssh-$LIBSSH_VERSION.tar.xz || exit 1
+        LIBSSH_MAJOR_VERSION="`expr $LIBSSH_VERSION : '\([0-9][0-9]*\).*'`"
+        LIBSSH_MINOR_VERSION="`expr $LIBSSH_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
+        LIBSSH_DOTDOT_VERSION="`expr $LIBSSH_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
+        LIBSSH_MAJOR_MINOR_VERSION=$LIBSSH_MAJOR_VERSION.$LIBSSH_MINOR_VERSION
+        [ -f libssh-$LIBSSH_VERSION.tar.xz ] || curl -L -O https://www.libssh.org/files/$LIBSSH_MAJOR_MINOR_VERSION/libssh-$LIBSSH_VERSION.tar.xz
         $no_build && echo "Skipping installation" && return
         xzcat libssh-$LIBSSH_VERSION.tar.xz | tar xf - || exit 1
         cd libssh-$LIBSSH_VERSION