From 278baafec183101553031a68b729441a8c5aaabb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20J=C3=B6rg=20Schmidt?= Date: Sun, 22 May 2022 10:49:59 +0200 Subject: [PATCH] feat: re-exporting OpenSSL key structs --- CHANGELOG.md | 5 +++++ Cargo.toml | 2 +- src/lib.rs | 9 ++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe7fd17..3ccdf56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# Changelog + +## v2.1.0 - Re-Exports of OpenSSL Key Structs +Re-exporting OpenSSLs `EcKey` and `Private`/`Public` pkey structs. + ## v2.0.0 - Selected Cipher Back to a flattened version with selected cipher: ECDH P-521 AES-256-CBC. diff --git a/Cargo.toml b/Cargo.toml index 8854ed4..aba8802 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "webcryptobox" description = "Convenient opiniated wrappers around OpenSSL to use WebCrypto compatible cryptography." -version = "2.0.0" +version = "2.1.0" edition = "2021" documentation = "https://docs.rs/webcryptobox/latest/webcryptobox/" homepage = "https://github.com/jo/webcryptobox-rs" diff --git a/src/lib.rs b/src/lib.rs index aeac186..f8e29b5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,16 +43,19 @@ //! ``` use openssl::derive::Deriver; -use openssl::ec::{EcGroup, EcKey}; +use openssl::ec::EcGroup; use openssl::error::ErrorStack; use openssl::nid::Nid; use openssl::pkey::PKey; -use openssl::pkey::{Private, Public}; use openssl::rand::rand_bytes; use openssl::sha; use openssl::symm; -// Default configuration +// re-exports +pub use openssl::ec::EcKey; +pub use openssl::pkey::{Private, Public}; + +// Cipher configuration const CURVE: Nid = Nid::SECP521R1; const CIPHER: fn() -> symm::Cipher = symm::Cipher::aes_256_cbc; const KEY_LENGTH: usize = 32;