Lines Matching refs:msglen

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
47 if (msglen % vlen) in do_ssl_trace_list()
49 while (msglen) { in do_ssl_trace_list()
56 msglen -= vlen; in do_ssl_trace_list()
651 const unsigned char *msg, size_t msglen) in ssl_print_hex() argument
656 BIO_printf(bio, "%s (len=%d): ", name, (int)msglen); in ssl_print_hex()
657 for (i = 0; i < msglen; i++) in ssl_print_hex()
957 size_t extslen, msglen = *msginlen; in ssl_print_extensions() local
961 if (msglen == 0) { in ssl_print_extensions()
965 if (msglen < 2) in ssl_print_extensions()
968 msglen -= 2; in ssl_print_extensions()
973 *msginlen = msglen; in ssl_print_extensions()
976 if (extslen > msglen) in ssl_print_extensions()
979 msglen -= extslen; in ssl_print_extensions()
1002 *msginlen = msglen; 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()
1022 if (msglen < 2) in ssl_print_client_hello()
1026 msglen -= 2; in ssl_print_client_hello()
1029 if (msglen < len || len & 1) in ssl_print_client_hello()
1037 msglen -= 2; in ssl_print_client_hello()
1040 if (msglen < 1) in ssl_print_client_hello()
1044 msglen--; in ssl_print_client_hello()
1045 if (msglen < len) in ssl_print_client_hello()
1054 msglen--; in ssl_print_client_hello()
1058 &msglen)) 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()
1086 if (msglen < 2) in ssl_print_server_hello()
1093 msglen -= 2; in ssl_print_server_hello()
1095 if (msglen < 1) in ssl_print_server_hello()
1101 msglen--; in ssl_print_server_hello()
1104 &msglen)) 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()
1197 msglen = 0; in ssl_print_client_keyex()
1201 "GOST-wrapped PreMasterSecret", msg, msglen); in ssl_print_client_keyex()
1202 msglen = 0; in ssl_print_client_keyex()
1206 return !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()
1244 if (msglen < 1) in ssl_print_server_keyex()
1253 if (msglen < 3) in ssl_print_server_keyex()
1259 msglen -= 3; in ssl_print_server_keyex()
1260 if (!ssl_print_hexbuf(bio, indent + 2, "point", 1, &msg, &msglen)) in ssl_print_server_keyex()
1273 ssl_print_signature(bio, indent, sc, &msg, &msglen); in ssl_print_server_keyex()
1274 return !msglen; in ssl_print_server_keyex()
1280 size_t msglen = *pmsglen; in ssl_print_certificate() local
1286 if (msglen < 3) in ssl_print_certificate()
1289 if (msglen < clen + 3) in ssl_print_certificate()
1324 size_t msglen = *pmsglen; in ssl_print_raw_public_key() local
1326 if (msglen < 3) in ssl_print_raw_public_key()
1329 if (msglen < clen + 3) in ssl_print_raw_public_key()
1349 size_t msglen) in ssl_print_certificates() argument
1354 && !ssl_print_hexbuf(bio, indent, "context", 1, &msg, &msglen)) in ssl_print_certificates()
1357 if (msglen < 3) in ssl_print_certificates()
1360 if (msglen != clen + 3) in ssl_print_certificates()
1390 size_t msglen) in ssl_print_compressed_certificates() argument
1402 if (msglen < 8) in ssl_print_compressed_certificates()
1408 if (msglen != clen + 8) 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()
1472 if (msglen < 1) in ssl_print_cert_request()
1475 if (msglen < xlen + 1) in ssl_print_cert_request()
1483 msglen -= xlen + 1; in ssl_print_cert_request()
1486 if (msglen < 2) in ssl_print_cert_request()
1489 if (msglen < xlen + 2 || (xlen & 1)) in ssl_print_cert_request()
1492 msglen -= xlen + 2; in ssl_print_cert_request()
1506 if (msglen < 2) in ssl_print_cert_request()
1510 if (msglen < xlen + 2) in ssl_print_cert_request()
1513 msglen -= 2 + xlen; in ssl_print_cert_request()
1541 &msg, &msglen)) in ssl_print_cert_request()
1544 return msglen == 0; in ssl_print_cert_request()
1548 const unsigned char *msg, size_t msglen) in ssl_print_ticket() argument
1552 if (msglen == 0) { in ssl_print_ticket()
1557 if (msglen < 4) in ssl_print_ticket()
1563 msglen -= 4; in ssl_print_ticket()
1570 if (msglen < 4) in ssl_print_ticket()
1577 msglen -= 4; in ssl_print_ticket()
1582 &msglen)) 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()
1591 if (msglen) in ssl_print_ticket()
1597 const unsigned char *msg, size_t msglen, in ssl_print_handshake() argument
1603 if (msglen < 4) in ssl_print_handshake()
1611 msglen -= 4; in ssl_print_handshake()
1613 if (msglen < 8) in ssl_print_handshake()
1622 msglen -= 8; in ssl_print_handshake()
1624 if (msglen < hlen) 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()
1678 if (msglen != 0) 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()
1694 if (msglen != 1) { 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()
1712 const void *buf, size_t msglen, SSL *ssl, void *arg) in SSL_trace() argument
1721 if (ossl_quic_trace(write_p, version, content_type, buf, msglen, ssl, in SSL_trace()
1740 if (msglen < (size_t)(SSL_CONNECTION_IS_DTLS(sc) ? in SSL_trace()
1743 ssl_print_hex(bio, 0, " too short message", msg, msglen); in SSL_trace()
1760 msg[msglen - 2] << 8 | msg[msglen - 1]); 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()
1783 if (msglen != 2) in SSL_trace()