| Jean-Paul Calderone | 7fb6b21 | 2011-06-06 08:31:28 -0400 | [diff] [blame] | 1 | This directory contains client and server examples for the "Server Name |
| 2 | Indication" (SNI) feature. |
| 3 | |
| 4 | Run server.py with no arguments. It will accept one client connection and |
| 5 | then exit. It has two certificates it can use, one for "example.invalid" |
| 6 | and another for "another.invalid". If a client indicates one of these names |
| 7 | to it, it will use the corresponding certificate for that connection (if a |
| 8 | client doesn't indicate a name or indicates another name, it won't try to |
| 9 | use any certificate). |
| 10 | |
| 11 | Run 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 | |
| 18 | Depending on what hostname is supplied, the server will select a different |
| 19 | certificate to use and the client output will be different. |