{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1752651994,
"reponame":"openssl",
"desc":"OpenSSL",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/openssl",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"23b952529d1a194fce93dfab364e3d36",
"commit": {"type":"commit",
"time": 1490090444,
"time_ofs": 0,
"oid_tree": { "oid": "37e67930c8a00abf0b598e5b70cfddbdf548364b", "alias": []},
"oid":{ "oid": "77815a026cbedbb7b9a89558612f69e6294fe1ea", "alias": []},
"msg": "Fix resumption after HRR",
"sig_commit": { "git_time": { "time": 1490090444, "offset": 0 }, "name": "Matt Caswell", "email": "matt@openssl.org", "md5": "10f7b441a32d5790efad9fc68cae4af2" },
"sig_author": { "git_time": { "time": 1490033014, "offset": 0 }, "name": "Matt Caswell", "email": "matt@openssl.org", "md5": "10f7b441a32d5790efad9fc68cae4af2" }},
"body": "Fix resumption after HRR\n\nCommit 6b1bb98fa moved the processing of ClientHello extensions into the\nstate machine post-processing stage. After processing s-\u003einit_num is reset\nto 0, so by post-processing we cannot rely on its value. Unfortunately we\nwere using it to handle the PSK extension. This causes the handshake to\nfail.\n\nWe were using init_num to figure out the length of ClientHello2 so we can\nremove it from the handshake_buffer. The handshake_buffer holds the\ntranscript of all the messages sent so far. For PSK processing though we\nonly want to add in a partial ClientHello2. This commit changes things so\nwe just work out where ClientHello2 starts, working forward from the\nbeginning of handshake_buffer.\n\nFixes #2983\n\nReviewed-by: Rich Salz \u003crsalz@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/2996)"
,
"diff": "diff --git a/ssl/statem/extensions.c b/ssl/statem/extensions.c\nindex d0b15d5..9cdb263 100644\n--- a/ssl/statem/extensions.c\n+++ b/ssl/statem/extensions.c\n@@ -1242,11 +1242,18 @@ int tls_psk_do_binder(SSL *s, const EVP_MD *md, const unsigned char *msgstart,\n * ClientHello - which we don't want - so we need to take that bit off.\n */\n if (s-\u003eserver) {\n- if (hdatalen \u003c s-\u003einit_num + SSL3_HM_HEADER_LENGTH) {\n+ PACKET hashprefix, msg;\n+\n+ /* Find how many bytes are left after the first two messages */\n+ if (!PACKET_buf_init(\u0026hashprefix, hdata, hdatalen)\n+ || !PACKET_forward(\u0026hashprefix, 1)\n+ || !PACKET_get_length_prefixed_3(\u0026hashprefix, \u0026msg)\n+ || !PACKET_forward(\u0026hashprefix, 1)\n+ || !PACKET_get_length_prefixed_3(\u0026hashprefix, \u0026msg)) {\n SSLerr(SSL_F_TLS_PSK_DO_BINDER, ERR_R_INTERNAL_ERROR);\n goto err;\n }\n- hdatalen -\u003d s-\u003einit_num + SSL3_HM_HEADER_LENGTH;\n+ hdatalen -\u003d PACKET_remaining(\u0026hashprefix);\n }\n \n if (EVP_DigestUpdate(mctx, hdata, hdatalen) \u003c\u003d 0) {\n","s":{"c":1752651994,"u": 28786}}
],"g": 29665,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}