RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1295490 - [RFE] Add server-side Server Name Indication (SNI) support
Summary: [RFE] Add server-side Server Name Indication (SNI) support
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mod_nss
Version: 6.6
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Matthew Harmsen
QA Contact: Kaleem
Aneta Šteflová Petrová
URL:
Whiteboard:
Depends On: 1053327
Blocks: 101652
TreeView+ depends on / blocked
 
Reported: 2016-01-04 16:53 UTC by Robert Bost
Modified: 2019-12-16 05:14 UTC (History)
18 users (show)

Fixed In Version: mod_nss-1.0.10-5.el6
Doc Type: Release Note
Doc Text:
mod_nss now supports server-side SNI This update adds server-side Server Name Indication (SNI) support to the *mod_nss* package.
Clone Of: 1053327
: 1400745 (view as bug list)
Environment:
Last Closed: 2016-05-10 19:41:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Configuration file diff to add an SNI virtualhost (1.23 KB, patch)
2016-01-19 15:46 UTC, Rob Crittenden
no flags Details | Diff
console.log (8.29 KB, text/html)
2016-02-18 08:52 UTC, Abhijeet Kasurde
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Mozilla Foundation 360421 0 -- NEW Implement TLS Server Name Indication for servers 2020-02-28 04:58:35 UTC
Red Hat Product Errata RHBA-2016:0751 0 normal SHIPPED_LIVE mod_nss bug fix and enhancement update 2016-05-10 22:31:54 UTC

Comment 10 Matthew Harmsen 2016-01-19 04:19:57 UTC
I applied the patches and configuration file changes per the procedure in the email, and built and installed the SNI-aware mod_nss.

I returned the email with more "verbose" instructions to make it easier for developers and QE to replicate the test.

If the question regarding the two "HTTP/1.1 403 Forbidden" errors are the expected error codes for the two examples, then ACK.

Comment 11 Rob Crittenden 2016-01-19 15:45:22 UTC
Instructions for testing.

Set up a separate location to serve the SNI data:

# mkdir /var/www/sni1
# vi /var/www/sni1/index.html
<html>
<body>
<h1>SNI Works!</h1>
</body>
</html>

Create basic content for the web server:

# vi /var/www/html/index.html
<html>
<body>
<h1>Welcome to Apache</h1>
</body>
</html>

Update /etc/hosts and add in www1.example.com and www2.example.com as an alias for your host IP (or use DNS if you'd rather).

# service httpd stop

Generate a new cert. You can add -z </path/to/some/file> to not require user interaction:

# certutil -d /etc/httpd/alias -S -n "Server-Cert-www1.example.com" -s "CN=www1.example.com,O=example.com,C=US" -c "cacert" -t "u,u,u" --nsCertType sslServer --keyUsage keyEncipherment -8 www1.example.com

Create a PEM copy of the CA:
# certutil -d /etc/httpd/alias -L -n cacert -a > /etc/httpd/alias/ca.pem

Apply the attached diff to /etc/httpd/conf.d/nss.conf to add in the SNI configuration.

# service httpd start

Test basic SSL support:

# curl --cacert /etc/httpd/alias/ca.pem -v https://`hostname`:8443/

Your output should be a 200 status and contain "Welcome to Apache"

Logs should be something like:

[date] [debug] nss_engine_init.c(1883): SNI: Found nickname Server-Cert for vhost: somehost
[date] [debug] nss_engine_init.c(1905): SNI: Successfully paired vhost somehost with nickname: Server-Cert
[date] [debug] nss_engine_kernel.c(93): SNI request for somehost

Test SNI:

# curl --cacert /etc/httpd/alias/ca.pem -v https://www1.example.com:8443/

Your output should be a 200 status and contain "SNI Works!"

Logs should be something like:

[date] [debug] nss_engine_init.c(1883): SNI: Found nickname Server-Cert-www1.example.com for vhost: www1.example.com
[date] [debug] nss_engine_init.c(1905): SNI: Successfully paired vhost www1.example.com with nickname: Server-Cert-www1.example.com

Test an SNI request for a VH that isn't configured:

# curl -kv https://www2.example.com:8443/

You should get "Welcome to Apache" as it should fall back to the default VH.

Logs should look something like:

[date] [debug] nss_engine_init.c(1860): SNI: No matching SSL virtual host for servername www2.example.com found (using default/first virtual host)
[date] [debug] nss_engine_kernel.c(93): SNI request for www2.example.com
[Tue Jan 19 10:35:04 2016] [info] Initial (No.1) HTTPS request received for child 4 (server somehost:8443)

Most of the SNI-related logging with SNI: so it should be easy to pull out of the logs

Comment 12 Rob Crittenden 2016-01-19 15:46:14 UTC
Created attachment 1116259 [details]
Configuration file diff to add an SNI virtualhost

Comment 14 Abhijeet Kasurde 2016-02-18 08:52:16 UTC
Verified using mod_nss version::
mod_nss-1.0.10-5.el6.x86_64

See attachment for steps and console log.

Comment 15 Abhijeet Kasurde 2016-02-18 08:52:50 UTC
Created attachment 1128165 [details]
console.log

Comment 22 errata-xmlrpc 2016-05-10 19:41:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0751.html


Note You need to log in before you can comment on or make changes to this bug.