Difference between revisions of "CertFP"
m (→OpenSSL: Update OpenSSL version for Windows.) |
m (→Add the certificate fingerprint to NickServ: Added link to SASL External client configuration guide.) |
||
Line 160: | Line 160: | ||
* Copy and paste this line: <code>/msg NickServ ACCESS ADD FINGERPRINT</code> | * Copy and paste this line: <code>/msg NickServ ACCESS ADD FINGERPRINT</code> | ||
* In your client, disable whatever auto-authentication you've had with NickServ, before you saw this tutorial | * In your client, disable whatever auto-authentication you've had with NickServ, before you saw this tutorial | ||
* Change your Rizon server settings to use '''SASL (External)''' for login method, instead. | * Change your Rizon server settings to use '''[[SASL#SASL_EXTERNAL_Client_Configurations|SASL (External)]]''' for login method, instead. | ||
* Reconnect. | * Reconnect. | ||
Latest revision as of 03:04, 29 September 2023
Introduction
This page describes how to connect, and identify yourself to services securely via a client certificate fingerprint; a.k.a., CertFP.
A major advantage of using a client CertFP to authenticate is that you don't have to use /msg NickServ IDENTIFY
any more.
By using SSL/TLS, you are also encrypting the connection between you and the server.
Creating the certificate
OpenSSL
We will be using OpenSSL to create the client certificate. If you haven't already, please install OpenSSL using these instructions:
Windows | Linux |
---|---|
|
Most distributions come with OpenSSL or have the OpenSSL package in their repositories. If they don't, please go to https://www.openssl.org/ and install it. |
Generating a .pem
To generate the required .pem file, you will need to create a key and a certificate first:
Windows | Linux |
---|---|
Start menu → OpenSSL → Win64 OpenSSL Command Prompt ... and run the following command: | Ensure OpenSSL is installed on your system using your distro's package manager, then run the following command: |
openssl req -nodes -newkey rsa:4096 -keyout Rizon.key -x509 -days 365 -out Rizon.cer
|
Assuming your commands were entered successfully, you will be asked some questions. Fill them in similarly to what is shown below:
Country Name (2 letter code) [US]:US State or Province Name (full name) [Texas]:Michigan Locality Name (eg, city) [San Antonio]:Grand Rapids Organization Name (eg, company) [Stealth3]: Rizon Organizational Unit Name (eg, section) [ISP]: IRC Common Name (eg, YOUR name) []:Rebel_n00b Email Address []:rebel@rizon.net
By now, two files have been generated; which you will need to combine together as follows:
Windows | Linux |
---|---|
Type copy Rizon.cer+Rizon.key Rizon.pem and press ↵ Enter
|
cat Rizon.cer Rizon.key > Rizon.pem
|
Configuring your client
These guidelines vary highly from client to client.
KVIrc
Move the Rizon.pem file to a safe place.
- Go to Settings → Configure KVIrc
- Go to Connection → Advanced
- On the tab SSL check Use SSL certificate and Use SSL private key and point both to the Rizon.pem file you created.
- Change your connection settings and enable the SSL option.
- Add your client certificate fingerprint to NickServ.
mIRC
Move the Rizon.pem file to a safe place. Make sure SSL is enabled in your mIRC by typing //echo -a $sslready
which should return $true. If not, then go here https://www.mirc.com/ssl.html
- Go to Tools → Options → Connect → Options
- Press the SSL... button.
- If there isn't one, then upgrade your mIRC to the latest version. Otherwise, follow the OpenSSL installation steps properly, noting the second Notes bullet point.
- Click on the empty box below Private key file:, navigate to where you placed your Rizon.pem and select it.
- Do the same for Certificate chain file:
- Press OK , (re)connect, and add your client certificate fingerprint to NickServ.
- Finally, to check whether you are connected with SSL,
//echo -a $ssl
should return $true.
XChat
XChat uses the .pem file that corresponds with the name of the network under Network list. If irc.rizon.net is named under Rizon, then all you have to do is move the Rizon.pem file to ~/.xchat2/Rizon.pem
for Linux/UNIX users, or C:\Users\xxx\AppData\Roaming\X-Chat 2
for Windows users. If it's not named Rizon, then you will have to either rename the .pem file, or rename the network that irc.rizon.net is listed under, so they match each other. Once you are done with that:
- Go to XChat → Network List
- In the Networks list, find Rizon and press Edit...
- Select the box Use SSL for all the servers on this network.
- Press Close and then press Connect
- Add your client certificate fingerprint to NickServ.
HexChat
HexChat uses the .pem file that corresponds with the name of the network under Network list. If irc.rizon.net is named under Rizon, then all you have to do is move the Rizon.pem file to ~/.config/hexchat/certs/Rizon.pem
for Linux users, or C:\Users\xxx\AppData\Roaming\hexchat\certs
for Windows users. If it's not named Rizon, then you will have to either rename the .pem file, or rename the network that irc.rizon.net is listed under, so they match each other. Once you are done with that:
- Go to HexChat → Network List
- In the Networks list, find Rizon and press Edit...
- Select the box Use SSL for all the servers on this network.
- Press Close and then press Connect
- Add your client certificate fingerprint to NickServ.
WeeChat
- Quit WeeChat
- Move Rizon.pem to
~/.weechat/ssl/Rizon.pem
- Open
~/.weechat/irc.conf
- Make the following options look like this:
# changing the port to 6697 or 9999 is what matters rizon.addresses = "irc.rizon.net/6697" rizon.ssl = on rizon.ssl_cert = "%h/ssl/Rizon.pem" # 2048 is the default anyway... *shrugs* rizon.ssl_dhkey_size = 2048
Irssi
- On your shell: move the cert to
~/.irssi/certs/Rizon.pem
- In Irssi: use this command
/SERVER ADD -tls -tls_cert ~/.irssi/certs/Rizon.pem -network Rizon irc.rizon.net 6697
- Add your client certificate fingerprint to NickServ.
ZNC
- Ensure the Cert module is loaded (cert not certauth).
- To add your certificate/pem file, either:
- Copy and paste the contents of the *.pem file into the *certauth web interface at
- http<s>://<url>:<port>/mods/network/<rizon net name>/cert/
- or
- Copy and paste the contents of the *.pem file into the *certauth web interface at
- Add your client certificate fingerprint to NickServ.
Quassel
- Go to Quassel and click Settings → Configure Quassel (or press F7).
- Click Identities in the left-hand sidebar, and choose the identity you wish to associate your certificate with.
- In the Advanced tab, under the Use SSL Certificate section, load the Rizon.pem file you created.
You can check to make sure this is setup correctly by typing /msg *cert info
. If you get back You have a certificate in: <path>
then you're done. You can now use /msg *status connect
to reconnect using cert.
If you have configured everything correctly, you should see the following when you connect to Rizon:
*** Connected securely via TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384-256 *** Your client certificate fingerprint is xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Welcome to the Rizon Internet Relay Chat Network Rebel_n00b
Add the certificate fingerprint to NickServ
- Identify yourself through services with
/msg NickServ IDENTIFY yourPassword
. - Copy and paste this line:
/msg NickServ ACCESS ADD FINGERPRINT
- In your client, disable whatever auto-authentication you've had with NickServ, before you saw this tutorial
- Change your Rizon server settings to use SASL (External) for login method, instead.
- Reconnect.
If it works, you will be identified by services automatically via the fingerprint.
If you have any questions, feel free to join #ssl or #help and ask.