Upgrade to openssl 0.2

This commit is contained in:
Steven Fackler 2014-11-27 21:39:16 -08:00
parent f35e3b6e3a
commit 7b8786c6a2
2 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ default = ["uuid", "time"]
[dependencies]
phf = "0.1"
phf_mac = "0.1"
openssl = "0.1"
openssl = "0.2"
[dependencies.uuid]
optional = true

View File

@ -443,11 +443,11 @@ impl InnerConnection {
}
AuthenticationMD5Password { salt } => {
let pass = try!(user.password.ok_or(ConnectError::MissingPassword));
let hasher = Hasher::new(MD5);
let mut hasher = Hasher::new(MD5);
hasher.update(pass.as_bytes());
hasher.update(user.user.as_bytes());
let output = hasher.finalize()[].to_hex();
let hasher = Hasher::new(MD5);
let mut hasher = Hasher::new(MD5);
hasher.update(output.as_bytes());
hasher.update(&salt);
let output = format!("md5{}", hasher.finalize()[].to_hex());