From 27504890d72ae03f09e5dcb94f94e7fbad8a315c Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Tue, 7 Jan 2020 15:11:27 -0500 Subject: [PATCH] Bump elliptic-curve from 0.2.0 to 0.3.0 --- Cargo.lock | 27 ++++++++++++++++++++++++--- Cargo.toml | 4 +++- src/certificate.rs | 7 +++---- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 96ea8c9..44184fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -199,7 +199,7 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -447,6 +447,23 @@ name = "opaque-debug" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "p256" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "elliptic-curve 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "subtle 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "p384" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "elliptic-curve 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pbkdf2" version = "0.3.0" @@ -982,7 +999,7 @@ dependencies = [ "cookie-factory 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "der-parser 3.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "des 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "elliptic-curve 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "elliptic-curve 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -990,6 +1007,8 @@ dependencies = [ "log 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "nom 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "num-bigint 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "p256 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "p384 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "pcsc 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "ring 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1050,7 +1069,7 @@ dependencies = [ "checksum der-parser 3.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "537a7d6becb8c3cae3bab31439c248a12d43267ccc0b1a0333362b7cefb61c3e" "checksum des 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74ba5f1b5aee9772379c2670ba81306e65a93c0ee3caade7a1d22b188d88a3af" "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -"checksum elliptic-curve 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed8af8090c11491f2eda061d68eb48433176f851dfa6b634f829381c659ea1ff" +"checksum elliptic-curve 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "01f69be7d1feb7a7a04f158aaf32c7deaa7604e9bd58145525e536438c4e5096" "checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" "checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" "checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" @@ -1079,6 +1098,8 @@ dependencies = [ "checksum num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "76bd5272412d173d6bf9afdf98db8612bbabc9a7a830b7bfc9c188911716132e" "checksum num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c81ffc11c212fa327657cb19dd85eb7419e163b5b076bede2bdb5c974c07e4" "checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +"checksum p256 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "812a058a5afc96a52a8ab6e250325d025254ff030ff737dc5b62576e4e604c42" +"checksum p384 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3aee0d9bdeedaea6cdd47f9281a9f8e1037d3037088b70e2af13c64ce65608ec" "checksum pbkdf2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" "checksum pcsc 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "87136e233906afe6cc044ab39f1625ad9250895af5e7ba215e0ec8381390824c" "checksum pcsc-sys 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1b7bfecba2c0f1b5efb0e7caf7533ab1c295024165bcbb066231f60d33e23ea" diff --git a/Cargo.toml b/Cargo.toml index b13610f..1270a17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,13 +26,15 @@ chrono = "0.4" cookie-factory = "0.3" der-parser = "3" des = "0.3" -elliptic-curve = "0.2" +elliptic-curve = { version = "0.3", features = ["weierstrass"] } getrandom = "0.1" hmac = "0.7" log = "0.4" nom = "5" num-bigint = { version = "0.2", features = ["rand"] } pbkdf2 = "0.3" +p256 = "0.1" +p384 = "0.1" pcsc = "2" rsa = "0.2.0" secrecy = "0.6" diff --git a/src/certificate.rs b/src/certificate.rs index b358cc5..4f07f4e 100644 --- a/src/certificate.rs +++ b/src/certificate.rs @@ -39,12 +39,11 @@ use crate::{ Buffer, }; use chrono::{DateTime, Utc}; -use elliptic_curve::weierstrass::{ - curve::{NistP256, NistP384}, - PublicKey as EcPublicKey, -}; +use elliptic_curve::weierstrass::PublicKey as EcPublicKey; use log::error; use num_bigint::BigUint; +use p256::NistP256; +use p384::NistP384; use rsa::{PublicKey, RSAPublicKey}; use sha2::{Digest, Sha256}; use std::convert::TryFrom;