Fix some CA lengths etc., and it accepts our cert!
authorSteinar H. Gunderson <sesse@samfundet.no>
Sat, 5 Feb 2005 20:06:57 +0000 (20:06 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sat, 5 Feb 2005 20:06:57 +0000 (20:06 +0000)
mcs.c

diff --git a/mcs.c b/mcs.c
index 25361e8..7888d8b 100644 (file)
--- a/mcs.c
+++ b/mcs.c
@@ -321,7 +321,7 @@ mcs_send_connect_response()
        out_uint8(s, 0x44);
        out_uint8(s, 0x6e);
 
-       length = 106 + sizeof(cacert) + sizeof(server_cert);
+       length = 108 + sizeof(cacert) + sizeof(server_cert);
        
        // two bytes of length
        out_uint8(s, 0x80 | (length >> 8));
@@ -346,12 +346,12 @@ mcs_send_connect_response()
        // crypto info
        out_uint16_le(s, SEC_TAG_SRV_CRYPT);
        out_uint16_le(s, 84 + sizeof(cacert) + sizeof(server_cert)); // length
-       out_uint32_le(s, 2); // 128-bit
-       out_uint32_le(s, 3); // high
+       out_uint32_le(s, 8); // 128-bit
+       out_uint32_le(s, 2); // medium
 
        out_uint32_le(s, SEC_RANDOM_SIZE); // random_len
        out_uint32_le(s, 32 + sizeof(cacert) + sizeof(server_cert));             // rsa_info_len
-       out_uint8s(s, SEC_RANDOM_SIZE);    // server_random
+       out_uint8p(s, cacert, SEC_RANDOM_SIZE);    // server_"random"
        out_uint32_le(s, 0x80000002);      // X.509
        out_uint32_le(s, 2);               // number of certificates