aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys
diff options
context:
space:
mode:
authorMoritz Wanzenböck <[email protected]>2018-06-18 18:10:02 +0200
committerMoritz Wanzenböck <[email protected]>2018-06-18 18:10:02 +0200
commit4994e75d2cecddcaf192623527afe342fb7fd9f2 (patch)
treeb0c1fc0b35a932f93b6e87a99daced1904504b14 /openssl-sys
parentAdd methods to access private and public part of DSA keys (diff)
downloadrust-openssl-4994e75d2cecddcaf192623527afe342fb7fd9f2.tar.xz
rust-openssl-4994e75d2cecddcaf192623527afe342fb7fd9f2.zip
Add Dsa::from_(private|public)_components
Add 2 methods to create a DSA key pair from its raw components.
Diffstat (limited to 'openssl-sys')
-rw-r--r--openssl-sys/src/libressl/v273.rs16
-rw-r--r--openssl-sys/src/openssl/v110.rs11
2 files changed, 27 insertions, 0 deletions
diff --git a/openssl-sys/src/libressl/v273.rs b/openssl-sys/src/libressl/v273.rs
index 74c331f6..456f8872 100644
--- a/openssl-sys/src/libressl/v273.rs
+++ b/openssl-sys/src/libressl/v273.rs
@@ -47,6 +47,22 @@ extern "C" {
q: *mut *const ::BIGNUM,
q: *mut *const ::BIGNUM,
);
+ pub fn DSA_set0_pqg(
+ d: *mut ::DSA,
+ p: *mut ::BIGNUM,
+ q: *mut ::BIGNUM,
+ q: *mut ::BIGNUM,
+ ) -> c_int;
+ pub fn DSA_get0_key(
+ d: *const ::DSA,
+ pub_key: *mut *const ::BIGNUM,
+ priv_key: *mut *const ::BIGNUM,
+ );
+ pub fn DSA_set0_key(
+ d: *mut ::DSA,
+ pub_key: *mut ::BIGNUM,
+ priv_key: *mut ::BIGNUM,
+ ) -> c_int;
pub fn ECDSA_SIG_get0(
sig: *const ::ECDSA_SIG,
diff --git a/openssl-sys/src/openssl/v110.rs b/openssl-sys/src/openssl/v110.rs
index 47d2bee4..493385da 100644
--- a/openssl-sys/src/openssl/v110.rs
+++ b/openssl-sys/src/openssl/v110.rs
@@ -235,11 +235,22 @@ extern "C" {
q: *mut *const ::BIGNUM,
q: *mut *const ::BIGNUM,
);
+ pub fn DSA_set0_pqg(
+ d: *mut ::DSA,
+ p: *mut ::BIGNUM,
+ q: *mut ::BIGNUM,
+ q: *mut ::BIGNUM,
+ ) -> c_int;
pub fn DSA_get0_key(
d: *const ::DSA,
pub_key: *mut *const ::BIGNUM,
priv_key: *mut *const ::BIGNUM,
);
+ pub fn DSA_set0_key(
+ d: *mut ::DSA,
+ pub_key: *mut ::BIGNUM,
+ priv_key: *mut ::BIGNUM,
+ ) -> c_int;
pub fn RSA_get0_key(
r: *const ::RSA,
n: *mut *const ::BIGNUM,