Sebastian Neubauer a5dd9435ee
smpt: fix starttls
In cases where the connection was fast, curl sometimes failed to open a
connection. This fixes a regression of c2d973627bab12abc5486a3f3.

The regression triggered in these steps:

1. Create an smtp connection
2. Use STARTTLS
3. Receive the response
4. We are inside the loop in `smtp_statemachine`, calling
   `smtp_state_starttls_resp`
5. In the good flow, we exit the loop, re-enter `smtp_statemachine` and
   run `smtp_perform_upgrade_tls` at the start of the function.

   In the bad flow, we stay in the while loop, calling
   `Curl_pp_readresp`, which reads part of the TLS handshake and things
   go wrong.

The reason is that `Curl_pp_moredata` changed behavior and always
returns `true`, so we stay in the loop in `smtp_statemachine`. With a
slow connection `Curl_pp_readresp` cannot read new data and returns
`CURL_AGAIN`, so we leave the loop and re-enter `smtp_statemachine`.

With a fast connection, `Curl_pp_readresp` reads new data from the tcp
connection, which is part of the TLS handshake.

The fix is in `Curl_pp_moredata`, which needs to take the final line
into account and return `false` if only the final line is stored.

Closes #13048
2024-03-05 13:30:16 +01:00
..
2024-02-20 11:36:12 +01:00
2024-03-01 09:59:48 +01:00
2021-09-09 07:53:42 +02:00
2023-07-20 23:41:47 +02:00
2023-08-31 23:02:10 +00:00
2024-03-01 09:59:48 +01:00
2024-02-27 08:58:10 +01:00
2024-02-08 23:14:33 +01:00
2024-03-01 09:59:48 +01:00
2023-10-27 00:37:34 +00:00
2023-09-28 22:58:36 +02:00
2023-05-23 10:42:09 +02:00
2023-07-31 11:51:34 +02:00
2024-03-01 09:59:48 +01:00
2024-02-01 13:04:56 +01:00
2023-12-18 10:34:22 +01:00
2024-02-27 08:58:10 +01:00
2024-02-20 14:01:59 +01:00
2024-02-20 14:01:59 +01:00
2024-02-20 14:01:59 +01:00
2024-02-20 14:01:59 +01:00
2023-10-21 14:36:51 +02:00
2023-10-21 14:36:51 +02:00
2023-09-30 11:45:39 +02:00
2023-09-30 11:45:39 +02:00
2024-03-01 01:16:24 -08:00
2023-04-14 09:26:26 +02:00
2023-09-20 13:38:42 +02:00
2023-10-28 00:27:20 -04:00
2024-03-01 09:59:48 +01:00
2023-09-25 20:12:18 +02:00
2023-09-25 20:12:18 +02:00
2024-02-05 22:29:21 +01:00
2023-12-11 23:29:02 +01:00
2023-09-25 20:12:18 +02:00
2024-02-27 08:58:10 +01:00
2023-12-18 14:56:57 +00:00
2024-02-27 08:58:10 +01:00
2023-07-29 23:42:53 +02:00
2023-07-29 23:42:53 +02:00
2024-02-27 08:58:10 +01:00
2023-12-16 13:12:22 +00:00
2024-03-01 09:59:48 +01:00
2024-02-27 08:58:10 +01:00
2024-03-05 13:30:16 +01:00
2024-02-27 08:58:10 +01:00
2024-02-27 08:58:10 +01:00
2023-12-27 09:28:48 +01:00
2023-12-27 09:28:48 +01:00
2023-10-21 14:38:21 +02:00
2023-08-30 11:38:27 +02:00
2024-03-04 08:42:56 +01:00
2024-03-04 08:42:56 +01:00
2023-12-18 14:56:57 +00:00
2024-03-01 09:59:48 +01:00
2024-03-04 08:42:56 +01:00
2024-02-27 08:58:10 +01:00
2024-02-27 14:13:56 +01:00
2024-01-16 16:43:24 +01:00