From dkg at fifthhorseman.net Wed Apr 9 23:31:25 2014 From: dkg at fifthhorseman.net (Daniel Kahn Gillmor) Date: Wed, 09 Apr 2014 17:31:25 -0400 Subject: [mod_gnutls-devel] [gnutls-help] need help with SNI In-Reply-To: <4cd300b1b475f74845e41ff906ac7301@mail.zaplinski.de> References: <4cd300b1b475f74845e41ff906ac7301@mail.zaplinski.de> Message-ID: <5345BC2D.3000108@fifthhorseman.net> On 04/09/2014 10:55 AM, Olaf Zaplinski wrote: > I have a problem with SNI. > > I have 3 name based vhosts with GnuTLS. I think you're stalking about apache with mod_gnutls. I'm sending this response to mod_gnutls-devel at lists.gnutls.org since that's a better place for apache-related mod_gnutls questions. please follow up there. > jne.example.com runs with a certificate *.example.com from CA #1 > alice.example.net runs with certificate alice.example.net from CA #2 > bob.example.com runs with certificate bob.example.com from CA #2 > > In fact, joe is my (Debian) default host with config file > /etc/apache2/sites-available/default-tls > > The two first hosts work fine, but host bob presents the certificate > from joe. It works because this certificate is a wildcard one, but I > would like to know why GnuTLS refuses to present the certificate that I > had configured. can you be more specific about apache, mod_gnutls, and your configuration? it would help to know: * version information (of apache, of gnutls, of mod_gnutls) * concrete configuration file excerpts that you think might be relevant. it does sound like there might be an SNI matching issue that we could tighten up (presumably we'd want to take the most-specific match possible, rather than the first-matching cert). Regards, --dkg -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 1010 bytes Desc: OpenPGP digital signature URL: From dkg at fifthhorseman.net Thu Apr 10 00:20:21 2014 From: dkg at fifthhorseman.net (Daniel Kahn Gillmor) Date: Wed, 09 Apr 2014 18:20:21 -0400 Subject: [mod_gnutls-devel] [gnutls-help] need help with SNI In-Reply-To: <5345BFF7.40109@zaplinski.de> References: <4cd300b1b475f74845e41ff906ac7301@mail.zaplinski.de> <5345BC2D.3000108@fifthhorseman.net> <5345BFF7.40109@zaplinski.de> Message-ID: <5345C7A5.6000302@fifthhorseman.net> On 04/09/2014 05:47 PM, Olaf Zaplinski wrote: > I found a blog mentioning that GnuTLS has problems with subjectAltName: > > http://jan-krueger.net/development/mod_gnutls-and-startssl-level-1-certificates-the-problem-and-solution that blog post is from more than three years ago. It may not reflect the version of mod_gnutls you're using today. what version of apache are you running? what version of gnutls are you running? what version of mod_gnutls are you running? Your earlier message to gnutls-help provides this link: https://0.jmt.gr/?4d9b07a686545531#fMZ3M2aQ1fPk87BVQNICFgwo3giEBCtIt55lNvFRg4k= this is a zerobin site, certified by CACert, sending Strict-Transport-Security headers. For people without the CACert root CA in their trust store, even if they make a temporary allowance for the guest cert, the STS header will cause the browser to reject the connection with no user clickthrough allowed. zerobin also needs javascript, so falling back to wget --no-check-certificate doesn't produce anything a human can understand. I don't want this to turn into a discussion about the relative merits of CACert or the CA cartel or javascript or supposedly-ephemeral data, but my point is if you want people on the internet to help figure things out, making it easier for them to see the data they need to see to understand the situation is probably a good idea. if there are redacted configs that you're willing to publish, it is helpful to include them directly in your e-mail response. thanks, --dkg -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 1010 bytes Desc: OpenPGP digital signature URL: From olaf at zaplinski.de Wed Apr 9 23:47:35 2014 From: olaf at zaplinski.de (Olaf Zaplinski) Date: Wed, 09 Apr 2014 23:47:35 +0200 Subject: [mod_gnutls-devel] [gnutls-help] need help with SNI In-Reply-To: <5345BC2D.3000108@fifthhorseman.net> References: <4cd300b1b475f74845e41ff906ac7301@mail.zaplinski.de> <5345BC2D.3000108@fifthhorseman.net> Message-ID: <5345BFF7.40109@zaplinski.de> Am 09.04.2014 23:31, schrieb Daniel Kahn Gillmor: > On 04/09/2014 10:55 AM, Olaf Zaplinski wrote: >> I have a problem with SNI. >> >> I have 3 name based vhosts with GnuTLS. > > > I think you're stalking about apache with mod_gnutls. Correct. > I'm sending this response to mod_gnutls-devel at lists.gnutls.org since > that's a better place for apache-related mod_gnutls questions. please > follow up there. OK. But I will keep this list on CC, ok? > it does sound like there might be an SNI matching issue that we could > tighten up (presumably we'd want to take the most-specific match > possible, rather than the first-matching cert). I found a blog mentioning that GnuTLS has problems with subjectAltName: http://jan-krueger.net/development/mod_gnutls-and-startssl-level-1-certificates-the-problem-and-solution Sounds like my problem: GnuTLS chooses the "wrong" certificate. Olaf From BenBE1987 at gmx.net Thu Apr 10 08:36:04 2014 From: BenBE1987 at gmx.net (Benny Baumann) Date: Thu, 10 Apr 2014 08:36:04 +0200 Subject: [mod_gnutls-devel] [gnutls-help] need help with SNI In-Reply-To: <5345BFF7.40109@zaplinski.de> References: <4cd300b1b475f74845e41ff906ac7301@mail.zaplinski.de> <5345BC2D.3000108@fifthhorseman.net> <5345BFF7.40109@zaplinski.de> Message-ID: <53463BD4.5020501@gmx.net> Hi Olaf, Am 09.04.2014 23:47, schrieb Olaf Zaplinski: > Am 09.04.2014 23:31, schrieb Daniel Kahn Gillmor: >> On 04/09/2014 10:55 AM, Olaf Zaplinski wrote: >>> I have a problem with SNI. >>> >>> I have 3 name based vhosts with GnuTLS. >> >> I think you're stalking about apache with mod_gnutls. > > Correct. > >> I'm sending this response to mod_gnutls-devel at lists.gnutls.org since >> that's a better place for apache-related mod_gnutls questions. please >> follow up there. > > OK. But I will keep this list on CC, ok? > >> it does sound like there might be an SNI matching issue that we could >> tighten up (presumably we'd want to take the most-specific match >> possible, rather than the first-matching cert). > > I found a blog mentioning that GnuTLS has problems with subjectAltName: > > http://jan-krueger.net/development/mod_gnutls-and-startssl-level-1-certificates-the-problem-and-solution > > > Sounds like my problem: GnuTLS chooses the "wrong" certificate. Could you please check if you can install the latest mod_gnutls from trunk? Some issues with VHosts were fixed with 0.6 but being bleeding-edge might be worth a try. > > Olaf > Regards, BenBE. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 482 bytes Desc: OpenPGP digital signature URL: From olaf at zaplinski.de Thu Apr 10 09:53:28 2014 From: olaf at zaplinski.de (Olaf Zaplinski) Date: Thu, 10 Apr 2014 09:53:28 +0200 Subject: [mod_gnutls-devel] =?utf-8?q?=5Bgnutls-help=5D_need_help_with_SNI?= In-Reply-To: <53463BD4.5020501@gmx.net> References: <4cd300b1b475f74845e41ff906ac7301@mail.zaplinski.de> <5345BC2D.3000108@fifthhorseman.net> <5345BFF7.40109@zaplinski.de> <53463BD4.5020501@gmx.net> Message-ID: Am 2014-04-10 08:36, schrieb Benny Baumann: > Could you please check if you can install the latest mod_gnutls from > trunk? Some issues with VHosts were fixed with 0.6 but being > bleeding-edge might be worth a try. I could try that, but meanwhile I have found that the wildard certificate is the reason. When I disable it, everything is fine. Cheers Olaf From n.mavrogiannopoulos at gmail.com Fri Apr 11 11:42:57 2014 From: n.mavrogiannopoulos at gmail.com (Nikos Mavrogiannopoulos) Date: Fri, 11 Apr 2014 11:42:57 +0200 Subject: [mod_gnutls-devel] mod_gnutls + pkcs11 = less data leaked (?) Message-ID: Hello, I was thinking ways of how a memory leakage in mod_gnutls could have prevented revealing secrets such as the server's private key, and I think that this could be "easily" doable if mod_gnutls would support pkcs11 keys (from a quick glimpse I think it doesn't yet). If it would support it, then one could use a software security module such as: http://www.clizio.com/lsmpkcs11.html and separate the private key operations from the server process. I put "easily" on quotes because unfortunately lsm-pkcs11 seem to be a dead project and more modern modules like softhsm [0] don't use any isolation between the key operations and the calling process. Nevertheless, I think it would be a good feature to have. regards, Nikos [0]. http://www.opendnssec.org/softhsm/ From dkg at fifthhorseman.net Fri Apr 11 16:17:29 2014 From: dkg at fifthhorseman.net (Daniel Kahn Gillmor) Date: Fri, 11 Apr 2014 10:17:29 -0400 Subject: [mod_gnutls-devel] mod_gnutls + pkcs11 = less data leaked (?) In-Reply-To: References: Message-ID: <5347F979.7030006@fifthhorseman.net> On 04/11/2014 05:42 AM, Nikos Mavrogiannopoulos wrote: > I was thinking ways of how a memory leakage in mod_gnutls could have > prevented revealing secrets such as the server's private key, and I > think that this could be "easily" doable if mod_gnutls would support > pkcs11 keys (from a quick glimpse I think it doesn't yet). If it would > support it, then one could use a software security module such as: > http://www.clizio.com/lsmpkcs11.html > and separate the private key operations from the server process. I put > "easily" on quotes because unfortunately lsm-pkcs11 seem to be a dead > project and more modern modules like softhsm [0] don't use any > isolation between the key operations and the calling process. > > Nevertheless, I think it would be a good feature to have. yes, i agree! I actually nudged the mod_ssl folks about this sort of thing (though not in pkcs11 exactly) recently. I've recorded this feature suggestion here: https://mod.gnutls.org/ticket/23 I'd be happy to see patches or even a proposed API for it. --dkg -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 1010 bytes Desc: OpenPGP digital signature URL: From n.mavrogiannopoulos at gmail.com Fri Apr 11 16:31:36 2014 From: n.mavrogiannopoulos at gmail.com (Nikos Mavrogiannopoulos) Date: Fri, 11 Apr 2014 16:31:36 +0200 Subject: [mod_gnutls-devel] mod_gnutls + pkcs11 = less data leaked (?) In-Reply-To: <5347F979.7030006@fifthhorseman.net> References: <5347F979.7030006@fifthhorseman.net> Message-ID: On Fri, Apr 11, 2014 at 4:17 PM, Daniel Kahn Gillmor wrote: >> I was thinking ways of how a memory leakage in mod_gnutls could have >> prevented revealing secrets such as the server's private key, and I >> think that this could be "easily" doable if mod_gnutls would support >> pkcs11 keys (from a quick glimpse I think it doesn't yet). If it would >> support it, then one could use a software security module such as: >> http://www.clizio.com/lsmpkcs11.html >> and separate the private key operations from the server process. I put >> "easily" on quotes because unfortunately lsm-pkcs11 seem to be a dead >> project and more modern modules like softhsm [0] don't use any >> isolation between the key operations and the calling process. >> Nevertheless, I think it would be a good feature to have. > yes, i agree! I actually nudged the mod_ssl folks about this sort of > thing (though not in pkcs11 exactly) recently. > I've recorded this feature suggestion here: > https://mod.gnutls.org/ticket/23 > I'd be happy to see patches or even a proposed API for it. The easiest for pkcs11 support would be to allow pkcs11 urls in the key file directive, use gnutls_pkcs11_privkey_import_url() to import it, and the on the callback to read the certificate set the gnutls_pkcs11_privkey_t as key. That could be tested with softhsm (it's a pretty good implementation). That's pretty much the easy part. The hard part is to find a software module like pkcs11-lsm that enforces separation between keys and the server. An alternative could be to fork() out a custom security-module as done in ocserv [0] and use that. Although that would be simpler for now, I think the approach with pkcs11 is better. [0]. http://git.infradead.org/ocserv.git/blob/HEAD:/src/sec-mod.c regards, Nikos From dkg at fifthhorseman.net Thu Apr 24 15:20:48 2014 From: dkg at fifthhorseman.net (Daniel Kahn Gillmor) Date: Thu, 24 Apr 2014 09:20:48 -0400 Subject: [mod_gnutls-devel] [gnutls-help] Configure gnutls with apache in windows In-Reply-To: <3582894D7E3C1141A7D0D3132B8EC38B36E5B4C044@GS-EX01.GainSpan.LAN> References: <3582894D7E3C1141A7D0D3132B8EC38B36E5B4C044@GS-EX01.GainSpan.LAN> Message-ID: <53590FB0.2020501@fifthhorseman.net> On 04/24/2014 06:44 AM, Venkata Chaitanya wrote: > I am new to gnutls and so far I was using openssl module for my apache on windows platform can you help me in moving to gnutls for apache on windows. I think you're interested in mod_gnutls, which is the module that connects apache to gnutls. The mailing list for that project is: mod_gnutls-devel at lists.gnutls.org (i'm cc'ing there and setting followup there too; i'm one of the developers on the project) I don't think anyone has built the latest version of mod_gnutls on Windows, and i don't have a Windows development machine to try it myself. If you'd like to try building it for Windows and reporting what you did, and what problems you run into, i'd be happy to try to help you figure it out. --dkg -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 1010 bytes Desc: OpenPGP digital signature URL: