*certauth module on v1.8.2 with LibreSSL 3.2.2: GetKey() returned status 20 with key 3207a6f22e0fde7c0781b8d0b78dfa15126595b7 #966

Open
opened 2026-10-05 04:55:56 +02:00 by adam · 12 comments
Owner

Hello, it seems that on znc v1.8 certauth module is broken. It cant get certificate sent by clients.
This GetKey() function returns status 20.
Also, I’m using LibreSSL 3.2.2.
Built ZNC with it and generated certificate with it too.
I’m running on Gentoo for you to get the build environment.
I looked a little on sources and it comes from https://github.com/znc/znc/blob/6cd80535c064e91155468e79f50fc1c3f3c0f3e5/modules/certauth.cpp#L221
Some debug logs:

[2020-11-07 01:17:52.632195] _LISTENER == ConnectionFrom(2a00:5881:4008:4210:7c38:4a33:c6a4:22b9, 45668) [Allowed]
[2020-11-07 01:17:52.632487] There are [0] clients from [2a00:5881:4008:4210:7c38:4a33:c6a4:22b9]
[2020-11-07 01:17:52.767556] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) CLI -> ZNC [PASS password]
[2020-11-07 01:17:52.767725] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) CLI -> ZNC [CAP LS 302]
[2020-11-07 01:17:52.767812] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) ZNC -> CLI [:irc.znc.in CAP unknown-nick LS :batc
h cap-notify echo-message multi-prefix server-time userhost-in-names znc.in/batch znc.in/self-message znc.in/server-time
-iso]
[2020-11-07 01:17:52.768057] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) CLI -> ZNC [NICK quentin]
[2020-11-07 01:17:52.768198] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) CLI -> ZNC [USER caseof/geeknode 0 * :caseof/geek
node]
[2020-11-07 01:17:52.768780] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) CLI -> ZNC [CAP REQ :cap-notify multi-prefix serv
er-time znc.in/server-time-iso znc.in/self-message]
[2020-11-07 01:17:52.768876] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) ZNC -> CLI [@time=2020-11-07T00:17:52.768Z :irc.z
nc.in CAP quentin ACK :cap-notify multi-prefix server-time znc.in/server-time-iso znc.in/self-message]
[2020-11-07 01:17:52.769220] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) CLI -> ZNC [CAP END]
[2020-11-07 01:17:52.769282] GetKey() returned status 20 with key 3207a6f22e0fde7c0781b8d0b78dfa15126595b7
[2020-11-07 01:17:52.769312] User: caseof Key: 
[2020-11-07 01:17:52.769340] Peer got no public key, ignoring

Hello, it seems that on znc v1.8 certauth module is broken. It cant get certificate sent by clients. This GetKey() function returns status 20. Also, I’m using LibreSSL 3.2.2. Built ZNC with it and generated certificate with it too. I’m running on Gentoo for you to get the build environment. I looked a little on sources and it comes from https://github.com/znc/znc/blob/6cd80535c064e91155468e79f50fc1c3f3c0f3e5/modules/certauth.cpp#L221 Some debug logs: ``` [2020-11-07 01:17:52.632195] _LISTENER == ConnectionFrom(2a00:5881:4008:4210:7c38:4a33:c6a4:22b9, 45668) [Allowed] [2020-11-07 01:17:52.632487] There are [0] clients from [2a00:5881:4008:4210:7c38:4a33:c6a4:22b9] [2020-11-07 01:17:52.767556] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) CLI -> ZNC [PASS password] [2020-11-07 01:17:52.767725] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) CLI -> ZNC [CAP LS 302] [2020-11-07 01:17:52.767812] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) ZNC -> CLI [:irc.znc.in CAP unknown-nick LS :batc h cap-notify echo-message multi-prefix server-time userhost-in-names znc.in/batch znc.in/self-message znc.in/server-time -iso] [2020-11-07 01:17:52.768057] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) CLI -> ZNC [NICK quentin] [2020-11-07 01:17:52.768198] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) CLI -> ZNC [USER caseof/geeknode 0 * :caseof/geek node] [2020-11-07 01:17:52.768780] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) CLI -> ZNC [CAP REQ :cap-notify multi-prefix serv er-time znc.in/server-time-iso znc.in/self-message] [2020-11-07 01:17:52.768876] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) ZNC -> CLI [@time=2020-11-07T00:17:52.768Z :irc.z nc.in CAP quentin ACK :cap-notify multi-prefix server-time znc.in/server-time-iso znc.in/self-message] [2020-11-07 01:17:52.769220] (2a00:5881:4008:4210:7c38:4a33:c6a4:22b9) CLI -> ZNC [CAP END] [2020-11-07 01:17:52.769282] GetKey() returned status 20 with key 3207a6f22e0fde7c0781b8d0b78dfa15126595b7 [2020-11-07 01:17:52.769312] User: caseof Key: [2020-11-07 01:17:52.769340] Peer got no public key, ignoring ``` <!-- github-sync-id:738113205 -->
Author
Owner
GetKey() returned status 20 with key 3207a6f22e0fde7c0781b8d0b78dfa15126595b7

The above comes from here:
https://github.com/znc/znc/blob/0af3c4b234b7839bb1162e74b01b66e1a05e6fa1/modules/certauth.cpp#L221-L237
where GetKey is here:
https://github.com/jimloco/Csocket/blob/e8d9e0bb248c521c2c7fa01e1c6a116d929c41b4/Csocket.cc#L2875-L2905
Okay, so SSL_get_verify_result returned 20. According to https://www.openssl.org/docs/man1.0.2/man1/verify.html, that's:

20 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: unable to get local issuer certificate
the issuer certificate could not be found: this occurs if the issuer certificate of an untrusted certificate cannot be found.

That error is not one of those that is ignored by certauth in the code I linked above.

@CaseOf Could you print the subject and issuer of your certificate? I would guess that your certificate is not properly self-signed, because I would expect the error X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT. So, somehow your certificate does not count as self-signed...?

``` GetKey() returned status 20 with key 3207a6f22e0fde7c0781b8d0b78dfa15126595b7 ``` The above comes from here: https://github.com/znc/znc/blob/0af3c4b234b7839bb1162e74b01b66e1a05e6fa1/modules/certauth.cpp#L221-L237 where `GetKey` is here: https://github.com/jimloco/Csocket/blob/e8d9e0bb248c521c2c7fa01e1c6a116d929c41b4/Csocket.cc#L2875-L2905 Okay, so `SSL_get_verify_result` returned 20. According to https://www.openssl.org/docs/man1.0.2/man1/verify.html, that's: > 20 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: unable to get local issuer certificate >the issuer certificate could not be found: this occurs if the issuer certificate of an untrusted certificate cannot be found. That error is not one of those that is ignored by certauth in the code I linked above. @CaseOf Could you print the subject and issuer of your certificate? I would guess that your certificate is not properly self-signed, because I would expect the error `X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT`. So, somehow your certificate does not count as self-signed...? <!-- github-comment-id:723416505 -->
Author
Owner

Hi, here is the certificate I used (dont worry, it’s removed from my *certauth list now).
It’s in PEM format.

-----BEGIN CERTIFICATE-----
MIIEoDCCAogCCQC1yqd69UFylDANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdD
YXNlX09mMB4XDTIwMDYyMTAwNDMwMloXDTMwMDYxOTAwNDMwMlowEjEQMA4GA1UE
AwwHQ2FzZV9PZjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALBKmo/M
tndPSW6Ys30ewOP1zZFGvacUlMzcDXBNxsORf28lK/x8OSOzo5hL7iVWXRNraqgK
0P2QvUYXGygiPHTdlFinjQS7uHiLhoC+Eh3BoS6vF4bAzd8MKgBxNu2Qy7o7bH0B
ESOtbVTjNfOBlyhlCsYKUOBkzUt0IGNz6AqW+PuAJPWfPz0uRiBg74Fan5tDvDy1
RCClv6Pc4X3zAApWJxL3r05fG8J55aaR/56IujVxOZyHfMxyUdFVdKxxNdMKf+66
dB3BoqTzq7u/yZ+nlEwHUsbJVsghqy8Xo1cC7rdeorIBtwipRJTD2hQ+Ivpt5DY1
u6jxFDkto7veVEH+V0VY4nk3TfeRSz14u+tjgNFBf5SFRdVKgPQuTGVnSvFTNiiY
aQmym332oS6gCHjSARcZn+XSDF4FIMIkzjpXLoF8Sk57qN0lIk3mmFlxw82/QT4g
FSlcSvMqTbrvsmjXUAMnqdIuJ2BaXOWEUKHy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W3zaengWolKqY
jgooElFGdE+7EjpOfh5qBeYf+IsB9dVIJJHUAxX+qacDMc04ANR0KV1CGbvRU8sA
Ms1eTIIX7JDx8HUINEGDlH8a33Kr5TY/dpoMZ1VzFmhpzKOFBODvYNWXJrWp66Oq
dnMHB+43u+tZcCHH07n0fyz0CdypA7mjups8uclQeddDs3GKuJN3mRpWJubjaN9Q
JPc0PDOwIN3L6qmV7orxnW8xBTkhJS6ywbt347sCggEAfRJH5lnCdpe86sNhoYvo
Esm+2k7mrFzudEzhBU+A5csI+AEtUM2aGij/bYMPKCg8CIAemMHoD9QYOR/Gu7xi
nO6vb6T39FU+OT59WthECoe2gnErtTLr95hu56wsm2nd0I4tWWiSgmhPSKxTMUkJ
fJ1YNIigBuykqRK/f10xl9lBevMUJmptQA9C5+2mceoPCuLi5lJ9tU4JJBcLtcTu
vRBQPAAzJonP8H/BOReDiIUjeh7VShbWdbfbgIargPb7J9z4QldXVAJ9Em97VUyj
5ej8K2bNXIoDEy6GyUd+UwYGqGL6mRljBqP9NaOZKqGTJgdDnMf+kXSPmbFM3/35
QQKCAQB6pgLoAcgwSI4VV+cF4NvRvNrcIpSUWaEvHrUSuoLUUGO7aguvjtOQvq88
NxH1vySI7C3uLDk0O5Q+CwKYjcansi2rVac1gUjHDa3OlVAUdcRHXTZDvxphn0qC
UyNd0sNXe3UE/xSEcgxwUjuyWBXzXctB8Q01gks/n67nyy0pB9KHADVg4xHiBDRe
Knw06rUUQ9tUW0A85CK3e3UdHRmo0AO7l2d7o4G0saf+WnRJgHhegx+2QafYipDJ
Go0I4U0472oI23g9VDI1h4d46KJ9jCPce2m3M3x3Ao0P8MgRDy6ilVh2adgD41Hf
tllVSnX9etPIftqlIx4WNGPQ/PWF
-----END PRIVATE KEY-----

Hi, here is the certificate I used (dont worry, it’s removed from my *certauth list now). It’s in PEM format. ``` -----BEGIN CERTIFICATE----- MIIEoDCCAogCCQC1yqd69UFylDANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDD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7J9z4QldXVAJ9Em97VUyj 5ej8K2bNXIoDEy6GyUd+UwYGqGL6mRljBqP9NaOZKqGTJgdDnMf+kXSPmbFM3/35 QQKCAQB6pgLoAcgwSI4VV+cF4NvRvNrcIpSUWaEvHrUSuoLUUGO7aguvjtOQvq88 NxH1vySI7C3uLDk0O5Q+CwKYjcansi2rVac1gUjHDa3OlVAUdcRHXTZDvxphn0qC UyNd0sNXe3UE/xSEcgxwUjuyWBXzXctB8Q01gks/n67nyy0pB9KHADVg4xHiBDRe Knw06rUUQ9tUW0A85CK3e3UdHRmo0AO7l2d7o4G0saf+WnRJgHhegx+2QafYipDJ Go0I4U0472oI23g9VDI1h4d46KJ9jCPce2m3M3x3Ao0P8MgRDy6ilVh2adgD41Hf tllVSnX9etPIftqlIx4WNGPQ/PWF -----END PRIVATE KEY----- ``` <!-- github-comment-id:723596128 -->
Author
Owner

Else, from openssl command:

$ openssl x509 -text -noout -in znc.pem 
Certificate:
    Data:
        Version: 1 (0x0)
        Serial Number:
            b5:ca:a7:7a:f5:41:72:94
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: CN=Case_Of
        Validity
            Not Before: Jun 21 00:43:02 2020 GMT
            Not After : Jun 19 00:43:02 2030 GMT
        Subject: CN=Case_Of
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                RSA Public-Key: (4096 bit)
                Modulus:
                    00:b0:4a:9a:8f:cc:b6:77:4f:49:6e:98:b3:7d:1e:
                    c0:e3:f5:cd:91:46:bd:a7:14:94:cc:dc:0d:70:4d:
                    c6:c3:91:7f:6f:25:2b:fc:7c:39:23:b3:a3:98:4b:
                    ee:25:56:5d:13:6b:6a:a8:0a:d0:fd:90:bd:46:17:
                    1b:28:22:3c:74:dd:94:58:a7:8d:04:bb:b8:78:8b:
                    86:80:be:12:1d:c1:a1:2e:af:17:86:c0:cd:df:0c:
                    2a:00:71:36:ed:90:cb:ba:3b:6c:7d:01:11:23:ad:
                    6d:54:e3:35:f3:81:97:28:65:0a:c6:0a:50:e0:64:
                    cd:4b:74:20:63:73:e8:0a:96:f8:fb:80:24:f5:9f:
                    3f:3d:2e:46:20:60:ef:81:5a:9f:9b:43:bc:3c:b5:
                    44:20:a5:bf:a3:dc:e1:7d:f3:00:0a:56:27:12:f7:
                    af:4e:5f:1b:c2:79:e5:a6:91:ff:9e:88:ba:35:71:
                    39:9c:87:7c:cc:72:51:d1:55:74:ac:71:35:d3:0a:
                    7f:ee:ba:74:1d:c1:a2:a4:f3:ab:bb:bf:c9:9f:a7:
                    94:4c:07:52:c6:c9:56:c8:21:ab:2f:17:a3:57:02:
                    ee:b7:5e:a2:b2:01:b7:08:a9:44:94:c3:da:14:3e:
                    22:fa:6d:e4:36:35:bb:a8:f1:14:39:2d:a3:bb:de:
                    54:41:fe:57:45:58:e2:79:37:4d:f7:91:4b:3d:78:
                    bb:eb:63:80:d1:41:7f:94:85:45:d5:4a:80:f4:2e:
                    4c:65:67:4a:f1:53:36:28:98:69:09:b2:9b:7d:f6:
                    a1:2e:a0:08:78:d2:01:17:19:9f:e5:d2:0c:5e:05:
                    20:c2:24:ce:3a:57:2e:81:7c:4a:4e:7b:a8:dd:25:
                    22:4d:e6:98:59:71:c3:cd:bf:41:3e:20:15:29:5c:
                    4a:f3:2a:4d:ba:ef:b2:68:d7:50:03:27:a9:d2:2e:
                    27:60:5a:5c:e5:84:50:a1:f2:a9:73:1c:7c:19:f4:
                    e7:22:30:6b:52:b8:d5:23:fc:e5:a3:7e:28:93:05:
                    68:14:a1:78:10:0a:74:6c:82:0f:c5:2a:82:21:e8:
                    e3:89:fe:0e:a4:33:98:05:95:0a:23:16:05:b6:60:
                    d3:5d:4e:0d:6a:b6:ee:fa:eb:ab:48:fa:9f:9e:e5:
                    2a:c7:7e:8b:6b:7c:05:10:5d:e4:0e:2a:29:b7:c8:
                    46:db:a4:b5:69:84:8a:1c:98:96:77:28:17:1b:0d:
                    0e:37:ab:98:cf:3a:e8:a1:84:3b:d8:50:02:aa:15:
                    9c:de:d9:f7:c8:2a:33:0c:b7:74:cd:e8:4d:c0:36:
                    8d:19:7b:94:50:bf:8e:d5:d6:c8:77:75:10:fe:c7:
                    ac:24:5f
                Exponent: 65537 (0x10001)
    Signature Algorithm: sha256WithRSAEncryption
         2d:72:f8:5b:3a:49:ea:50:e5:26:c5:b7:9d:81:f4:38:6e:08:
         b1:3b:8d:ab:7a:64:56:89:22:01:b2:ea:7f:2e:40:a9:24:0b:
         50:ca:32:8a:40:a6:e6:ac:4c:ea:49:b3:fc:9f:9e:37:0c:0a:
         2f:59:61:fa:0e:98:16:7f:1d:1c:5d:76:d0:07:8a:42:cb:74:
         8f:11:2d:00:19:9b:7a:3f:1d:69:05:f4:77:e5:4b:53:81:68:
         5b:b0:6d:4b:fb:60:6a:94:b7:c8:c2:93:d3:6d:d9:9e:d8:c2:
         06:c4:78:30:2f:d3:2d:d1:b4:3a:b3:f1:09:33:db:23:1a:3c:
         be:88:fb:9a:e3:d3:a0:e8:ed:f6:7d:67:b5:25:ea:70:4f:ef:
         af:e1:00:6f:d8:ad:27:53:5b:fa:fd:13:b1:af:fe:e6:99:69:
         e1:50:a8:54:0b:56:08:ca:29:e2:84:a7:4d:bb:86:f0:ee:d9:
         e0:74:f2:fa:e0:b6:93:c6:cd:70:2f:da:0e:9f:4d:46:9c:16:
         71:f2:c4:d5:9a:65:8c:da:bc:20:26:f2:6d:74:ec:99:95:6b:
         84:e1:a6:d0:02:15:73:60:b0:72:9b:2a:aa:2a:cb:b2:79:38:
         da:ed:07:e4:4a:2b:d2:a0:b7:20:92:7d:7a:a5:bd:ad:6b:6f:
         1b:62:67:06:f5:f9:26:cf:76:05:1c:9c:42:41:1a:1a:f0:7f:
         b4:fc:08:f8:e6:3b:07:58:1c:98:a6:7f:64:a8:f0:a8:23:b7:
         36:6b:a2:a4:0e:87:1f:8c:5f:5f:89:ab:f5:1b:c2:b7:f9:6f:
         fd:38:43:72:04:40:1e:44:14:5c:f3:18:61:fd:c7:f8:77:40:
         81:0b:41:4b:e8:bf:b0:d9:86:64:40:e4:f3:5e:33:1f:2e:08:
         ba:cd:8a:3c:d1:82:a9:d9:86:ae:0c:db:c8:fa:bf:4f:bc:f5:
         23:33:bc:8d:a7:9a:fb:16:86:55:f0:da:c8:84:d8:2b:5b:1c:
         78:fa:6e:c0:23:10:3f:8c:df:fb:a2:28:a6:fa:ce:a2:b1:7e:
         ce:43:1a:4d:58:2a:89:31:47:81:4f:7d:c0:aa:3d:b4:cd:44:
         89:e6:4e:25:cd:81:c7:98:b5:e1:84:b4:e5:6e:59:a9:98:70:
         c1:07:2f:f0:aa:c6:e5:a7:ff:fc:7e:40:a0:e7:ee:39:48:96:
         1e:c5:ce:8c:78:b6:7c:a7:6f:e5:17:c2:26:65:64:0d:1c:b8:
         16:08:4f:ee:ea:c7:2e:82:41:d9:f9:2d:cd:71:bb:ac:61:7a:
         ab:10:74:da:6e:86:95:1a:c7:cc:84:ab:86:25:a4:33:e0:de:
         22:37:50:1b:2e:13:94:d7

Else, from `openssl` command: ``` $ openssl x509 -text -noout -in znc.pem Certificate: Data: Version: 1 (0x0) Serial Number: b5:ca:a7:7a:f5:41:72:94 Signature Algorithm: sha256WithRSAEncryption Issuer: CN=Case_Of Validity Not Before: Jun 21 00:43:02 2020 GMT Not After : Jun 19 00:43:02 2030 GMT Subject: CN=Case_Of Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public-Key: (4096 bit) Modulus: 00:b0:4a:9a:8f:cc:b6:77:4f:49:6e:98:b3:7d:1e: c0:e3:f5:cd:91:46:bd:a7:14:94:cc:dc:0d:70:4d: c6:c3:91:7f:6f:25:2b:fc:7c:39:23:b3:a3:98:4b: ee:25:56:5d:13:6b:6a:a8:0a:d0:fd:90:bd:46:17: 1b:28:22:3c:74:dd:94:58:a7:8d:04:bb:b8:78:8b: 86:80:be:12:1d:c1:a1:2e:af:17:86:c0:cd:df:0c: 2a:00:71:36:ed:90:cb:ba:3b:6c:7d:01:11:23:ad: 6d:54:e3:35:f3:81:97:28:65:0a:c6:0a:50:e0:64: cd:4b:74:20:63:73:e8:0a:96:f8:fb:80:24:f5:9f: 3f:3d:2e:46:20:60:ef:81:5a:9f:9b:43:bc:3c:b5: 44:20:a5:bf:a3:dc:e1:7d:f3:00:0a:56:27:12:f7: af:4e:5f:1b:c2:79:e5:a6:91:ff:9e:88:ba:35:71: 39:9c:87:7c:cc:72:51:d1:55:74:ac:71:35:d3:0a: 7f:ee:ba:74:1d:c1:a2:a4:f3:ab:bb:bf:c9:9f:a7: 94:4c:07:52:c6:c9:56:c8:21:ab:2f:17:a3:57:02: ee:b7:5e:a2:b2:01:b7:08:a9:44:94:c3:da:14:3e: 22:fa:6d:e4:36:35:bb:a8:f1:14:39:2d:a3:bb:de: 54:41:fe:57:45:58:e2:79:37:4d:f7:91:4b:3d:78: bb:eb:63:80:d1:41:7f:94:85:45:d5:4a:80:f4:2e: 4c:65:67:4a:f1:53:36:28:98:69:09:b2:9b:7d:f6: a1:2e:a0:08:78:d2:01:17:19:9f:e5:d2:0c:5e:05: 20:c2:24:ce:3a:57:2e:81:7c:4a:4e:7b:a8:dd:25: 22:4d:e6:98:59:71:c3:cd:bf:41:3e:20:15:29:5c: 4a:f3:2a:4d:ba:ef:b2:68:d7:50:03:27:a9:d2:2e: 27:60:5a:5c:e5:84:50:a1:f2:a9:73:1c:7c:19:f4: e7:22:30:6b:52:b8:d5:23:fc:e5:a3:7e:28:93:05: 68:14:a1:78:10:0a:74:6c:82:0f:c5:2a:82:21:e8: e3:89:fe:0e:a4:33:98:05:95:0a:23:16:05:b6:60: d3:5d:4e:0d:6a:b6:ee:fa:eb:ab:48:fa:9f:9e:e5: 2a:c7:7e:8b:6b:7c:05:10:5d:e4:0e:2a:29:b7:c8: 46:db:a4:b5:69:84:8a:1c:98:96:77:28:17:1b:0d: 0e:37:ab:98:cf:3a:e8:a1:84:3b:d8:50:02:aa:15: 9c:de:d9:f7:c8:2a:33:0c:b7:74:cd:e8:4d:c0:36: 8d:19:7b:94:50:bf:8e:d5:d6:c8:77:75:10:fe:c7: ac:24:5f Exponent: 65537 (0x10001) Signature Algorithm: sha256WithRSAEncryption 2d:72:f8:5b:3a:49:ea:50:e5:26:c5:b7:9d:81:f4:38:6e:08: b1:3b:8d:ab:7a:64:56:89:22:01:b2:ea:7f:2e:40:a9:24:0b: 50:ca:32:8a:40:a6:e6:ac:4c:ea:49:b3:fc:9f:9e:37:0c:0a: 2f:59:61:fa:0e:98:16:7f:1d:1c:5d:76:d0:07:8a:42:cb:74: 8f:11:2d:00:19:9b:7a:3f:1d:69:05:f4:77:e5:4b:53:81:68: 5b:b0:6d:4b:fb:60:6a:94:b7:c8:c2:93:d3:6d:d9:9e:d8:c2: 06:c4:78:30:2f:d3:2d:d1:b4:3a:b3:f1:09:33:db:23:1a:3c: be:88:fb:9a:e3:d3:a0:e8:ed:f6:7d:67:b5:25:ea:70:4f:ef: af:e1:00:6f:d8:ad:27:53:5b:fa:fd:13:b1:af:fe:e6:99:69: e1:50:a8:54:0b:56:08:ca:29:e2:84:a7:4d:bb:86:f0:ee:d9: e0:74:f2:fa:e0:b6:93:c6:cd:70:2f:da:0e:9f:4d:46:9c:16: 71:f2:c4:d5:9a:65:8c:da:bc:20:26:f2:6d:74:ec:99:95:6b: 84:e1:a6:d0:02:15:73:60:b0:72:9b:2a:aa:2a:cb:b2:79:38: da:ed:07:e4:4a:2b:d2:a0:b7:20:92:7d:7a:a5:bd:ad:6b:6f: 1b:62:67:06:f5:f9:26:cf:76:05:1c:9c:42:41:1a:1a:f0:7f: b4:fc:08:f8:e6:3b:07:58:1c:98:a6:7f:64:a8:f0:a8:23:b7: 36:6b:a2:a4:0e:87:1f:8c:5f:5f:89:ab:f5:1b:c2:b7:f9:6f: fd:38:43:72:04:40:1e:44:14:5c:f3:18:61:fd:c7:f8:77:40: 81:0b:41:4b:e8:bf:b0:d9:86:64:40:e4:f3:5e:33:1f:2e:08: ba:cd:8a:3c:d1:82:a9:d9:86:ae:0c:db:c8:fa:bf:4f:bc:f5: 23:33:bc:8d:a7:9a:fb:16:86:55:f0:da:c8:84:d8:2b:5b:1c: 78:fa:6e:c0:23:10:3f:8c:df:fb:a2:28:a6:fa:ce:a2:b1:7e: ce:43:1a:4d:58:2a:89:31:47:81:4f:7d:c0:aa:3d:b4:cd:44: 89:e6:4e:25:cd:81:c7:98:b5:e1:84:b4:e5:6e:59:a9:98:70: c1:07:2f:f0:aa:c6:e5:a7:ff:fc:7e:40:a0:e7:ee:39:48:96: 1e:c5:ce:8c:78:b6:7c:a7:6f:e5:17:c2:26:65:64:0d:1c:b8: 16:08:4f:ee:ea:c7:2e:82:41:d9:f9:2d:cd:71:bb:ac:61:7a: ab:10:74:da:6e:86:95:1a:c7:cc:84:ab:86:25:a4:33:e0:de: 22:37:50:1b:2e:13:94:d7 ``` <!-- github-comment-id:723597806 -->
Author
Owner
        Issuer: CN=Case_Of
        Subject: CN=Case_Of

Okay, I have no clue where that X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY comes from. This looks "obviously self-signed". However, I wouldn't claim that I fully understand this stuff, so perhaps someone else has an idea...
(Did I perhaps look up the error incorrectly?)

``` Issuer: CN=Case_Of Subject: CN=Case_Of ``` Okay, I have no clue where that `X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY` comes from. This looks "obviously self-signed". However, I wouldn't claim that I fully understand this stuff, so perhaps someone else has an idea... (Did I perhaps look up the error incorrectly?) <!-- github-comment-id:724132536 -->
Author
Owner

Your certificate is a self-signed certificate. if the certificate is self-signed you will always get "Unable to get issuer cert locally" or similar invalids - this is the case with any Self Signed certificate.

There are cases this can be adjusted - internal Certificate Authority systems for instance will have the CA cert added to the system store and then added to the cert chain. However, your system will error hard on that if it's self-signed. Likely, LibreSSL is expecting a 'valid identity certificate' (which is unusual since OpenSSL doesn't have that problem). (Also, your key/cert lines are inverted - you need to have key and then cert I believe for the PEM to work anyways)

Your certificate is a self-signed certificate. if the certificate is self-signed you will *always* get "Unable to get issuer cert locally" or similar invalids - this is the case with any Self Signed certificate. There are cases this can be adjusted - internal Certificate Authority systems for instance will have the CA cert added to the system store and then added to the cert chain. However, your system will error hard on that if it's self-signed. Likely, LibreSSL is expecting a 'valid identity certificate' (which is unusual since OpenSSL doesn't have that problem). (Also, your key/cert lines are inverted - you need to have key and then cert I believe for the PEM to work anyways) <!-- github-comment-id:724136797 -->
Author
Owner

if the certificate is self-signed you will always get "Unable to get issuer cert locally" or similar invalids

@teward In that case: How does certauth work for anyone? That module explicitly ignores the "usual" errors, so something must be different with this cert. If verification would fail with X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN or X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT or X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE, everything would be fine.

> if the certificate is self-signed you will always get "Unable to get issuer cert locally" or similar invalids @teward In that case: How does certauth work for anyone? That module explicitly ignores the "usual" errors, so something must be different with this cert. If verification would fail with `X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN` or `X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT` or `X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE`, everything would be fine. <!-- github-comment-id:724142263 -->
Author
Owner

Unless the error codes aren't properly handled. However I think your key and cert are inverted in your PEM (most secret item comes first!) so I think you need to switch the order in your PEM file. Because I think it's seeing it just as a bare cert not a private identity cert.

This said, I'm OpenSSL fluent in this, not LibreSSL fluent - so my statements are just statements from the OpenSSL side of things.

Is it possible that LibreSSL is throwing an invalid status here? OpenSSL handles this properly ;)

Unless the error codes aren't properly handled. However I think your key and cert are inverted in your PEM (most secret item comes first!) so I think you need to switch the order in your PEM file. Because I think it's seeing it just as a bare cert not a private identity cert. This said, I'm OpenSSL fluent in this, not LibreSSL fluent - so my statements are just statements from the OpenSSL side of things. Is it possible that LibreSSL is throwing an invalid status here? OpenSSL handles this properly ;) <!-- github-comment-id:724143405 -->
Author
Owner

Hm. I tried to reproduce this using openssl s_client -cert /tmp/foo.pem -key /tmp/foo.pem -connect localhost:1234 and this works with the files that were provided above (current debian testing; only OpenSSL involved). (Yes, I had to type IRC commands to load certauth and have it add the certificate. I do not want to do this again. I miss backspace.)

(I just updated my system (there was an openssl update) and this still works.)

Hm. I tried to reproduce this using `openssl s_client -cert /tmp/foo.pem -key /tmp/foo.pem -connect localhost:1234` and this works with the files that were provided above (current debian testing; only OpenSSL involved). (Yes, I had to type IRC commands to load `certauth` and have it add the certificate. I do not want to do this again. I miss backspace.) (I just updated my system (there was an openssl update) and this still works.) <!-- github-comment-id:724148969 -->
Author
Owner

Hm. I tried to reproduce this using openssl s_client ...

Yes, I tested as well. The problem I see here is that unlike Debian/Ubuntu and most systems which are OpenSSL driven, this bug specifically says LibreSSL is involved - which means that it is likely LibreSSL failing to process the certificate properly and returning the error; it's also possible this is Not A ZNC Problem technically if LibreSSL fails hard.

> Hm. I tried to reproduce this using `openssl s_client ...` Yes, I tested as well. The problem I see here is that unlike Debian/Ubuntu and most systems which are OpenSSL driven, **this bug specifically says LibreSSL is involved** - which means that it is likely LibreSSL failing to process the certificate properly and returning the error; it's also possible this is Not A ZNC Problem technically if LibreSSL fails hard. <!-- github-comment-id:724150902 -->
Author
Owner

LibreSSL 3.2.2 has a new/replacement X.509 verifier that addresses a bunch of problems with the original OpenSSL based X.509 verifier. Unfortunately, there are loads of corner cases and particular API behaviour (much of it undocumented) that various pieces of software depend on. We'll take a look at this - I suspect we're returning X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY where the previous verifier was failing in a different way. Thanks for providing the relevant details/code snippets from the znc side.

LibreSSL 3.2.2 has a new/replacement X.509 verifier that addresses a bunch of problems with the original OpenSSL based X.509 verifier. Unfortunately, there are loads of corner cases and particular API behaviour (much of it undocumented) that various pieces of software depend on. We'll take a look at this - I suspect we're returning `X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY` where the previous verifier was failing in a different way. Thanks for providing the relevant details/code snippets from the znc side. <!-- github-comment-id:724163233 -->
Author
Owner

Yeah, sorry folks, the legacy validation API is pretty squirrelly, and some of the legacy errors actually don't make any sense when you actually chase down all possible chains. Nevertheless I have a candidate fix and we should be able to have this thing feeding you back the legacy "self signed" errors in the relevant special cases very soon. Thanks for the report.

Yeah, sorry folks, the legacy validation API is pretty squirrelly, and some of the legacy errors actually *don't make any sense* when you actually chase down all possible chains. Nevertheless I have a candidate fix and we should be able to have this thing feeding you back the legacy "self signed" errors in the relevant special cases very soon. Thanks for the report. <!-- github-comment-id:725701953 -->
Author
Owner

Of note -> "fail hard" is still fail. We still fail validation in this case, it's simply how you choose to interpret the error code (and yes I understand the awful legacy here that forces you to do that ;)

Of note -> "fail hard" is still fail. We still fail validation in this case, it's simply how you choose to interpret the error code (and yes I understand the awful legacy here that forces you to do that ;) <!-- github-comment-id:725702426 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#966