Lines Matching refs:msg
24 # define ssl_trace_list(bio, indent, msg, msglen, value, table) \ argument
25 do_ssl_trace_list(bio, indent, msg, msglen, value, \
41 const unsigned char *msg, size_t msglen, in do_ssl_trace_list() argument
49 val = msg[0]; in do_ssl_trace_list()
51 val = (val << 8) | msg[1]; in do_ssl_trace_list()
54 msg += vlen; in do_ssl_trace_list()
615 const unsigned char *msg, size_t msglen) in ssl_print_hex() argument
622 BIO_printf(bio, "%02X", msg[i]); in ssl_print_hex()
900 const unsigned char *msg = *msgin; in ssl_print_extensions() local
909 extslen = (msg[0] << 8) | msg[1]; in ssl_print_extensions()
911 msg += 2; in ssl_print_extensions()
914 *msgin = msg; in ssl_print_extensions()
927 extype = (msg[0] << 8) | msg[1]; in ssl_print_extensions()
928 extlen = (msg[2] << 8) | msg[3]; in ssl_print_extensions()
932 BIO_dump_indent(bio, (const char *)msg, extslen, indent + 2); in ssl_print_extensions()
935 msg += 4; in ssl_print_extensions()
936 if (!ssl_print_extension(bio, indent + 2, server, mt, extype, msg, in ssl_print_extensions()
939 msg += extlen; in ssl_print_extensions()
943 *msgin = msg; in ssl_print_extensions()
949 const unsigned char *msg, size_t msglen) in ssl_print_client_hello() argument
954 if (!ssl_print_version(bio, indent, "client_version", &msg, &msglen, NULL)) in ssl_print_client_hello()
956 if (!ssl_print_random(bio, indent, &msg, &msglen)) in ssl_print_client_hello()
958 if (!ssl_print_hexbuf(bio, indent, "session_id", 1, &msg, &msglen)) in ssl_print_client_hello()
961 if (!ssl_print_hexbuf(bio, indent, "cookie", 1, &msg, &msglen)) in ssl_print_client_hello()
966 len = (msg[0] << 8) | msg[1]; in ssl_print_client_hello()
967 msg += 2; in ssl_print_client_hello()
974 cs = (msg[0] << 8) | msg[1]; in ssl_print_client_hello()
977 msg[0], msg[1], ssl_trace_str(cs, ssl_ciphers_tbl)); in ssl_print_client_hello()
978 msg += 2; in ssl_print_client_hello()
984 len = msg[0]; in ssl_print_client_hello()
985 msg++; in ssl_print_client_hello()
994 ssl_trace_str(msg[0], ssl_comp_tbl), msg[0]); in ssl_print_client_hello()
995 msg++; in ssl_print_client_hello()
999 if (!ssl_print_extensions(bio, indent, 0, SSL3_MT_CLIENT_HELLO, &msg, in ssl_print_client_hello()
1006 const unsigned char *msg, size_t msglen) in dtls_print_hello_vfyrequest() argument
1008 if (!ssl_print_version(bio, indent, "server_version", &msg, &msglen, NULL)) in dtls_print_hello_vfyrequest()
1010 if (!ssl_print_hexbuf(bio, indent, "cookie", 1, &msg, &msglen)) in dtls_print_hello_vfyrequest()
1016 const unsigned char *msg, size_t msglen) in ssl_print_server_hello() argument
1021 if (!ssl_print_version(bio, indent, "server_version", &msg, &msglen, &vers)) in ssl_print_server_hello()
1023 if (!ssl_print_random(bio, indent, &msg, &msglen)) in ssl_print_server_hello()
1026 && !ssl_print_hexbuf(bio, indent, "session_id", 1, &msg, &msglen)) in ssl_print_server_hello()
1030 cs = (msg[0] << 8) | msg[1]; in ssl_print_server_hello()
1033 msg[0], msg[1], ssl_trace_str(cs, ssl_ciphers_tbl)); in ssl_print_server_hello()
1034 msg += 2; in ssl_print_server_hello()
1041 ssl_trace_str(msg[0], ssl_comp_tbl), msg[0]); in ssl_print_server_hello()
1042 msg++; in ssl_print_server_hello()
1045 if (!ssl_print_extensions(bio, indent, 1, SSL3_MT_SERVER_HELLO, &msg, in ssl_print_server_hello()
1100 const unsigned char *msg, size_t msglen) in ssl_print_client_keyex() argument
1109 "psk_identity", 2, &msg, &msglen)) in ssl_print_client_keyex()
1118 "EncryptedPreMasterSecret", msg, msglen); in ssl_print_client_keyex()
1121 "EncryptedPreMasterSecret", 2, &msg, &msglen)) in ssl_print_client_keyex()
1128 if (!ssl_print_hexbuf(bio, indent + 2, "dh_Yc", 2, &msg, &msglen)) in ssl_print_client_keyex()
1134 if (!ssl_print_hexbuf(bio, indent + 2, "ecdh_Yc", 1, &msg, &msglen)) in ssl_print_client_keyex()
1138 ssl_print_hex(bio, indent + 2, "GostKeyTransportBlob", msg, msglen); in ssl_print_client_keyex()
1143 "GOST-wrapped PreMasterSecret", msg, msglen); in ssl_print_client_keyex()
1152 const unsigned char *msg, size_t msglen) in ssl_print_server_keyex() argument
1161 "psk_identity_hint", 2, &msg, &msglen)) in ssl_print_server_keyex()
1167 if (!ssl_print_hexbuf(bio, indent + 2, "rsa_modulus", 2, &msg, &msglen)) in ssl_print_server_keyex()
1170 &msg, &msglen)) in ssl_print_server_keyex()
1176 if (!ssl_print_hexbuf(bio, indent + 2, "dh_p", 2, &msg, &msglen)) in ssl_print_server_keyex()
1178 if (!ssl_print_hexbuf(bio, indent + 2, "dh_g", 2, &msg, &msglen)) in ssl_print_server_keyex()
1180 if (!ssl_print_hexbuf(bio, indent + 2, "dh_Ys", 2, &msg, &msglen)) in ssl_print_server_keyex()
1189 if (msg[0] == EXPLICIT_PRIME_CURVE_TYPE) in ssl_print_server_keyex()
1191 else if (msg[0] == EXPLICIT_CHAR2_CURVE_TYPE) in ssl_print_server_keyex()
1193 else if (msg[0] == NAMED_CURVE_TYPE) { in ssl_print_server_keyex()
1197 curve = (msg[1] << 8) | msg[2]; in ssl_print_server_keyex()
1200 msg += 3; in ssl_print_server_keyex()
1202 if (!ssl_print_hexbuf(bio, indent + 2, "point", 1, &msg, &msglen)) in ssl_print_server_keyex()
1205 BIO_printf(bio, "UNKNOWN CURVE PARAMETER TYPE %d\n", msg[0]); in ssl_print_server_keyex()
1215 ssl_print_signature(bio, indent, ssl, &msg, &msglen); in ssl_print_server_keyex()
1255 int indent, const unsigned char *msg, in ssl_print_certificates() argument
1261 && !ssl_print_hexbuf(bio, indent, "context", 1, &msg, &msglen)) in ssl_print_certificates()
1266 clen = (msg[0] << 16) | (msg[1] << 8) | msg[2]; in ssl_print_certificates()
1269 msg += 3; in ssl_print_certificates()
1273 if (!ssl_print_certificate(bio, indent + 2, &msg, &clen)) in ssl_print_certificates()
1277 SSL3_MT_CERTIFICATE, &msg, &clen)) in ssl_print_certificates()
1285 const unsigned char *msg, size_t msglen) in ssl_print_cert_request() argument
1291 if (!ssl_print_hexbuf(bio, indent, "request_context", 1, &msg, &msglen)) in ssl_print_cert_request()
1294 SSL3_MT_CERTIFICATE_REQUEST, &msg, &msglen)) in ssl_print_cert_request()
1300 xlen = msg[0]; in ssl_print_cert_request()
1303 msg++; in ssl_print_cert_request()
1306 if (!ssl_trace_list(bio, indent + 2, msg, xlen, 1, ssl_ctype_tbl)) in ssl_print_cert_request()
1308 msg += xlen; in ssl_print_cert_request()
1314 xlen = (msg[0] << 8) | msg[1]; in ssl_print_cert_request()
1317 msg += 2; in ssl_print_cert_request()
1323 sigalg = (msg[0] << 8) | msg[1]; in ssl_print_cert_request()
1327 msg += 2; in ssl_print_cert_request()
1329 msg += xlen; in ssl_print_cert_request()
1334 xlen = (msg[0] << 8) | msg[1]; in ssl_print_cert_request()
1338 msg += 2; in ssl_print_cert_request()
1347 dlen = (msg[0] << 8) | msg[1]; in ssl_print_cert_request()
1350 msg += 2; in ssl_print_cert_request()
1353 p = msg; in ssl_print_cert_request()
1363 msg += dlen; in ssl_print_cert_request()
1367 &msg, &msglen)) in ssl_print_cert_request()
1374 const unsigned char *msg, size_t msglen) in ssl_print_ticket() argument
1385 tick_life = ((unsigned int)msg[0] << 24) in ssl_print_ticket()
1386 | ((unsigned int)msg[1] << 16) in ssl_print_ticket()
1387 | ((unsigned int)msg[2] << 8) in ssl_print_ticket()
1388 | (unsigned int)msg[3]; in ssl_print_ticket()
1390 msg += 4; in ssl_print_ticket()
1399 ((unsigned int)msg[0] << 24) in ssl_print_ticket()
1400 | ((unsigned int)msg[1] << 16) in ssl_print_ticket()
1401 | ((unsigned int)msg[2] << 8) in ssl_print_ticket()
1402 | (unsigned int)msg[3]; in ssl_print_ticket()
1404 msg += 4; in ssl_print_ticket()
1407 if (!ssl_print_hexbuf(bio, indent + 2, "ticket_nonce", 1, &msg, in ssl_print_ticket()
1411 if (!ssl_print_hexbuf(bio, indent + 2, "ticket", 2, &msg, &msglen)) in ssl_print_ticket()
1415 SSL3_MT_NEWSESSION_TICKET, &msg, &msglen)) in ssl_print_ticket()
1423 const unsigned char *msg, size_t msglen, in ssl_print_handshake() argument
1431 htype = msg[0]; in ssl_print_handshake()
1432 hlen = (msg[1] << 16) | (msg[2] << 8) | msg[3]; in ssl_print_handshake()
1436 msg += 4; in ssl_print_handshake()
1444 (msg[0] << 8) | msg[1], in ssl_print_handshake()
1445 (msg[2] << 16) | (msg[3] << 8) | msg[4], in ssl_print_handshake()
1446 (msg[5] << 16) | (msg[6] << 8) | msg[7]); in ssl_print_handshake()
1447 msg += 8; in ssl_print_handshake()
1454 if (!ssl_print_client_hello(bio, ssl, indent + 2, msg, msglen)) in ssl_print_handshake()
1459 if (!dtls_print_hello_vfyrequest(bio, indent + 2, msg, msglen)) in ssl_print_handshake()
1464 if (!ssl_print_server_hello(bio, indent + 2, msg, msglen)) in ssl_print_handshake()
1469 if (!ssl_print_server_keyex(bio, indent + 2, ssl, msg, msglen)) in ssl_print_handshake()
1474 if (!ssl_print_client_keyex(bio, indent + 2, ssl, msg, msglen)) in ssl_print_handshake()
1479 if (!ssl_print_certificates(bio, ssl, server, indent + 2, msg, msglen)) in ssl_print_handshake()
1484 if (!ssl_print_signature(bio, indent + 2, ssl, &msg, &msglen)) in ssl_print_handshake()
1489 if (!ssl_print_cert_request(bio, indent + 2, ssl, msg, msglen)) in ssl_print_handshake()
1494 ssl_print_hex(bio, indent + 2, "verify_data", msg, msglen); in ssl_print_handshake()
1499 ssl_print_hex(bio, indent + 2, "unexpected value", msg, msglen); in ssl_print_handshake()
1503 if (!ssl_print_ticket(bio, indent + 2, ssl, msg, msglen)) in ssl_print_handshake()
1509 SSL3_MT_ENCRYPTED_EXTENSIONS, &msg, &msglen)) in ssl_print_handshake()
1515 ssl_print_hex(bio, indent + 2, "unexpected value", msg, msglen); in ssl_print_handshake()
1518 if (!ssl_trace_list(bio, indent + 2, msg, msglen, 1, in ssl_print_handshake()
1526 BIO_dump_indent(bio, (const char *)msg, msglen, indent + 4); in ssl_print_handshake()
1534 const unsigned char *msg = buf; in SSL_trace() local
1546 ssl_print_hex(bio, 0, " too short message", msg, msglen); in SSL_trace()
1549 hvers = msg[1] << 8 | msg[2]; in SSL_trace()
1556 (msg[3] << 8 | msg[4]), in SSL_trace()
1557 (msg[5] << 8 | msg[6]), in SSL_trace()
1558 (msg[7] << 8 | msg[8]), (msg[9] << 8 | msg[10])); in SSL_trace()
1562 ssl_trace_str(msg[0], ssl_content_tbl), msg[0], in SSL_trace()
1563 msg[msglen - 2] << 8 | msg[msglen - 1]); in SSL_trace()
1569 ssl_trace_str(msg[0], ssl_content_tbl), msg[0]); in SSL_trace()
1574 msg, msglen, 4)) in SSL_trace()
1579 if (msglen == 1 && msg[0] == 1) in SSL_trace()
1582 ssl_print_hex(bio, 4, "unknown value", msg, msglen); in SSL_trace()
1590 SSL_alert_type_string_long(msg[0] << 8), in SSL_trace()
1591 msg[0], SSL_alert_desc_string_long(msg[1]), msg[1]); in SSL_trace()