Skip to content

Commit 7ff4b3a

Browse files
committed
Merge latest master into branch
2 parents 508b430 + f8d14d0 commit 7ff4b3a

File tree

34 files changed

+486
-96
lines changed

34 files changed

+486
-96
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ version: 2
2222
jobs:
2323
build:
2424
docker:
25-
- image: rust:1.39.0
25+
- image: rust:1.40.0
2626
environment:
2727
RUSTFLAGS: -D warnings
2828
- image: sfackler/rust-postgres-test:6

postgres-derive/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3-
## v0.1.0-alpha.1 - 2019-10-14
3+
## v0.4.0 - 2019-12-23
4+
5+
No changes
6+
7+
## v0.4.0-alpha.1 - 2019-10-14
48

59
* Initial release

postgres-derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "postgres-derive"
3-
version = "0.4.0-alpha.1"
3+
version = "0.4.0"
44
authors = ["Steven Fackler <[email protected]>"]
55
license = "MIT/Apache-2.0"
66
edition = "2018"

postgres-native-tls/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## v0.3.0 - 2019-12-23
4+
5+
### Changed
6+
7+
* Upgraded to `tokio-postgres` 0.5.
8+
39
## v0.3.0-alpha.2 - 2019-11-27
410

511
### Changed

postgres-native-tls/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "postgres-native-tls"
3-
version = "0.3.0-alpha.2"
3+
version = "0.3.0"
44
authors = ["Steven Fackler <[email protected]>"]
55
edition = "2018"
66
license = "MIT/Apache-2.0"
@@ -21,8 +21,8 @@ futures = "0.3"
2121
native-tls = "0.2"
2222
tokio = "0.2"
2323
tokio-tls = "0.3"
24-
tokio-postgres = { version = "=0.5.0-alpha.2", path = "../tokio-postgres", default-features = false }
24+
tokio-postgres = { version = "0.5.0", path = "../tokio-postgres", default-features = false }
2525

2626
[dev-dependencies]
2727
tokio = { version = "0.2", features = ["full"] }
28-
postgres = { version = "=0.17.0-alpha.2", path = "../postgres" }
28+
postgres = { version = "0.17.0", path = "../postgres" }

postgres-openssl/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## v0.3.0 - 2019-12-23
4+
5+
### Changed
6+
7+
* Upgraded to `tokio-postgres` 0.5.
8+
39
## v0.3.0-alpha.2 - 2019-11-27
410

511
### Changed

postgres-openssl/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "postgres-openssl"
3-
version = "0.3.0-alpha.2"
3+
version = "0.3.0"
44
authors = ["Steven Fackler <[email protected]>"]
55
edition = "2018"
66
license = "MIT/Apache-2.0"
@@ -21,8 +21,8 @@ futures = "0.3"
2121
openssl = "0.10"
2222
tokio = "0.2"
2323
tokio-openssl = "0.4"
24-
tokio-postgres = { version = "=0.5.0-alpha.2", path = "../tokio-postgres", default-features = false }
24+
tokio-postgres = { version = "0.5.0", path = "../tokio-postgres", default-features = false }
2525

2626
[dev-dependencies]
2727
tokio = { version = "0.2", features = ["full"] }
28-
postgres = { version = "=0.17.0-alpha.2", path = "../postgres" }
28+
postgres = { version = "0.17.0", path = "../postgres" }

postgres-protocol/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## v0.5.0 - 2019-12-23
4+
5+
### Changed
6+
7+
* `frontend::Message` is now a true non-exhaustive enum.
8+
39
## v0.5.0-alpha.2 - 2019-11-27
410

511
### Changed

postgres-protocol/Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
[package]
22
name = "postgres-protocol"
3-
version = "0.5.0-alpha.2"
3+
version = "0.5.0"
44
authors = ["Steven Fackler <[email protected]>"]
55
edition = "2018"
66
description = "Low level Postgres protocol APIs"
77
license = "MIT/Apache-2.0"
8-
repository = "https://github.com/sfackler/rust-postgres-protocol"
8+
repository = "https://github.com/sfackler/rust-postgres"
99
readme = "../README.md"
1010

1111
[dependencies]
12-
base64 = "0.10"
12+
base64 = "0.11"
1313
byteorder = "1.0"
1414
bytes = "0.5"
1515
fallible-iterator = "0.2"
16-
generic-array = "0.13"
1716
hmac = "0.7"
18-
md5 = "0.6"
17+
md5 = "0.7"
1918
memchr = "2.0"
2019
rand = "0.7"
2120
sha2 = "0.8"

postgres-protocol/src/authentication/sasl.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! SASL-based authentication support.
22
3-
use generic_array::typenum::U32;
4-
use generic_array::GenericArray;
53
use hmac::{Hmac, Mac};
64
use rand::{self, Rng};
75
use sha2::{Digest, Sha256};
@@ -33,13 +31,13 @@ fn normalize(pass: &[u8]) -> Vec<u8> {
3331
}
3432
}
3533

36-
fn hi(str: &[u8], salt: &[u8], i: u32) -> GenericArray<u8, U32> {
34+
fn hi(str: &[u8], salt: &[u8], i: u32) -> [u8; 32] {
3735
let mut hmac = Hmac::<Sha256>::new_varkey(str).expect("HMAC is able to accept all key sizes");
3836
hmac.input(salt);
3937
hmac.input(&[0, 0, 0, 1]);
4038
let mut prev = hmac.result().code();
4139

42-
let mut hi = GenericArray::<u8, U32>::clone_from_slice(&prev);
40+
let mut hi = prev;
4341

4442
for _ in 1..i {
4543
let mut hmac = Hmac::<Sha256>::new_varkey(str).expect("already checked above");
@@ -51,7 +49,7 @@ fn hi(str: &[u8], salt: &[u8], i: u32) -> GenericArray<u8, U32> {
5149
}
5250
}
5351

54-
hi
52+
hi.into()
5553
}
5654

5755
enum ChannelBindingInner {
@@ -103,7 +101,7 @@ enum State {
103101
channel_binding: ChannelBinding,
104102
},
105103
Finish {
106-
salted_password: GenericArray<u8, U32>,
104+
salted_password: [u8; 32],
107105
auth_message: String,
108106
},
109107
Done,
@@ -220,7 +218,7 @@ impl ScramSha256 {
220218
hmac.input(auth_message.as_bytes());
221219
let client_signature = hmac.result();
222220

223-
let mut client_proof = GenericArray::<u8, U32>::clone_from_slice(&client_key);
221+
let mut client_proof = client_key;
224222
for (proof, signature) in client_proof.iter_mut().zip(client_signature.code()) {
225223
*proof ^= signature;
226224
}

0 commit comments

Comments
 (0)