Blog: 2024-01-25

From razwiki
Jump to navigation Jump to search

Ok a new day, a new machine to configure for oftc certificate. Based on https://wiki.abuissa.net/wiki/Blog:_2024-01-08

Basing this on https://www.oftc.net/NickServ/CertFP/#weechat

$ mkdir-cd ~/.config/weechat/certs
certs $ openssl req -batch -noenc -newkey ed25519 -keyout nick.key -x509 -days 3650 -out nick.cer 
-----
certs $ ls
nick.cer  nick.key
certs $ chmod 400 nick.key 
certs $ cat nick.cer nick.key > nick.pem
certs $ chmod 400 nick.pem

Back in weechat:

/server add oftc irc.oftc.net -tls -tls_verify -autoconnect

Weird, I'm getting an error with oftc

Option "irc.server.oftc.tls_cert" not found

but I see the same command in the weechat user guide: https://www.weechat.org/files/doc/stable/weechat_user.en.html#irc_connect_oftc_with_certfp

Ok looking in the weechat config I see

oftc.ssl_cert

and looking in the weechat git log I find the root cause:

git log -S ssl_cert
commit dec237b1048479b29e3386d5c8ce593803f2d81d
Author: Sébastien Helleu <[email protected]>
Date:   10 months ago

    irc: rename "ssl" options to "tls" (issue #1903)

Ok so my weechat version (3.8) is actually old so it is out of date with the docs on the website.

https://repology.org/project/weechat/versions

Solution: build weechat myself, from source.

The guide has useful steps: https://www.weechat.org/files/doc/stable/weechat_user.en.html#dependencies

Basically a normal cmake with some dependencies. I installed them one-at-a-time but it even has a tip on build dependencies:

# apt-get build-dep weechat

I removed the system weechat and ran

sudo make install

I was worried I might miss something if I went back to the system package but I ran sudo make uninstall and that worked so I'm all good there.