)]}'
{
  "commit": "13df5d3497e6148b2b42bed7b5593144f8f6216c",
  "tree": "2e94b5f4b976ea0bd5af2a3ec679a1e1fe7d8657",
  "parents": [
    "b28f919007439b48a1d00d54134d7b020a683cda"
  ],
  "author": {
    "name": "Miss Islington (bot)",
    "email": "31488909+miss-islington@users.noreply.github.com",
    "time": "Mon Mar 27 07:14:01 2023 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Mar 27 16:14:01 2023 +0200"
  },
  "message": "[3.11] GH-95494: Fix transport EOF handling in OpenSSL 3.0 (GH-95495) (#103006)\n\nGH-25309 enabled SSL_OP_IGNORE_UNEXPECTED_EOF by default, with a comment\r\nthat it restores OpenSSL 1.1.1 behavior, but this wasn\u0027t quite right.\r\nThat option causes OpenSSL to treat transport EOF as the same as\r\nclose_notify (i.e. SSL_ERROR_ZERO_RETURN), whereas Python actually has\r\ndistinct SSLEOFError and SSLZeroReturnError exceptions. (The latter is\r\nusually mapped to a zero return from read.) In OpenSSL 1.1.1, the ssl\r\nmodule would raise them for transport EOF and close_notify,\r\nrespectively. In OpenSSL 3.0, both act like close_notify.\r\n\r\nFix this by, instead, just detecting SSL_R_UNEXPECTED_EOF_WHILE_READING\r\nand mapping that to the other exception type.\r\n\r\nThere doesn\u0027t seem to have been any unit test of this error, so fill in\r\nthe missing one. This had to be done with the BIO path because it\u0027s\r\nactually slightly tricky to simulate a transport EOF with Python\u0027s fd\r\nbased APIs. (If you instruct the server to close the socket, it gets\r\nconfused, probably because the server\u0027s SSL object is still referencing\r\nthe now dead fd?)\r\n(cherry picked from commit 420bbb783b43216cc897dc8914851899db37a31d)\r\n\r\nCo-authored-by: David Benjamin \u003cdavidben@google.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5c6ddf12ec356dae2fcc3a2f3d36b4eb7a309d76",
      "old_mode": 33188,
      "old_path": "Lib/test/test_ssl.py",
      "new_id": "85a561f6b749197f270131ea4440e94474dc0a80",
      "new_mode": 33188,
      "new_path": "Lib/test/test_ssl.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d0f4ccbdd3e39f85d1751e83fa3f51e6ebb97f1e",
      "new_mode": 33188,
      "new_path": "Misc/NEWS.d/next/Library/2022-07-30-23-01-43.gh-issue-95495.RA-q1d.rst"
    },
    {
      "type": "modify",
      "old_id": "79f78007b68dcd48de863bce32106627478df6e3",
      "old_mode": 33188,
      "old_path": "Modules/_ssl.c",
      "new_id": "61490783e9ba956ce6ed7ec58f2b2e2de79f8c22",
      "new_mode": 33188,
      "new_path": "Modules/_ssl.c"
    }
  ]
}
