Skip to content

Instantly share code, notes, and snippets.

@hazcod
Last active January 10, 2017 15:23
Show Gist options
  • Save hazcod/afba5d32ec1ea288d0951d0d0f643035 to your computer and use it in GitHub Desktop.
Save hazcod/afba5d32ec1ea288d0951d0d0f643035 to your computer and use it in GitHub Desktop.
Fixes the ca bundle when using freenode/.. SSL with weechat on macos.
#!/usr/bin/env bash
# exit script when something fails
set -e
# get curl source
git clone https://github.com/curl/curl /tmp/curl
# create weechat cert directory
mkdir -p ~/.weechat/certs
# create curl ca bundle & move generated ca-bundle to weechat cert folder
perl /tmp/curl/lib/mk-ca-bundle.pl \
&& mv ca-bundle.crt ~/.weechat/certs/
# set permissions
chmod 600 ~/.weechat/certs/ca-bundle.crt
# remove curl source
rm -rf /tmp/curl certdata.txt
# show message
echo 'Now run in weechat: /set weechat.network.gnutls_ca_file "~/.weechat/certs/ca-bundle.crt"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment