chore: bump some sqlx-core dependencies (#2826)
* chore: update Cargo.lock * chore: avoid deprecated chrono API * chore: avoid deprecated rustls API * chore: bump webpki-roots to 0.25 * chore: remove unused generic-array dependency
This commit is contained in:
parent
49ccc7ca32
commit
068ea14665
4 changed files with 925 additions and 849 deletions
1755
Cargo.lock
generated
1755
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -36,9 +36,9 @@ tokio = { workspace = true, optional = true }
|
|||
# TLS
|
||||
native-tls = { version = "0.2.10", optional = true }
|
||||
|
||||
rustls = { version = "0.21", default-features = false, features = ["dangerous_configuration", "tls12"], optional = true }
|
||||
rustls = { version = "0.21.7", default-features = false, features = ["dangerous_configuration", "tls12"], optional = true }
|
||||
rustls-pemfile = { version = "1.0", optional = true }
|
||||
webpki-roots = { version = "0.24", optional = true }
|
||||
webpki-roots = { version = "0.25", optional = true }
|
||||
|
||||
# Type Integrations
|
||||
bit-vec = { workspace = true, optional = true }
|
||||
|
@ -67,7 +67,6 @@ futures-core = { version = "0.3.19", default-features = false }
|
|||
futures-io = "0.3.24"
|
||||
futures-intrusive = "0.5.0"
|
||||
futures-util = { version = "0.3.19", default-features = false, features = ["alloc", "sink", "io"] }
|
||||
generic-array = { version = "0.14.4", default-features = false, optional = true }
|
||||
hex = "0.4.3"
|
||||
log = { version = "0.4.14", default-features = false }
|
||||
memchr = { version = "2.4.1", default-features = false }
|
||||
|
|
|
@ -100,7 +100,7 @@ where
|
|||
if let Some(user_auth) = user_auth {
|
||||
config
|
||||
.with_custom_certificate_verifier(Arc::new(DummyTlsVerifier))
|
||||
.with_single_cert(user_auth.0, user_auth.1)
|
||||
.with_client_auth_cert(user_auth.0, user_auth.1)
|
||||
.map_err(Error::tls)?
|
||||
} else {
|
||||
config
|
||||
|
@ -109,7 +109,7 @@ where
|
|||
}
|
||||
} else {
|
||||
let mut cert_store = RootCertStore::empty();
|
||||
cert_store.add_server_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.0.iter().map(|ta| {
|
||||
cert_store.add_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.iter().map(|ta| {
|
||||
OwnedTrustAnchor::from_subject_spki_name_constraints(
|
||||
ta.subject,
|
||||
ta.spki,
|
||||
|
@ -136,7 +136,7 @@ where
|
|||
if let Some(user_auth) = user_auth {
|
||||
config
|
||||
.with_custom_certificate_verifier(Arc::new(NoHostnameTlsVerifier { verifier }))
|
||||
.with_single_cert(user_auth.0, user_auth.1)
|
||||
.with_client_auth_cert(user_auth.0, user_auth.1)
|
||||
.map_err(Error::tls)?
|
||||
} else {
|
||||
config
|
||||
|
@ -146,7 +146,7 @@ where
|
|||
} else if let Some(user_auth) = user_auth {
|
||||
config
|
||||
.with_root_certificates(cert_store)
|
||||
.with_single_cert(user_auth.0, user_auth.1)
|
||||
.with_client_auth_cert(user_auth.0, user_auth.1)
|
||||
.map_err(Error::tls)?
|
||||
} else {
|
||||
config
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
use bytes::Buf;
|
||||
use chrono::{DateTime, Datelike, Local, NaiveDate, NaiveDateTime, NaiveTime, Timelike, Utc};
|
||||
use chrono::{
|
||||
DateTime, Datelike, Local, NaiveDate, NaiveDateTime, NaiveTime, TimeZone, Timelike, Utc,
|
||||
};
|
||||
|
||||
use crate::decode::Decode;
|
||||
use crate::encode::{Encode, IsNull};
|
||||
|
@ -31,7 +33,7 @@ impl<'r> Decode<'r, MySql> for DateTime<Utc> {
|
|||
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError> {
|
||||
let naive: NaiveDateTime = Decode::<MySql>::decode(value)?;
|
||||
|
||||
Ok(DateTime::from_utc(naive, Utc))
|
||||
Ok(Utc.from_utc_datetime(&naive))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue