From: "Peter Moylan" Received: from [192.168.100.201] (HELO mail.2rosenthals.com) by 2rosenthals.com (CommuniGate Pro SMTP 5.4.10) with ESMTP id 11330740 for ecs-isp@2rosenthals.com; Sat, 07 Dec 2024 23:08:00 -0500 Received: from secmgr-va.2rosenthals.com ([50.73.8.217]:38253 helo=mail2.2rosenthals.com) by mail.2rosenthals.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1tK8aE-000000002zF-20o2 for ecs-isp@2rosenthals.com; Sat, 07 Dec 2024 23:07:51 -0500 Received: from pmoylan.org ([144.6.37.71]:58439 helo=mail.pmoylan.org) by mail2.2rosenthals.com with esmtp (Exim 4.97.1) (envelope-from ) id 1tK8a5-000000003Su-1RK4 for ecs-isp@2rosenthals.com; Sat, 07 Dec 2024 23:07:42 -0500 X-SASI-Hits: BODY_ENDS_IN_URL 0.000000, BODY_SIZE_3000_3999 0.000000, BODY_SIZE_5000_LESS 0.000000, BODY_SIZE_7000_LESS 0.000000, CTE_7BIT 0.000000, DKIM_ALIGNS 0.000000, DKIM_SIGNATURE 0.000000, HTML_00_01 0.050000, HTML_00_10 0.050000, IN_REP_TO 0.000000, KNOWN_MSGID 0.000000, LEGITIMATE_SIGNS 0.000000, MSG_THREAD 0.000000, NO_URI_HTTPS 0.000000, REFERENCES 0.000000, SENDER_NO_AUTH 0.000000, SINGLE_URI_IN_BODY 0.000000, SUSP_DH_NEG 0.000000, TO_IN_SUBJECT 0.500000, USER_AGENT 0.000000, __ANY_URI 0.000000, __BODY_NO_MAILTO 0.000000, __BOUNCE_CHALLENGE_SUBJ 0.000000, __BOUNCE_NDR_SUBJ_EXEMPT 0.000000, __CP_URI_IN_BODY 0.000000, __CT 0.000000, __CTE 0.000000, __CT_TEXT_PLAIN 0.000000, __DKIM_ALIGNS_1 0.000000, __DKIM_ALIGNS_2 0.000000, __DQ_NEG_DOMAIN 0.000000, __DQ_NEG_HEUR 0.000000, __DQ_NEG_IP 0.000000, __FORWARDED_MSG 0.000000, __FUR_HEADER 0.000000, __HAS_FROM 0.000000, __HAS_MSGID 0.000000, __HAS_REFERENCES 0.000000, __HEADER_ORDER_FROM 0.000000, __INVOICE_MULTILINGUAL 0.000000, __IN_REP_TO 0.000000, __MAIL_CHAIN 0.000000, __MIME_BOUND_CHARSET 0.000000, __MIME_TEXT_ONLY 0.000000, __MIME_TEXT_P 0.000000, __MIME_TEXT_P1 0.000000, __MIME_VERSION 0.000000, __MOZILLA_MSGID 0.000000, __MOZILLA_USER_AGENT 0.000000, __RCVD_FROM_DOMAIN 0.000000, __REFERENCES 0.000000, __SANE_MSGID 0.000000, __SCAN_D_NEG 0.000000, __SCAN_D_NEG2 0.000000, __SCAN_D_NEG_HEUR 0.000000, __SCAN_D_NEG_HEUR2 0.000000, __SINGLE_URI_TEXT 0.000000, __SUBJ_ALPHA_END 0.000000, __SUBJ_ALPHA_NEGATE 0.000000, __SUBJ_REPLY 0.000000, __TO_IN_SUBJECT 0.000000, __TO_MALFORMED_2 0.000000, __TO_NAME 0.000000, __TO_NAME_DIFF_FROM_ACC 0.000000, __TO_REAL_NAMES 0.000000, __URI_IN_BODY 0.000000, __URI_MAILTO 0.000000, __URI_NOT_IMG 0.000000, __URI_NO_PATH 0.000000, __URI_NS 0.000000, __URI_WITHOUT_PATH 0.000000, __USER_AGENT 0.000000 X-SASI-Probability: 9% X-SASI-RCODE: 200 X-SASI-Version: Antispam-Engine: 5.1.4, AntispamData: 2024.12.8.31846 X-SASI-Hits: BODY_ENDS_IN_URL 0.000000, BODY_SIZE_3000_3999 0.000000, BODY_SIZE_5000_LESS 0.000000, BODY_SIZE_7000_LESS 0.000000, CTE_7BIT 0.000000, DKIM_ALIGNS 0.000000, DKIM_SIGNATURE 0.000000, HTML_00_01 0.050000, HTML_00_10 0.050000, IN_REP_TO 0.000000, KNOWN_MSGID 0.000000, LEGITIMATE_SIGNS 0.000000, MSG_THREAD 0.000000, NO_URI_HTTPS 0.000000, REFERENCES 0.000000, SENDER_NO_AUTH 0.000000, SINGLE_URI_IN_BODY 0.000000, SUSP_DH_NEG 0.000000, TO_IN_SUBJECT 0.500000, USER_AGENT 0.000000, __ANY_URI 0.000000, __BODY_NO_MAILTO 0.000000, __BOUNCE_CHALLENGE_SUBJ 0.000000, __BOUNCE_NDR_SUBJ_EXEMPT 0.000000, __CP_URI_IN_BODY 0.000000, __CT 0.000000, __CTE 0.000000, __CT_TEXT_PLAIN 0.000000, __DKIM_ALIGNS_1 0.000000, __DKIM_ALIGNS_2 0.000000, __DQ_NEG_DOMAIN 0.000000, __DQ_NEG_HEUR 0.000000, __DQ_NEG_IP 0.000000, __FORWARDED_MSG 0.000000, __FUR_HEADER 0.000000, __HAS_FROM 0.000000, __HAS_MSGID 0.000000, __HAS_REFERENCES 0.000000, __HEADER_ORDER_FROM 0.000000, __INVOICE_MULTILINGUAL 0.000000, __IN_REP_TO 0.000000, __MAIL_CHAIN 0.000000, __MIME_BOUND_CHARSET 0.000000, __MIME_TEXT_ONLY 0.000000, __MIME_TEXT_P 0.000000, __MIME_TEXT_P1 0.000000, __MIME_VERSION 0.000000, __MOZILLA_MSGID 0.000000, __MOZILLA_USER_AGENT 0.000000, __RCVD_FROM_DOMAIN 0.000000, __REFERENCES 0.000000, __SANE_MSGID 0.000000, __SCAN_D_NEG 0.000000, __SCAN_D_NEG2 0.000000, __SCAN_D_NEG_HEUR 0.000000, __SCAN_D_NEG_HEUR2 0.000000, __SINGLE_URI_TEXT 0.000000, __SUBJ_ALPHA_END 0.000000, __SUBJ_ALPHA_NEGATE 0.000000, __SUBJ_REPLY 0.000000, __TO_IN_SUBJECT 0.000000, __TO_MALFORMED_2 0.000000, __TO_NAME 0.000000, __TO_NAME_DIFF_FROM_ACC 0.000000, __TO_REAL_NAMES 0.000000, __URI_IN_BODY 0.000000, __URI_MAILTO 0.000000, __URI_NOT_IMG 0.000000, __URI_NO_PATH 0.000000, __URI_NS 0.000000, __URI_WITHOUT_PATH 0.000000, __USER_AGENT 0.000000 X-SASI-Probability: 9% X-SASI-RCODE: 200 X-SASI-Version: Antispam-Engine: 5.1.4, AntispamData: 2024.12.8.33646 DKIM-Signature: v=1; q=dns/txt; a=rsa-sha256; c=relaxed/relaxed; s=default; d=pmoylan.org; bh=OCBRxRFKX0xRFxFoNEF+sOps3bx+ZHkL/VMo6P+c5H8=; h=From:To:Date:Message-ID; b=ayA6o4tRmoypNQ2jyuldTg8ppbYnVJZG785tnUIs0DbVOHKgbCgQjOUP/4zYgdf5+7E8w ikzGs/xQXAZIel4VNX/mdxO6nBeeHZxrP4e7+E3DsedMbIA3dzFzhA7lyTOElV9wpl7Dwpi a+mLEKNjCyQTl4KjsecO36iPm3qCd04= Received: from [192.168.20.3] (peter.pmoylan.org [192.168.20.3]) by mail.pmoylan.org (Weasel v3.0) for ; Sun, 08 Dec 2024 15:07:39 +1100 Subject: Re: [eCS-ISP] Getting started with Let's Encrypt To: eCS ISP Mailing List References: Message-ID: <67551B89.2030100@pmoylan.org> Date: Sun, 8 Dec 2024 15:07:37 +1100 User-Agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 07/12/24 17:33, Steven Levine wrote: > In , on 12/07/24 at 01:28 PM, "Peter > Moylan" said: > >> Yes, in one way. I only have one server machine, with a single >> external IP address, so all domains that I host will have to go on >> the same certificate. > > This may work best for you and may be required for your webserve2 > implementation, but this is server dependent and not required in > general. For apache httpd, each virtual host can have its own cert > and private key. > >> (Unless I have missed seeing some detail, there is no way to know >> which domain is being addressed until the TLS negotiation is >> finished.) > > This does not seem to be the case for apache httpd. I'd need to do > some research to understand why. If anyone knows the answer to this paradox I would love to hear it, because this question has me greatly puzzled. As I understand it, the sequence of events is: 1. The web client, knowing which domain it wants to access, uses a DNS lookup to get an IP address. It then connects to that IP address. 2. The server sees the connection, and as a result it finds out the IP addresses at both ends. These IP addresses are the ONLY thing it knows. It has no domain name information. 3. The client sends a ClientHello message, starting the handshake negotiation. 4. Client and server exchange several other messages, including the certificate sent from the server to the client. 5. At the end of the handshaking, both client and server have switched to encrypted communication. 6. The client now sends an HTTP command (probably GET). The parameters of this command include a specification of which domain is being addressed. Step 6 is the earliest point at which the server knows which domain it is acting on behalf of. At that point, the certificate has already been sent. So how is it possible to have one certificate per domain, in a web server that hosts several domains, but only has one IP address for all those domains? While writing this, I found a partial answer on Stack Exchange. But, multiple certificates on the same system can be a problem when you try to serve multiple domains from a single IP address. In this case the client needs to use the Server Name Indication (SNI) extension to signal the server which of the hosts it tries to access. While SNI is supported by all recent web browsers it is not supported by older browser ... This seems to be the answer. The Wikipedia article on SNI says that the feature was introduced in 2003, to solve precisely the problem I'm asking about, so it's not surprising that Apache can do it. In fact the Wikipedia article effectively says that, prior to SNI, secure servers could only host one domain, because of the difficulty of getting certifcates that covered multiple domains. Now I'll have to look up RFC 6066, and implement it on my web server. (I am now starting to understand that the whole point of "hello extensions" in TLS is to work around bugs in the original SSL design.) -- Peter Moylan peter@pmoylan.org http://www.pmoylan.org