Skip to content

Commit 08ae088

Browse files
committed
Reorganize the certfp guide, add adiirc instructions
1 parent 341f16d commit 08ae088

File tree

1 file changed

+161
-90
lines changed

1 file changed

+161
-90
lines changed

content/_guides/certfp.md

Lines changed: 161 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,23 @@ automatically.
1212
For `SASL EXTERNAL` to work, you must [connect over TLS](/guides/connect).
1313

1414
## Creating a self-signed certificate
15+
{: .no_toc}
1516

1617
In order to follow these instructions, you will need the `openssl` utility. If
1718
you are using Windows and do not have a copy, you might consider using Cygwin.
1819

19-
You can generate a certificate with the following command:
20+
You can generate a certificate with the following command (recommended):
2021

2122
```sh
2223
openssl req -x509 -new -newkey ed25519 -sha256 -nodes -out libera.pem -keyout libera.pem
2324
```
2425

26+
If your client does not support using `ed25519`, use the following command:
27+
28+
```sh
29+
openssl req -x509 -new -newkey rsa:4096 -sha256 -nodes -out libera.pem -keyout libera.pem
30+
```
31+
2532
You will be prompted for various pieces of information about the certificate.
2633
The contents do not matter for our purposes, but `openssl` needs at least one
2734
of them to be non-empty. This certificate will have the default expiry of 30
@@ -31,6 +38,7 @@ The `.pem` file will have the same access to your NickServ account as your
3138
password does, so take appropriate care in securing it.
3239

3340
## Inspecting your certificate
41+
{: .no_toc}
3442

3543
The fingerprint can be checked with the following command:
3644

@@ -39,78 +47,93 @@ openssl x509 -in libera.pem -noout -fingerprint -sha512 | awk -F= '{gsub(":","")
3947
```
4048

4149
## Connecting to Libera.Chat with your certificate
50+
{: .no_toc}
4251

4352
IRC clients generally differ in where they look for a certificate and how you
4453
configure them to offer it to the server. If yours is not yet listed here,
4554
advice in this section is unlikely to apply, but guides may be available
4655
elsewhere on the web.
4756

57+
- TOC
58+
{:toc}
59+
4860
### Irssi
4961

50-
Move the certificates you created above to ~/.irssi/certs
62+
1. Move the certificates you created above to ~/.irssi/certs:
5163

52-
```sh
53-
mkdir ~/.irssi/certs
54-
mv libera.pem ~/.irssi/certs
55-
```
64+
```sh
65+
mkdir ~/.irssi/certs
66+
mv libera.pem ~/.irssi/certs
67+
```
5668

57-
Configure your `/server` entry for Libera.Chat to use this certificate. You
58-
may need to adapt this example for your existing configuration (the network
59-
and hostname should match what you already use).
69+
2. Configure your `/server` entry for Libera.Chat to use this certificate. You
70+
may need to adapt this example for your existing configuration (the network
71+
and hostname should match what you already use).
6072

61-
```irc
62-
/server add -tls_cert ~/.irssi/certs/libera.pem -network LiberaChat irc.libera.chat 6697
63-
```
73+
```irc
74+
/server add -tls_cert ~/.irssi/certs/libera.pem -network LiberaChat irc.libera.chat 6697
75+
```
6476

65-
For the first time, connect to Libera.Chat using password authentication so
66-
that you can add the certificate fingerprint to NickServ.
77+
3. Connect to Libera.Chat using password authentication so that you can add
78+
the certificate fingerprint to NickServ.
6779

68-
```irc
69-
/connect LiberaChat
70-
```
80+
```irc
81+
/connect LiberaChat
82+
```
7183

72-
Now follow the instructions [to add the fingerprint](#add-your-fingerprint-to-nickserv).
73-
When done, you can switch the authentication to certificates.
84+
4. Now follow the instructions [to add the fingerprint](#add-your-fingerprint-to-nickserv).
85+
When done, you can switch the authentication to certificates.
7486

75-
```irc
76-
/disconnect LiberaChat
77-
/network add -sasl_password '' -sasl_mechanism EXTERNAL LiberaChat
78-
/connect LiberaChat
79-
```
87+
```irc
88+
/disconnect LiberaChat
89+
/network add -sasl_password '' -sasl_mechanism EXTERNAL LiberaChat
90+
/connect LiberaChat
91+
```
8092

8193
If you did everything right you should now be authenticated using your
8294
certificate.
8395

8496
### weechat
8597

86-
Move the certificates you created above to ~/.weechat/certs
98+
1. Move the [certificates you created](#creating-a-self-signed-certificate)
99+
to `~/.weechat/certs`
87100

88-
```sh
89-
mkdir ~/.weechat/certs
90-
mv libera.pem ~/.weechat/certs
91-
```
101+
```sh
102+
mkdir ~/.weechat/certs
103+
mv libera.pem ~/.weechat/certs
104+
```
92105

93-
Now disconnect and remove the current Libera.Chat server(s). Re-add it with
94-
the SSL flag, using your newly generated certificate. Note that these commands
95-
are just examples, you have to adapt them to your current servers.
106+
2. Configure your Libera Chat server to use your newly generated certificate.
107+
These commands are examples and you must adapt the `liberachat` portion of
108+
them to the name you gave to the network, as shown with `/server list`.
96109

97-
```irc
98-
# For Weechat version >= 4.0.0
99-
/set irc.server.liberachat.addresses irc.libera.chat/6697
100-
/set irc.server.liberachat.tls on
101-
/set irc.server.liberachat.tls_verify on
102-
/set irc.server.liberachat.tls_cert %h/certs/libera.pem
103-
/set irc.server.liberachat.sasl_mechanism external
104-
105-
# For Weechat version < 4.0.0
106-
/set irc.server.liberachat.addresses irc.libera.chat/6697
107-
/set irc.server.liberachat.ssl on
108-
/set irc.server.liberachat.ssl_verify on
109-
/set irc.server.liberachat.ssl_cert %h/certs/libera.pem
110-
/set irc.server.liberachat.sasl_mechanism external
111-
```
110+
```irc
111+
# For Weechat version >= 4.0.0
112+
/set irc.server.liberachat.addresses irc.libera.chat/6697
113+
/set irc.server.liberachat.tls on
114+
/set irc.server.liberachat.tls_verify on
115+
/set irc.server.liberachat.tls_cert %h/certs/libera.pem
116+
117+
# For Weechat version < 4.0.0
118+
/set irc.server.liberachat.addresses irc.libera.chat/6697
119+
/set irc.server.liberachat.ssl on
120+
/set irc.server.liberachat.ssl_verify on
121+
/set irc.server.liberachat.ssl_cert %h/certs/libera.pem
122+
```
123+
124+
3. (Re)connect to the network.
125+
4. Follow the instructions [to add the fingerprint](#add-your-fingerprint-to-nickserv)
126+
to your account.
127+
5. Set the server's sasl_mechanism to `external`
112128

113-
and then reconnect to Libera.Chat.
129+
```irc
130+
/set irc.server.liberachat.sasl_mechanism external
131+
```
132+
133+
Future connections will now use your certificate to authenticate you.
134+
135+
Note that if you are using CertFP to connect to our tor hidden service,
136+
either set up the alias for palladium or set `ssl_verify` to `off`.
114137

115138
### znc
116139

@@ -124,48 +147,64 @@ see `certfp generate` in the [IRC service manual](https://soju.im/doc/soju.1.htm
124147

125148
### HexChat
126149

127-
Place the .pem file in `certs/client.pem` in the HexChat config
128-
directory (`~/.config/hexchat/` or `%appdata%\HexChat`). Note
129-
that the `certs` directory does not exist by default and you will have to
130-
create it yourself. Once the file is there, all subsequent SSL connections
131-
will use the certificate.
150+
1. [Create the certificate](#creating-a-self-signed-certificate)
151+
2. Place the file in `certs/client.pem` in the HexChat config directory
152+
(`~/.config/hexchat/` or `%appdata%\HexChat`). Note that the `certs`
153+
directory does not exist by default and you may need to create it.
154+
3. Once the file is there, all subsequent SSL connections will use the
155+
certificate.
132156

133157
If you connect to multiple IRC networks, you should keep in mind that using
134158
the filename `certs/client.pem` will send the same certificate to all networks.
135159
If you prefer per-network certificates, use the name of the network exactly
136-
as it appears in the network list (Ctrl-S), including capitalisation and
137-
punctuation (e.g. `certs/libera.pem` or `certs/Example Server.pem`).
160+
as it appears in the network list (Ctrl-S), **including capitalisation and
161+
punctuation** (e.g. `certs/libera.pem` or `certs/Example Server.pem`).
138162

139163
### Konversation
140164

141-
Create the .pem file as per above using `rsa:4096` instead of `ed25519`,
142-
then place it wherever you want. Start Konversation, then open the Identity
143-
dialogue by either pressing <kbd>F8</kbd> or via the Settings menu entry.
144-
Choose the identity you use for the Libera.Chat network or create a new one.
145-
In the part `Auto Identify` you have to choose `SASL External (Cert)`
146-
as the `Type` for SASL External or `SSL CLient Certificate` for CertFP.
147-
SASL External requires at least version 1.7 of Konversation.
148-
Optionally fill in your account name in the `Account` field.
149-
You can then choose the certificate you created with the file picker
150-
or enter the path manually in the field next to it.
151-
Once done, apply the configuration and (re)connect to Libera.Chat.
165+
1. [Create a certificate](#creating-a-self-signed-certificate) using the
166+
`rsa:4096` algorithm, putting it wherever you want.
167+
2. Start Konversation, then open the Identity dialogue by either pressing
168+
`F8` or via the Settings menu entry.
169+
3. Choose the identity you use for Libera.Chat, or create a new one.
170+
4. In the `Auto Identify` section, choose `SASL External (Cert)`
171+
as the `Type` for SASL External (requires version 1.7 or newer),
172+
or `SSL CLient Certificate` for CertFP.
173+
5. (optional) Fill in your account name in the `Account` field.
174+
6. Choose the certificate you created with the file picker or enter the path
175+
manually in the field next to it.
176+
7. Apply the configuration and (re)connect to Libera.Chat.
177+
8. Follow the instructions [to add the fingerprint](#add-your-fingerprint-to-nickserv)
178+
to your account.
179+
180+
Future connections will use the certificate to authenticate you.
152181

153182
### Revolution
154183

155-
Create the .pem file as per above, transfer it to your Android device, and
156-
place it wherever you want (`Downloads` is a common location).
157-
Start Revolution and navigate to the `Manage servers` screen if you are not
158-
there already, long-press on the server you wish configure certFP for, and
159-
select `Edit`. When presented with the `Edit a server` screen, tap on
160-
`Authentication mode` and select `Client certificate (CertFP)`, then tap on
161-
`IMPORT PEM` and navigate to where where you put the pem file and select it.
162-
Tap the tick symbol on the top right of the `Edit a server` screen to save.
184+
1. Create the .pem file as per above.
185+
2. Transfer it to your Android device, and place it wherever you want
186+
(`Downloads` is a common location).
187+
3. Start Revolution and navigate to the `Manage servers` screen.
188+
4. Long-press on the server you wish configure certFP for, and
189+
select `Edit`.
190+
5. When presented with the `Edit a server` screen, tap on
191+
`Authentication mode` and select `Client certificate (CertFP)`, then tap on
192+
`IMPORT PEM`.
193+
6. Navigate to where where you put the pem file and select it.
194+
7. Tap the tick symbol on the top right of the `Edit a server` screen to save.
163195

164196
Alternatively, Revolution has the ability to generate a client certificate for
165-
you. Once you are presented with `IMPORT PEM`, there will also be an option
166-
to `CREATE NEW` and when you tap this, a certificate will be randomly generated
167-
and a certificate fingerprint will be displayed. Tap the tick symbol on the top
168-
right of the screen to save.
197+
you:
198+
199+
1. When you are presented with `IMPORT PEM`, there will also be an option
200+
to `CREATE NEW`.
201+
2. When you tap this option, a certificate will be randomly generated
202+
and a certificate fingerprint will be displayed.
203+
3. Tap the tick symbol on the top right of the screen to save.
204+
205+
Follow the instructions [to add the fingerprint](#add-your-fingerprint-to-nickserv)
206+
to your account. Future connections will now use your certificate to
207+
authenticate you.
169208

170209
### KVIrc
171210

@@ -177,25 +216,54 @@ right of the screen to save.
177216
5. At `Certificate location` configure the location of libera.pem.
178217
6. Check `Use SSL private key`.
179218
7. At `Private key location` configure the location of libera.pem.
180-
8. If you have certificate and private key in separate files, use these
181-
respectively.
219+
8. (optional) If you have certificate and private key in separate files, use
220+
these in the respective fields instead.
182221
9. Click `OK` or `Apply`.
222+
10. Follow the instructions [to add the fingerprint](#add-your-fingerprint-to-nickserv)
223+
to your account.
224+
225+
Future connections will now use your certificate to authenticate you.
183226

184227
### mIRC
185228

186-
1. In the File menu, click Select Servers...
187-
2. In the Connect -> Servers section of the mIRC Options window,
188-
select Libera.Chat, click the hamburger menu button, then click Edit.
229+
1. In the `File` menu, click `Select Server...`
230+
2. In the `Connect` -> `Servers` section of the `mIRC Options` window,
231+
select Libera.Chat, click the hamburger menu button, then click `Edit`.
189232
3. In the `Login Method` dropdown, select `SASL External /CAP`.
190233
4. Click the `SSL` Tab.
191234
5. Check `Use private certificate`.
192-
6. Click the rectange box below and select the certificate file.
235+
6. Click the rectangle box below and select the certificate file.
193236
The file must contain both the certificate and private key.
194-
7. Click the OK button.
237+
7. Click the `OK` button.
238+
8. Follow the instructions [to add the fingerprint](#add-your-fingerprint-to-nickserv)
239+
to your account.
240+
241+
Future connections will now use your certificate to authenticate you.
242+
243+
### Adiirc
244+
245+
1. Follow the [certificate creation instructions](#creating-a-self-signed-certificate)
246+
above to generate a `rsa:4096` certificate.
247+
2. Convert the cert to the needed `.pfx` format with
248+
`openssl pkcs12 -export -out libera.pfx -in libera.pem`
249+
3. Add the path to the `libera.pfx` file in the `SSL` tab of the `Server List`,
250+
and **uncheck** the `Use global client certificate` option.
251+
4. Click `Save`.
252+
5. (Re)connect to the network using password authentication.
253+
6. Follow the instructions [to add the fingerprint](#add-your-fingerprint-to-nickserv)
254+
to your account.
255+
7. Change your login method to SASL (external).
256+
257+
Future connections will now use your certificate to authenticate you.
258+
259+
Note: The option to have Adiirc generate a certificate for you does not
260+
currently generate a compatible certificate.
195261

196262
## Add your fingerprint to NickServ
263+
{: .no_toc}
197264

198-
You can then check whether you have a fingerprint by using `whois` on yourself:
265+
You can then check whether you have a fingerprint by using `whois` on
266+
yourself:
199267

200268
```irc
201269
/whois YourOwnNick
@@ -216,13 +284,16 @@ You can then authorise your current certificate fingerprint:
216284

217285
In the future, any connections you make to Libera.Chat with your certificate
218286
will be logged into your account automatically. Optionally, or if you wish to
219-
[connect via Tor](/guides/connect), you can enable SASL with the `EXTERNAL` mechanism.
287+
[connect via Tor](/guides/connect), you can enable SASL with the `EXTERNAL`
288+
mechanism.
220289

221290
## Troubleshooting
291+
{: .no_toc}
222292

223293
### Expecting an rsa key
294+
{: .no_toc}
224295

225296
This can happen if your client does not support the `ed25519` algorithm. If
226-
you wish to continue with this client, you will need to replace your
227-
certificate using the same command as above, but with `rsa:4096` in place of
228-
`ed25519`.
297+
you wish to continue with this client, you will need to
298+
[make a new certificate](#creating-a-self-signed-certificate) that is using
299+
the `rsa:4096` algorithm.

0 commit comments

Comments
 (0)