gnutls suite b interoperability with a mocana server

James Newell jnewell at newells.info
Thu Apr 26 20:37:27 CEST 2012


Hello,

I'm attempting to use gntls client with a mocana ssl server.  The
gnutls-cli fails indicating it could not negotiate a cipher suite,
despite the mocana sending back the cipher selected in the server
hello packet chosen from the client cipher list.  I've provide both
debug output from the server and client below.  Is it possible I
configured something incorrectly on the gnutls side?  Any help is
appreciated.

Regards,
Jim

$ ./build/gnutls-3.0.19/src/gnutls-cli --list|grep ECD
TLS_ECDH_ANON_NULL_SHA1                            0xc0, 0x15 TLS1.0
TLS_ECDH_ANON_3DES_EDE_CBC_SHA1                    0xc0, 0x17 TLS1.0
TLS_ECDH_ANON_AES_128_CBC_SHA1                     0xc0, 0x18 TLS1.0
TLS_ECDH_ANON_AES_256_CBC_SHA1                     0xc0, 0x19 TLS1.0
TLS_ECDHE_RSA_NULL_SHA1                            0xc0, 0x10 TLS1.0
TLS_ECDHE_RSA_3DES_EDE_CBC_SHA1                    0xc0, 0x12 TLS1.0
TLS_ECDHE_RSA_AES_128_CBC_SHA1                     0xc0, 0x13 TLS1.0
TLS_ECDHE_RSA_AES_256_CBC_SHA1                     0xc0, 0x14 TLS1.0
TLS_ECDHE_ECDSA_NULL_SHA1                          0xc0, 0x06 TLS1.0
TLS_ECDHE_ECDSA_3DES_EDE_CBC_SHA1                  0xc0, 0x08 TLS1.0
TLS_ECDHE_ECDSA_AES_128_CBC_SHA1                   0xc0, 0x09 TLS1.0

 ./build/gnutls-3.0.19/src/gnutls-cli -d 10 192.168.1.130 -p 2300
Resolving '192.168.1.130'...
Connecting to '192.168.1.130:2300'...
|<4>| REC[0x14fc5f0]: Allocating epoch #0
|<2>| ASSERT: gnutls_constate.c:717
|<4>| REC[0x14fc5f0]: Allocating epoch #1
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: ECDHE_ECDSA_AES_128_CBC_SHA1 (C0.09)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite:
ECDHE_ECDSA_AES_128_CBC_SHA256 (C0.23)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite:
ECDHE_ECDSA_AES_128_GCM_SHA256 (C0.2B)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: ECDHE_ECDSA_AES_256_CBC_SHA1 (C0.0A)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite:
ECDHE_ECDSA_AES_256_CBC_SHA384 (C0.24)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite:
ECDHE_ECDSA_AES_256_GCM_SHA384 (C0.2C)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: ECDHE_ECDSA_3DES_EDE_CBC_SHA1 (C0.08)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: ECDHE_RSA_AES_128_CBC_SHA1 (C0.13)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: ECDHE_RSA_AES_128_CBC_SHA256 (C0.27)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: ECDHE_RSA_AES_128_GCM_SHA256 (C0.2F)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: ECDHE_RSA_AES_256_CBC_SHA1 (C0.14)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: ECDHE_RSA_AES_256_GCM_SHA384 (C0.30)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: ECDHE_RSA_3DES_EDE_CBC_SHA1 (C0.12)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_RSA_AES_128_CBC_SHA1 (00.33)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_RSA_AES_128_CBC_SHA256 (00.67)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_RSA_CAMELLIA_128_CBC_SHA1 (00.45)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_RSA_AES_128_GCM_SHA256 (00.9E)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_RSA_AES_256_CBC_SHA1 (00.39)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_RSA_AES_256_CBC_SHA256 (00.6B)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_RSA_CAMELLIA_256_CBC_SHA1 (00.88)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_RSA_3DES_EDE_CBC_SHA1 (00.16)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_DSS_AES_128_CBC_SHA1 (00.32)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_DSS_AES_128_CBC_SHA256 (00.40)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_DSS_CAMELLIA_128_CBC_SHA1 (00.44)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_DSS_AES_128_GCM_SHA256 (00.A2)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_DSS_AES_256_CBC_SHA1 (00.38)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_DSS_AES_256_CBC_SHA256 (00.6A)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_DSS_CAMELLIA_256_CBC_SHA1 (00.87)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_DSS_3DES_EDE_CBC_SHA1 (00.13)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: DHE_DSS_ARCFOUR_SHA1 (00.66)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: RSA_AES_128_CBC_SHA1 (00.2F)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: RSA_AES_128_CBC_SHA256 (00.3C)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: RSA_CAMELLIA_128_CBC_SHA1 (00.41)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: RSA_AES_128_GCM_SHA256 (00.9C)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: RSA_AES_256_CBC_SHA1 (00.35)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: RSA_AES_256_CBC_SHA256 (00.3D)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: RSA_CAMELLIA_256_CBC_SHA1 (00.84)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: RSA_3DES_EDE_CBC_SHA1 (00.0A)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: RSA_ARCFOUR_SHA1 (00.05)
|<3>| HSK[0x14fc5f0]: Keeping ciphersuite: RSA_ARCFOUR_MD5 (00.04)
|<3>| EXT[0x14fc5f0]: Sending extension SAFE RENEGOTIATION (1 bytes)
|<3>| EXT[0x14fc5f0]: Sending extension SUPPORTED ECC (12 bytes)
|<3>| EXT[0x14fc5f0]: Sending extension SUPPORTED ECC POINT FORMATS (2 bytes)
|<3>| EXT[0x14fc5f0]: sent signature algo (4.1) RSA-SHA256
|<3>| EXT[0x14fc5f0]: sent signature algo (4.2) DSA-SHA256
|<3>| EXT[0x14fc5f0]: sent signature algo (4.3) ECDSA-SHA256
|<3>| EXT[0x14fc5f0]: sent signature algo (5.1) RSA-SHA384
|<3>| EXT[0x14fc5f0]: sent signature algo (5.3) ECDSA-SHA384
|<3>| EXT[0x14fc5f0]: sent signature algo (6.1) RSA-SHA512
|<3>| EXT[0x14fc5f0]: sent signature algo (6.3) ECDSA-SHA512
|<3>| EXT[0x14fc5f0]: sent signature algo (3.1) RSA-SHA224
|<3>| EXT[0x14fc5f0]: sent signature algo (3.2) DSA-SHA224
|<3>| EXT[0x14fc5f0]: sent signature algo (3.3) ECDSA-SHA224
|<3>| EXT[0x14fc5f0]: sent signature algo (2.1) RSA-SHA1
|<3>| EXT[0x14fc5f0]: sent signature algo (2.2) DSA-SHA1
|<3>| EXT[0x14fc5f0]: sent signature algo (2.3) ECDSA-SHA1
|<3>| EXT[0x14fc5f0]: Sending extension SIGNATURE ALGORITHMS (28 bytes)
|<3>| HSK[0x14fc5f0]: CLIENT HELLO was queued [184 bytes]
|<7>| HWRITE: enqueued [CLIENT HELLO] 184. Total 184 bytes.
|<7>| HWRITE FLUSH: 184 bytes in buffer.
|<4>| REC[0x14fc5f0]: Preparing Packet Handshake(22) with length: 184
|<9>| ENC[0x14fc5f0]: cipher: NULL, MAC: MAC-NULL, Epoch: 0
|<7>| WRITE: enqueued 189 bytes for 0x4. Total 189 bytes.
|<4>| REC[0x14fc5f0]: Sent Packet[1] Handshake(22) in epoch 0 and length: 189
|<7>| HWRITE: wrote 1 bytes, 0 bytes left.
|<7>| WRITE FLUSH: 189 bytes in buffer.
|<7>| WRITE: wrote 189 bytes, 0 bytes left.
|<2>| ASSERT: gnutls_buffers.c:974
|<7>| READ: Got 5 bytes from 0x4
|<7>| READ: read 5 bytes from 0x4
|<7>| RB: Have 0 bytes into buffer. Adding 5 bytes.
|<7>| RB: Requested 5 bytes
|<4>| REC[0x14fc5f0]: SSL 3.0 Handshake packet received. Epoch 0, length: 46
|<4>| REC[0x14fc5f0]: Expected Packet Handshake(22)
|<4>| REC[0x14fc5f0]: Received Packet Handshake(22) with length: 46
|<7>| READ: Got 46 bytes from 0x4
|<7>| READ: read 46 bytes from 0x4
|<7>| RB: Have 5 bytes into buffer. Adding 46 bytes.
|<7>| RB: Requested 51 bytes
|<4>| REC[0x14fc5f0]: Decrypted Packet[0] Handshake(22) with length: 46
|<6>| BUF[REC]: Inserted 46 bytes of Data(22)
|<3>| HSK[0x14fc5f0]: SERVER HELLO was received. Length 42[42], frag
offset 0, frag length: 42, sequence: 0
|<3>| HSK[0x14fc5f0]: Server's version: 3.0
|<3>| HSK[0x14fc5f0]: SessionID length: 4
|<3>| HSK[0x14fc5f0]: SessionID: 05000000
|<2>| ASSERT: gnutls_handshake.c:1385
|<3>| HSK[0x14fc5f0]: unsupported cipher suite C0.09
|<2>| ASSERT: gnutls_handshake.c:1618
|<2>| ASSERT: gnutls_handshake.c:2058
|<2>| ASSERT: gnutls_handshake.c:1293
|<2>| ASSERT: gnutls_handshake.c:2484
*** Fatal error: Could not negotiate a supported cipher suite.
|<4>| REC: Sending Alert[2|40] - Handshake failed
|<4>| REC[0x14fc5f0]: Preparing Packet Alert(21) with length: 2
|<9>| ENC[0x14fc5f0]: cipher: NULL, MAC: MAC-NULL, Epoch: 0
|<7>| WRITE: enqueued 7 bytes for 0x4. Total 7 bytes.
|<7>| WRITE FLUSH: 7 bytes in buffer.
|<7>| WRITE: wrote 7 bytes, 0 bytes left.
|<4>| REC[0x14fc5f0]: Sent Packet[2] Alert(21) in epoch 0 and length: 7
*** Handshake has failed
GnuTLS error: Could not negotiate a supported cipher suite.
|<4>| REC[0x14fc5f0]: Start of epoch cleanup
|<4>| REC[0x14fc5f0]: End of epoch cleanup
|<4>| REC[0x14fc5f0]: Epoch #0 freed
|<4>| REC[0x14fc5f0]: Epoch #1 freed


The deug output from the Mocana server indicates it selected 0xc009
from the list the client sent.

11:48:38.1:20644:NetworkService.cpp:274:I:session[7FBCBC002C40,192.168.1.130:38889]:session
created(fd=16)
Client Hello Ciphers (v3):
CipherSuite = 0xc009
CipherSuite = 0xc023
CipherSuite = 0xc02b
CipherSuite = 0xc00a
CipherSuite = 0xc024
CipherSuite = 0xc02c
CipherSuite = 0xc008
CipherSuite = 0xc013
CipherSuite = 0xc027
CipherSuite = 0xc02f
CipherSuite = 0xc014
CipherSuite = 0xc030
CipherSuite = 0xc012
CipherSuite = 0x0033
CipherSuite = 0x0067
CipherSuite = 0x0045
CipherSuite = 0x009e
CipherSuite = 0x0039
CipherSuite = 0x006b
CipherSuite = 0x0088
CipherSuite = 0x0016
CipherSuite = 0x0032
CipherSuite = 0x0040
CipherSuite = 0x0044
CipherSuite = 0x00a2
CipherSuite = 0x0038
CipherSuite = 0x006a
CipherSuite = 0x0087
CipherSuite = 0x0013
CipherSuite = 0x0066
CipherSuite = 0x002f
CipherSuite = 0x003c
CipherSuite = 0x0041
CipherSuite = 0x009c
CipherSuite = 0x0035
CipherSuite = 0x003d
CipherSuite = 0x0084
CipherSuite = 0x000a
CipherSuite = 0x0005
CipherSuite = 0x0004
SSLSOCK_selectCipherSuiteV3: CipherSuite selected = 0xc009
Handshake length = 184
 (SERVER) Client Hello
01 00 00 b4 03 03 4f 99 6e 56 1f 43 59 9f b2 45
b4 f8 57 34 8b 63 5f 5f 38 46 d1 ec e3 6c 06 ff
65 f9 21 c3 d7 1e 00 00 50 c0 09 c0 23 c0 2b c0
0a c0 24 c0 2c c0 08 c0 13 c0 27 c0 2f c0 14 c0
30 c0 12 00 33 00 67 00 45 00 9e 00 39 00 6b 00
88 00 16 00 32 00 40 00 44 00 a2 00 38 00 6a 00
87 00 13 00 66 00 2f 00 3c 00 41 00 9c 00 35 00
3d 00 84 00 0a 00 05 00 04 01 00 00 3b ff 01 00
01 00 00 0a 00 0c 00 0a 00 13 00 15 00 17 00 18
00 19 00 0b 00 02 01 00 00 0d 00 1c 00 1a 04 01
04 02 04 03 05 01 05 03 06 01 06 03 03 01 03 02
03 03 02 01 02 02 02 03
Resume state = 0.
Handshake length = 46
 (SERVER) Server hello
02 00 00 2a 03 00 c3 95 e3 a0 37 a8 08 72 04 22
13 c6 61 76 5f f0 a4 dd 69 9d 58 1b 6e f1 e7 b4
7a a4 94 12 19 3b 04 05 00 00 00 c0 09 00
                                                  ^------------- The
server hello sent back indicating the cipher suite.
Handshake length = 293
 (SERVER) Certificate
0b 00 01 21 00 01 1e 00 01 1b 30 82 01 17 30 81
bf a0 03 02 01 02 02 14 11 3b bb 29 fa fd 88 a7
be da e4 8c 6f 43 22 d8 d1 9a 01 bb 30 09 06 07
2a 86 48 ce 3d 04 01 30 0d 31 0b 30 09 06 03 55
04 06 13 02 55 53 30 1e 17 0d 30 33 30 35 32 36
30 30 30 31 32 36 5a 17 0d 33 33 30 35 32 34 32
33 30 31 32 36 5a 30 0d 31 0b 30 09 06 03 55 04
06 13 02 55 53 30 59 30 13 06 07 2a 86 48 ce 3d
02 01 06 08 2a 86 48 ce 3d 03 01 07 03 42 00 04
9f 3a 81 33 3a 5b 7f 44 ed dd f2 ea b1 89 4e cd
0a 26 b4 0f b3 02 a4 6e 39 9e 33 05 8e ec 55 cd
6b 74 e9 b6 9e 39 89 52 b3 be f0 d4 c5 4a 33 b7
be de 81 3e 35 e5 a9 66 e0 be 6a f1 05 79 3b 47
30 09 06 07 2a 86 48 ce 3d 04 01 03 48 00 30 45
02 20 51 09 e8 bd 4d 3e b1 b3 64 3a 74 60 f6 89
37 98 1e 17 96 5e 53 78 7d 47 c0 ca 20 17 68 9e
13 5c 02 21 00 ba af 8c 7c dc d3 5b d5 00 70 31
30 3b f1 f8 74 88 63 e9 21 5d 26 fe b4 70 90 27
ef 95 c5 56 53
Handshake length = 147
 (SERVER) Server Key Exchange
0c 00 00 8f 03 00 17 41 04 5c 78 ce a4 ea 82 e9
b4 4e 3f 6f 9a 4f dc ac e4 13 2b a0 75 93 be f2
ba 52 23 d3 02 52 4c e5 55 f1 45 e9 f9 c7 09 29
57 75 00 21 70 80 9c b3 9a d2 09 25 8d d8 f1 f1
eb aa 03 31 db e1 fe 9f 6d 00 48 30 46 02 21 00
f7 80 e4 29 80 d4 0c 12 44 de f7 34 2e 65 cb ae
47 bb 28 87 ea 95 6b 8d fc 3f 9b 79 78 2b ce 19
02 21 00 b7 e0 ea 73 2a a3 73 3e 9f 50 cb 3c 98
0f 7b 45 26 4a 81 f9 60 4e 3d 2b a2 61 89 28 76
0b ed 25
Handshake length = 4
 (SERVER) Server Hello done
0e 00 00 00




More information about the Gnutls-help mailing list