0
votes

Here's output from Wireshark:

1) TLS v1.0, server raises Unsupported Extension (110) alert:

    TLSv1 Record Layer: Handshake Protocol: Client Hello
        Content Type: Handshake (22)
        Version: TLS 1.0 (0x0301)
        Length: 78
        Handshake Protocol: Client Hello
            Handshake Type: Client Hello (1)
            Length: 74
            Version: TLS 1.0 (0x0301)
            Random
            Session ID Length: 0
            Cipher Suites Length: 8
            Cipher Suites (4 suites)
                Cipher Suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA (0x0039)
                Cipher Suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x0033)
                Cipher Suite: TLS_RSA_WITH_AES_128_CBC_SHA (0x002f)
                Cipher Suite: TLS_EMPTY_RENEGOTIATION_INFO_SCSV (0x00ff)
            Compression Methods Length: 1
            Compression Methods (1 method)
                Compression Method: null (0)
            Extensions Length: 25
            Extension: server_name
                Type: server_name (0x0000)
                Length: 21
                Server Name Indication extension
                    Server Name list length: 19
                    Server Name Type: host_name (0)
                    Server Name length: 16
                    Server Name: www.google.co.uk

    TLSv1 Record Layer: Handshake Protocol: Server Hello
        Content Type: Handshake (22)
        Version: TLS 1.0 (0x0301)
        Length: 85
        Handshake Protocol: Server Hello
            Handshake Type: Server Hello (2)
            Length: 81
            Version: TLS 1.0 (0x0301)
            Random
            Session ID Length: 32
            Session ID: 56b1b6faae75e76baecb8a5727480a2b7687315baaeceb06...
            Cipher Suite: TLS_RSA_WITH_AES_128_CBC_SHA (0x002f)
            Compression Method: null (0)
            Extensions Length: 9
            Extension: renegotiation_info
                Type: renegotiation_info (0xff01)
                Length: 1
                Renegotiation Info extension
            Extension: server_name
                Type: server_name (0x0000)
                Length: 0

    TLSv1 Record Layer: Handshake Protocol: Server Hello Done
        Content Type: Handshake (22)
        Version: TLS 1.0 (0x0301)
        Length: 4
        Handshake Protocol: Server Hello Done
            Handshake Type: Server Hello Done (14)
            Length: 0

TLSv1 Record Layer: Alert (Level: Fatal, Description: Unsupported Extension)
    Content Type: Alert (21)
    Version: TLS 1.0 (0x0301)
    Length: 2
    Alert Message
        Level: Fatal (2)
        Description: Unsupported Extension (110)

2) TLS v1.2 works fine, as expected:

TLSv1.2 Record Layer: Handshake Protocol: Client Hello
    Content Type: Handshake (22)
    Version: TLS 1.2 (0x0303)
    Length: 78
    Handshake Protocol: Client Hello
        Handshake Type: Client Hello (1)
        Length: 74
        Version: TLS 1.2 (0x0303)
        Random
        Session ID Length: 0
        Cipher Suites Length: 8
        Cipher Suites (4 suites)
            Cipher Suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA (0x0039)
            Cipher Suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x0033)
            Cipher Suite: TLS_RSA_WITH_AES_128_CBC_SHA (0x002f)
            Cipher Suite: TLS_EMPTY_RENEGOTIATION_INFO_SCSV (0x00ff)
        Compression Methods Length: 1
        Compression Methods (1 method)
            Compression Method: null (0)
        Extensions Length: 25
        Extension: server_name
            Type: server_name (0x0000)
            Length: 21
            Server Name Indication extension
                Server Name list length: 19
                Server Name Type: host_name (0)
                Server Name length: 16
                Server Name: www.google.co.uk

TLSv1.2 Record Layer: Handshake Protocol: Server Hello
    Content Type: Handshake (22)
    Version: TLS 1.2 (0x0303)
    Length: 85
    Handshake Protocol: Server Hello
        Handshake Type: Server Hello (2)
        Length: 81
        Version: TLS 1.2 (0x0303)
        Random
        Session ID Length: 32
        Session ID: c702788e7eaea1da30876968caedd785819c304da7e08bde...
        Cipher Suite: TLS_RSA_WITH_AES_128_CBC_SHA (0x002f)
        Compression Method: null (0)
        Extensions Length: 9
        Extension: renegotiation_info
            Type: renegotiation_info (0xff01)
            Length: 1
            Renegotiation Info extension
        Extension: server_name
            Type: server_name (0x0000)
            Length: 0

TLSv1.2 Record Layer: Handshake Protocol: Server Hello Done
    Content Type: Handshake (22)
    Version: TLS 1.2 (0x0303)
    Length: 4
    Handshake Protocol: Server Hello Done
        Handshake Type: Server Hello Done (14)
        Length: 0

TLSv1.2 Record Layer: Handshake Protocol: Client Key Exchange
    Content Type: Handshake (22)
    Version: TLS 1.2 (0x0303)
    Length: 262
    Handshake Protocol: Client Key Exchange
        Handshake Type: Client Key Exchange (16)
        Length: 258
        RSA Encrypted PreMaster Secret

and then it proceeds to finish handshake successfully.

I'm aware that SNI was introduced later than TLS v.1.0 RFC, but from what I read it shouldn't stop SNI from working on v1.0?

[before anyone suggests just updating to TLS v1.2 - would gladly do that, but constrained by space/memory on older clients atm. For reference, this is .NET compact Framework client running on Windows CE.]

1
Are you sure that the alert is generated by the server and not by the client? It would be very unusual to send such alert after the server hello done and before any new messages from the client. Apart from that I have no problems accessing google.co.uk with SNI, TLS 1.0 and same ciphers with OpenSSL.Steffen Ullrich
@SteffenUllrich yes OpenSSL is working fine. I will revise TLS client code, thanks for the hint. This is C# port of BouncyCastle, BTWenkod

1 Answers

0
votes

Turned out to be a bug in [older] BouncyCastle C# port, fixed in latest BC release. Kudos to Steffen Ullrich