haproxy new-quic script

From elyograg, 7 Months ago, written in Plain Text, viewed 36 times.
URL https://paste.elyograg.org/view/7f409279 Embed
Download Paste or View Raw
  1. #!/bin/sh
  2.  
  3. add_bin_to_path() {
  4.   if [ -d /opt/quictls/lib64 ]; then
  5.     QUICTLS_LIB=/opt/quictls/lib64
  6.   else
  7.     QUICTLS_LIB=/opt/quictls/lib
  8.   fi
  9.   rm -f /usr/local/bin/qssl
  10.   cat << EOF > /usr/local/bin/qssl
  11. #!/bin/sh
  12. export LD_LIBRARY_PATH=${QUICTLS_LIB}
  13. /opt/quictls/bin/openssl \$*
  14. EOF
  15.   chmod +x /usr/local/bin/qssl
  16. }
  17.  
  18. CONFARGS="--prefix=/opt/quictls enable-tls1_3 enable-ktls enable-fips no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms no-capieng threads"
  19.  
  20. if [ "$(uname -i)" = "x86_64" ]; then
  21.         CONFARGS="${CONFARGS} enable-ec_nistp_64_gcc_128"
  22. fi
  23.  
  24. DIR=`dirname $0`/$1
  25. if [ -e "$DIR" ]; then
  26.   if [ -d "$DIR" ]; then
  27.     cd $DIR
  28.     git pull --rebase
  29.     make distclean
  30.     ./config ${CONFARGS}
  31.     rm -rf /opt/old.quictls
  32.     mv /opt/quictls /opt/old.quictls
  33.     make -j 6
  34.     RETVAL="$?"
  35.     if [ "$RETVAL" -eq 0 ]; then
  36.       make install
  37.       RETVAL="$?"
  38.       if [ "$RETVAL" -eq 0 ]; then
  39.         add_bin_to_path
  40.         rm -rf /opt/quictls/ssl/certs
  41.         ln -s /etc/ssl/certs /opt/quictls/ssl/certs
  42.         make distclean
  43.       else
  44.         echo Install failed\!
  45.       fi
  46.     else
  47.       echo Build failed\! skipping install\!
  48.     fi
  49.   else
  50.     echo location \($DIR\) is not a directory.
  51.   fi
  52. else
  53.   echo location \($DIR\) does not exist.
  54. fi
  55.  

Reply to "haproxy new-quic script"

Here you can reply to the paste above