mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
smtp: disable buffering while running STARTTLS
Otherwise TLS setup fails on macOS and iOS with `errSSLClosedAbort`. (<https://developer.apple.com/documentation/security/errsslclosedabort>)
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
- Delete expired messages using multiple SQL requests. #4158
|
- Delete expired messages using multiple SQL requests. #4158
|
||||||
- Do not emit "Failed to run incremental vacuum" warnings on success. #4160
|
- Do not emit "Failed to run incremental vacuum" warnings on success. #4160
|
||||||
- Ability to send backup over network and QR code to setup second device #4007
|
- Ability to send backup over network and QR code to setup second device #4007
|
||||||
|
- Disable buffering during STARTTLS setup. #4190
|
||||||
|
|
||||||
## [1.111.0] - 2023-03-05
|
## [1.111.0] - 2023-03-05
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ impl Smtp {
|
|||||||
// Run STARTTLS command and convert the client back into a stream.
|
// Run STARTTLS command and convert the client back into a stream.
|
||||||
let client = smtp::SmtpClient::new().smtp_utf8(true);
|
let client = smtp::SmtpClient::new().smtp_utf8(true);
|
||||||
let transport = SmtpTransport::new(client, BufStream::new(socks5_stream)).await?;
|
let transport = SmtpTransport::new(client, BufStream::new(socks5_stream)).await?;
|
||||||
let tcp_stream = transport.starttls().await?;
|
let tcp_stream = transport.starttls().await?.into_inner();
|
||||||
let tls_stream = wrap_tls(strict_tls, hostname, tcp_stream)
|
let tls_stream = wrap_tls(strict_tls, hostname, tcp_stream)
|
||||||
.await
|
.await
|
||||||
.context("STARTTLS upgrade failed")?;
|
.context("STARTTLS upgrade failed")?;
|
||||||
@@ -199,7 +199,7 @@ impl Smtp {
|
|||||||
// Run STARTTLS command and convert the client back into a stream.
|
// Run STARTTLS command and convert the client back into a stream.
|
||||||
let client = smtp::SmtpClient::new().smtp_utf8(true);
|
let client = smtp::SmtpClient::new().smtp_utf8(true);
|
||||||
let transport = SmtpTransport::new(client, BufStream::new(tcp_stream)).await?;
|
let transport = SmtpTransport::new(client, BufStream::new(tcp_stream)).await?;
|
||||||
let tcp_stream = transport.starttls().await?;
|
let tcp_stream = transport.starttls().await?.into_inner();
|
||||||
let tls_stream = wrap_tls(strict_tls, hostname, tcp_stream)
|
let tls_stream = wrap_tls(strict_tls, hostname, tcp_stream)
|
||||||
.await
|
.await
|
||||||
.context("STARTTLS upgrade failed")?;
|
.context("STARTTLS upgrade failed")?;
|
||||||
|
|||||||
Reference in New Issue
Block a user