Lines Matching refs:msg

25 # define ssl_trace_list(bio, indent, msg, msglen, value, table) \  argument
26 do_ssl_trace_list(bio, indent, msg, msglen, value, \
42 const unsigned char *msg, size_t msglen, in do_ssl_trace_list() argument
50 val = msg[0]; in do_ssl_trace_list()
52 val = (val << 8) | msg[1]; in do_ssl_trace_list()
55 msg += vlen; in do_ssl_trace_list()
651 const unsigned char *msg, size_t msglen) in ssl_print_hex() argument
658 BIO_printf(bio, "%02X", msg[i]); in ssl_print_hex()
958 const unsigned char *msg = *msgin; in ssl_print_extensions() local
967 extslen = (msg[0] << 8) | msg[1]; in ssl_print_extensions()
969 msg += 2; in ssl_print_extensions()
972 *msgin = msg; in ssl_print_extensions()
985 extype = (msg[0] << 8) | msg[1]; in ssl_print_extensions()
986 extlen = (msg[2] << 8) | msg[3]; in ssl_print_extensions()
990 BIO_dump_indent(bio, (const char *)msg, extslen, indent + 2); in ssl_print_extensions()
993 msg += 4; in ssl_print_extensions()
994 if (!ssl_print_extension(bio, indent + 2, server, mt, extype, msg, in ssl_print_extensions()
997 msg += extlen; in ssl_print_extensions()
1001 *msgin = msg; in ssl_print_extensions()
1007 const unsigned char *msg, size_t msglen) in ssl_print_client_hello() argument
1012 if (!ssl_print_version(bio, indent, "client_version", &msg, &msglen, NULL)) in ssl_print_client_hello()
1014 if (!ssl_print_random(bio, indent, &msg, &msglen)) in ssl_print_client_hello()
1016 if (!ssl_print_hexbuf(bio, indent, "session_id", 1, &msg, &msglen)) in ssl_print_client_hello()
1019 if (!ssl_print_hexbuf(bio, indent, "cookie", 1, &msg, &msglen)) in ssl_print_client_hello()
1024 len = (msg[0] << 8) | msg[1]; in ssl_print_client_hello()
1025 msg += 2; in ssl_print_client_hello()
1032 cs = (msg[0] << 8) | msg[1]; in ssl_print_client_hello()
1035 msg[0], msg[1], ssl_trace_str(cs, ssl_ciphers_tbl)); in ssl_print_client_hello()
1036 msg += 2; in ssl_print_client_hello()
1042 len = msg[0]; in ssl_print_client_hello()
1043 msg++; in ssl_print_client_hello()
1052 ssl_trace_str(msg[0], ssl_comp_tbl), msg[0]); in ssl_print_client_hello()
1053 msg++; in ssl_print_client_hello()
1057 if (!ssl_print_extensions(bio, indent, 0, SSL3_MT_CLIENT_HELLO, &msg, in ssl_print_client_hello()
1064 const unsigned char *msg, size_t msglen) in dtls_print_hello_vfyrequest() argument
1066 if (!ssl_print_version(bio, indent, "server_version", &msg, &msglen, NULL)) in dtls_print_hello_vfyrequest()
1068 if (!ssl_print_hexbuf(bio, indent, "cookie", 1, &msg, &msglen)) in dtls_print_hello_vfyrequest()
1074 const unsigned char *msg, size_t msglen) in ssl_print_server_hello() argument
1079 if (!ssl_print_version(bio, indent, "server_version", &msg, &msglen, &vers)) in ssl_print_server_hello()
1081 if (!ssl_print_random(bio, indent, &msg, &msglen)) in ssl_print_server_hello()
1084 && !ssl_print_hexbuf(bio, indent, "session_id", 1, &msg, &msglen)) in ssl_print_server_hello()
1088 cs = (msg[0] << 8) | msg[1]; in ssl_print_server_hello()
1091 msg[0], msg[1], ssl_trace_str(cs, ssl_ciphers_tbl)); in ssl_print_server_hello()
1092 msg += 2; in ssl_print_server_hello()
1099 ssl_trace_str(msg[0], ssl_comp_tbl), msg[0]); in ssl_print_server_hello()
1100 msg++; in ssl_print_server_hello()
1103 if (!ssl_print_extensions(bio, indent, 1, SSL3_MT_SERVER_HELLO, &msg, in ssl_print_server_hello()
1158 const unsigned char *msg, size_t msglen) in ssl_print_client_keyex() argument
1167 "psk_identity", 2, &msg, &msglen)) in ssl_print_client_keyex()
1176 "EncryptedPreMasterSecret", msg, msglen); in ssl_print_client_keyex()
1179 "EncryptedPreMasterSecret", 2, &msg, &msglen)) in ssl_print_client_keyex()
1186 if (!ssl_print_hexbuf(bio, indent + 2, "dh_Yc", 2, &msg, &msglen)) in ssl_print_client_keyex()
1192 if (!ssl_print_hexbuf(bio, indent + 2, "ecdh_Yc", 1, &msg, &msglen)) in ssl_print_client_keyex()
1196 ssl_print_hex(bio, indent + 2, "GostKeyTransportBlob", msg, msglen); in ssl_print_client_keyex()
1201 "GOST-wrapped PreMasterSecret", msg, msglen); in ssl_print_client_keyex()
1210 const unsigned char *msg, size_t msglen) in ssl_print_server_keyex() argument
1219 "psk_identity_hint", 2, &msg, &msglen)) in ssl_print_server_keyex()
1225 if (!ssl_print_hexbuf(bio, indent + 2, "rsa_modulus", 2, &msg, &msglen)) in ssl_print_server_keyex()
1228 &msg, &msglen)) in ssl_print_server_keyex()
1234 if (!ssl_print_hexbuf(bio, indent + 2, "dh_p", 2, &msg, &msglen)) in ssl_print_server_keyex()
1236 if (!ssl_print_hexbuf(bio, indent + 2, "dh_g", 2, &msg, &msglen)) in ssl_print_server_keyex()
1238 if (!ssl_print_hexbuf(bio, indent + 2, "dh_Ys", 2, &msg, &msglen)) in ssl_print_server_keyex()
1247 if (msg[0] == EXPLICIT_PRIME_CURVE_TYPE) in ssl_print_server_keyex()
1249 else if (msg[0] == EXPLICIT_CHAR2_CURVE_TYPE) in ssl_print_server_keyex()
1251 else if (msg[0] == NAMED_CURVE_TYPE) { in ssl_print_server_keyex()
1255 curve = (msg[1] << 8) | msg[2]; in ssl_print_server_keyex()
1258 msg += 3; in ssl_print_server_keyex()
1260 if (!ssl_print_hexbuf(bio, indent + 2, "point", 1, &msg, &msglen)) in ssl_print_server_keyex()
1263 BIO_printf(bio, "UNKNOWN CURVE PARAMETER TYPE %d\n", msg[0]); in ssl_print_server_keyex()
1273 ssl_print_signature(bio, indent, sc, &msg, &msglen); in ssl_print_server_keyex()
1323 const unsigned char *msg = *pmsg; in ssl_print_raw_public_key() local
1328 clen = (msg[0] << 16) | (msg[1] << 8) | msg[2]; in ssl_print_raw_public_key()
1332 msg += 3; in ssl_print_raw_public_key()
1337 pkey = d2i_PUBKEY_ex(NULL, &msg, clen, ssl->ctx->libctx, ssl->ctx->propq); in ssl_print_raw_public_key()
1348 int indent, const unsigned char *msg, in ssl_print_certificates() argument
1354 && !ssl_print_hexbuf(bio, indent, "context", 1, &msg, &msglen)) in ssl_print_certificates()
1359 clen = (msg[0] << 16) | (msg[1] << 8) | msg[2]; in ssl_print_certificates()
1362 msg += 3; in ssl_print_certificates()
1365 if (!ssl_print_raw_public_key(bio, &sc->ssl, server, indent, &msg, &clen)) in ssl_print_certificates()
1369 SSL3_MT_CERTIFICATE, &msg, &clen)) in ssl_print_certificates()
1376 if (!ssl_print_certificate(bio, sc, indent + 2, &msg, &clen)) in ssl_print_certificates()
1380 SSL3_MT_CERTIFICATE, &msg, &clen)) in ssl_print_certificates()
1389 const unsigned char *msg, in ssl_print_compressed_certificates() argument
1405 alg = (msg[0] << 8) | msg[1]; in ssl_print_compressed_certificates()
1406 uclen = (msg[2] << 16) | (msg[3] << 8) | msg[4]; in ssl_print_compressed_certificates()
1407 clen = (msg[5] << 16) | (msg[6] << 8) | msg[7]; in ssl_print_compressed_certificates()
1411 msg += 8; in ssl_print_compressed_certificates()
1422 BIO_dump_indent(bio, (const char *)msg, clen, indent); in ssl_print_compressed_certificates()
1447 || COMP_expand_block(comp, ucdata, uclen, (unsigned char*)msg, clen) != (int)uclen) in ssl_print_compressed_certificates()
1459 const unsigned char *msg, size_t msglen) in ssl_print_cert_request() argument
1465 if (!ssl_print_hexbuf(bio, indent, "request_context", 1, &msg, &msglen)) in ssl_print_cert_request()
1468 SSL3_MT_CERTIFICATE_REQUEST, &msg, &msglen)) in ssl_print_cert_request()
1474 xlen = msg[0]; in ssl_print_cert_request()
1477 msg++; in ssl_print_cert_request()
1480 if (!ssl_trace_list(bio, indent + 2, msg, xlen, 1, ssl_ctype_tbl)) in ssl_print_cert_request()
1482 msg += xlen; in ssl_print_cert_request()
1488 xlen = (msg[0] << 8) | msg[1]; in ssl_print_cert_request()
1491 msg += 2; in ssl_print_cert_request()
1497 sigalg = (msg[0] << 8) | msg[1]; in ssl_print_cert_request()
1501 msg += 2; in ssl_print_cert_request()
1503 msg += xlen; in ssl_print_cert_request()
1508 xlen = (msg[0] << 8) | msg[1]; in ssl_print_cert_request()
1512 msg += 2; in ssl_print_cert_request()
1521 dlen = (msg[0] << 8) | msg[1]; in ssl_print_cert_request()
1524 msg += 2; in ssl_print_cert_request()
1527 p = msg; in ssl_print_cert_request()
1537 msg += dlen; in ssl_print_cert_request()
1541 &msg, &msglen)) in ssl_print_cert_request()
1548 const unsigned char *msg, size_t msglen) in ssl_print_ticket() argument
1559 tick_life = ((unsigned int)msg[0] << 24) in ssl_print_ticket()
1560 | ((unsigned int)msg[1] << 16) in ssl_print_ticket()
1561 | ((unsigned int)msg[2] << 8) in ssl_print_ticket()
1562 | (unsigned int)msg[3]; in ssl_print_ticket()
1564 msg += 4; in ssl_print_ticket()
1573 ((unsigned int)msg[0] << 24) in ssl_print_ticket()
1574 | ((unsigned int)msg[1] << 16) in ssl_print_ticket()
1575 | ((unsigned int)msg[2] << 8) in ssl_print_ticket()
1576 | (unsigned int)msg[3]; in ssl_print_ticket()
1578 msg += 4; in ssl_print_ticket()
1581 if (!ssl_print_hexbuf(bio, indent + 2, "ticket_nonce", 1, &msg, in ssl_print_ticket()
1585 if (!ssl_print_hexbuf(bio, indent + 2, "ticket", 2, &msg, &msglen)) in ssl_print_ticket()
1589 SSL3_MT_NEWSESSION_TICKET, &msg, &msglen)) in ssl_print_ticket()
1597 const unsigned char *msg, size_t msglen, in ssl_print_handshake() argument
1605 htype = msg[0]; in ssl_print_handshake()
1606 hlen = (msg[1] << 16) | (msg[2] << 8) | msg[3]; in ssl_print_handshake()
1610 msg += 4; in ssl_print_handshake()
1618 (msg[0] << 8) | msg[1], in ssl_print_handshake()
1619 (msg[2] << 16) | (msg[3] << 8) | msg[4], in ssl_print_handshake()
1620 (msg[5] << 16) | (msg[6] << 8) | msg[7]); in ssl_print_handshake()
1621 msg += 8; in ssl_print_handshake()
1628 if (!ssl_print_client_hello(bio, sc, indent + 2, msg, msglen)) in ssl_print_handshake()
1633 if (!dtls_print_hello_vfyrequest(bio, indent + 2, msg, msglen)) in ssl_print_handshake()
1638 if (!ssl_print_server_hello(bio, indent + 2, msg, msglen)) in ssl_print_handshake()
1643 if (!ssl_print_server_keyex(bio, indent + 2, sc, msg, msglen)) in ssl_print_handshake()
1648 if (!ssl_print_client_keyex(bio, indent + 2, sc, msg, msglen)) in ssl_print_handshake()
1653 if (!ssl_print_certificates(bio, sc, server, indent + 2, msg, msglen)) in ssl_print_handshake()
1658 if (!ssl_print_compressed_certificates(bio, sc, server, indent + 2, msg, msglen)) in ssl_print_handshake()
1663 if (!ssl_print_signature(bio, indent + 2, sc, &msg, &msglen)) in ssl_print_handshake()
1668 if (!ssl_print_cert_request(bio, indent + 2, sc, msg, msglen)) in ssl_print_handshake()
1673 ssl_print_hex(bio, indent + 2, "verify_data", msg, msglen); in ssl_print_handshake()
1679 ssl_print_hex(bio, indent + 2, "unexpected value", msg, msglen); in ssl_print_handshake()
1683 if (!ssl_print_ticket(bio, indent + 2, sc, msg, msglen)) in ssl_print_handshake()
1689 SSL3_MT_ENCRYPTED_EXTENSIONS, &msg, &msglen)) in ssl_print_handshake()
1695 ssl_print_hex(bio, indent + 2, "unexpected value", msg, msglen); in ssl_print_handshake()
1698 if (!ssl_trace_list(bio, indent + 2, msg, msglen, 1, in ssl_print_handshake()
1706 BIO_dump_indent(bio, (const char *)msg, msglen, indent + 4); in ssl_print_handshake()
1714 const unsigned char *msg = buf; in SSL_trace() local
1743 ssl_print_hex(bio, 0, " too short message", msg, msglen); in SSL_trace()
1746 hvers = msg[1] << 8 | msg[2]; in SSL_trace()
1753 (msg[3] << 8 | msg[4]), in SSL_trace()
1754 (msg[5] << 8 | msg[6]), in SSL_trace()
1755 (msg[7] << 8 | msg[8]), (msg[9] << 8 | msg[10])); in SSL_trace()
1759 ssl_trace_str(msg[0], ssl_content_tbl), msg[0], in SSL_trace()
1760 msg[msglen - 2] << 8 | msg[msglen - 1]); in SSL_trace()
1766 ssl_trace_str(msg[0], ssl_content_tbl), msg[0]); in SSL_trace()
1771 msg, msglen, 4)) in SSL_trace()
1776 if (msglen == 1 && msg[0] == 1) in SSL_trace()
1779 ssl_print_hex(bio, 4, "unknown value", msg, msglen); in SSL_trace()
1787 SSL_alert_type_string_long(msg[0] << 8), in SSL_trace()
1788 msg[0], SSL_alert_desc_string_long(msg[1]), msg[1]); in SSL_trace()