Skip to content

Commit bee2232

Browse files
committed
tls doc update
1 parent dda2186 commit bee2232

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

docs/advanced/tls.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ You can set the public and private key utilized in the connection using the foll
1414

1515
By default, when connecting securely, KICL will utilize the default `TrustManagerFactory`
1616
provided by the JRE you're using. This factory *does not* necessarily accept certificates
17-
issued by all certificate authorities (such as StartCom, which is still used by some IRC networks)
18-
and self-signed certificates. If possible, you should consider [importing](tls_import.md)
19-
the root certificates for these certificate authorities which will allow connections to be
20-
made.
17+
issued by all certificate authorities and self-signed certificates. If possible, you should
18+
consider [importing](tls_import.md) the root certificates for these certificate authorities
19+
which will allow connections to be made.
2120

2221
KICL lets you set your own `TrustManagerFactory` in the `Client.Builder` so you may let KICL
2322
connect to the network you desire. For testing, there is also the `InsecureTrustManagerFactory`

docs/advanced/tls_import.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
11
### Importing common root certificates
22

3-
Java's default trust store does not include root certificates from a number of popular certificate authorities. This
4-
means that connections to servers which make use of certificates signed by CAs such as StartCom (e.g. EsperNet) will
3+
Java's default trust store may not include the certificate authority (such as self-signed) used by your IRC. This
4+
means that connections to servers which make use of certificates signed by these CAs will
55
fail.
66

77
It's possible to manually import the root certificates into Java's trust store which will make such connections work.
88
This approach is preferable to making use of the `InsecureTrustManagerFactory` or otherwise disabling certificate
99
verification.
1010

11-
1. Download the root certificates in DER form. For StartCom's roots, these can be obtained using wget:
11+
1. Download the certificate in DER form.
1212

1313
```sh
14-
wget https://www.startssl.com/certs/der/ca.crt https://www.startssl.com/certs/der/ca-g2.crt
15-
```
16-
17-
If the certificates you want to import aren't available in DER form, you can convert one in PEM form using:
18-
19-
```sh
20-
openssl x509 -in certificate.crt -out certificate.der -outform DER
14+
openssl s_client -showcerts -connect irc.host:6697 < /dev/null | openssl x509 -outform DER > cert.der
2115
```
2216

2317
1. Locate the `cacerts` file. This is located in the `lib` of the JAVA_HOME directory. For example,
@@ -28,7 +22,7 @@ which is set by default to 'changeit'. If you've not changed it, you should be a
2822
supply an alias for each certificate via the `-alias` argument.
2923

3024
```sh
31-
sudo keytool -trustcacerts -keystore /usr/lib/jvm/java-8-oracle/jre/lib/security/cacerts -noprompt -importcert -alias StartCom1 -file ca.crt
25+
sudo keytool -trustcacerts -keystore /usr/lib/jvm/java-8-oracle/jre/lib/security/cacerts -noprompt -importcert -alias irchost -file cert.der
3226
```
3327

3428
You can list all certificates in your trust store and verify the certificates were correctly added by issuing

0 commit comments

Comments
 (0)