• Home
Name Date Size #Lines LOC

..--

READMED03-May-2024947 2015

another.invalid.crtD03-May-2024985 1817

another.invalid.keyD03-May-2024891 1615

client.pyD03-May-2024909 3725

example.invalid.crtD03-May-2024985 1817

example.invalid.keyD03-May-2024887 1615

server.pyD03-May-20241.6 KiB6648

README

1This directory contains client and server examples for the "Server Name
2Indication" (SNI) feature.
3
4Run server.py with no arguments.  It will accept one client connection and
5then exit.  It has two certificates it can use, one for "example.invalid"
6and another for "another.invalid".  If a client indicates one of these names
7to it, it will use the corresponding certificate for that connection (if a
8client doesn't indicate a name or indicates another name, it won't try to
9use any certificate).
10
11Run client.py with one argument, the server name to indicate.  For example:
12
13  $ python client.py example.invalid
14  Connecting... connected ('127.0.0.1', 8443)
15  Server subject is <X509Name object '/OU=Security/O=pyOpenSSL/CN=example.invalid/ST=New York/C=US/emailAddress=invalid@example.invalid/L=New York'>
16  $
17
18Depending on what hostname is supplied, the server will select a different
19certificate to use and the client output will be different.
20