{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1752655780,
"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":"db5c3098da69eed7a8c2592629465a8c",
"commit": {"type":"commit",
"time": 1498052735,
"time_ofs": 60,
"oid_tree": { "oid": "1320a450ef1ce05133b4fe853808ad1dbb8ec4e2", "alias": []},
"oid":{ "oid": "dc87d5a92288df394f5a887be5c788a530992185", "alias": []},
"msg": "Tweak the client side PSK callback",
"sig_commit": { "git_time": { "time": 1498052735, "offset": 60 }, "name": "Matt Caswell", "email": "matt@openssl.org", "md5": "10f7b441a32d5790efad9fc68cae4af2" },
"sig_author": { "git_time": { "time": 1497626785, "offset": 60 }, "name": "Matt Caswell", "email": "matt@openssl.org", "md5": "10f7b441a32d5790efad9fc68cae4af2" }},
"body": "Tweak the client side PSK callback\n\nEnsure that we properly distinguish between successful return (PSK\nprovided), successful return (no PSK provided) and failure.\n\nReviewed-by: Rich Salz \u003crsalz@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/3670)\n"
,
"diff": "diff --git a/apps/s_client.c b/apps/s_client.c\nindex df33e0a..71e4c1f 100644\n--- a/apps/s_client.c\n+++ b/apps/s_client.c\n@@ -203,6 +203,9 @@ static int psk_use_session_cb(SSL *s, const EVP_MD *md,\n if (cipher \u003d\u003d NULL) {\n /* Doesn't look like a suitable TLSv1.3 key. Ignore it */\n OPENSSL_free(key);\n+ *id \u003d NULL;\n+ *idlen \u003d 0;\n+ *sess \u003d NULL;\n return 0;\n }\n usesess \u003d SSL_SESSION_new();\n@@ -221,13 +224,17 @@ static int psk_use_session_cb(SSL *s, const EVP_MD *md,\n if (cipher \u003d\u003d NULL)\n goto err;\n \n- if (md !\u003d NULL \u0026\u0026 SSL_CIPHER_get_handshake_digest(cipher) !\u003d md)\n- goto err;\n-\n- *sess \u003d usesess;\n-\n- *id \u003d (unsigned char *)psk_identity;\n- *idlen \u003d strlen(psk_identity);\n+ if (md !\u003d NULL \u0026\u0026 SSL_CIPHER_get_handshake_digest(cipher) !\u003d md) {\n+ /* PSK not usable, ignore it */\n+ *id \u003d NULL;\n+ *idlen \u003d 0;\n+ *sess \u003d NULL;\n+ SSL_SESSION_free(usesess);\n+ } else {\n+ *sess \u003d usesess;\n+ *id \u003d (unsigned char *)psk_identity;\n+ *idlen \u003d strlen(psk_identity);\n+ }\n \n return 1;\n \n","s":{"c":1752655780,"u": 30265}}
],"g": 31718,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}