Last active
January 10, 2017 15:23
-
-
Save hazcod/afba5d32ec1ea288d0951d0d0f643035 to your computer and use it in GitHub Desktop.
Fixes the ca bundle when using freenode/.. SSL with weechat on macos.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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