aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys/src
diff options
context:
space:
mode:
authorBradley Beddoes <[email protected]>2017-08-09 12:02:58 +1000
committerBradley Beddoes <[email protected]>2017-08-09 12:21:54 +1000
commitcfb4ea31d51c274a31f500cd1a5e8bdac571607c (patch)
treee2571655d3105bfc29aa4ceda3040a19e2309b42 /openssl-sys/src
parentInit in bn_ctx constructor (diff)
downloadrust-openssl-cfb4ea31d51c274a31f500cd1a5e8bdac571607c.tar.xz
rust-openssl-cfb4ea31d51c274a31f500cd1a5e8bdac571607c.zip
Support for EcKey creation from affine coordinates
Sets the public key for an EcKey based on its affine co-ordinates, i.e. it constructs an EC_POINT object based on the supplied x and y values and sets the public key to be this EC_POINT. The initial usecase here is creating EcKey instances from JWK representations as defined within RFC 7517.
Diffstat (limited to 'openssl-sys/src')
-rw-r--r--openssl-sys/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs
index 353f619f..69c95395 100644
--- a/openssl-sys/src/lib.rs
+++ b/openssl-sys/src/lib.rs
@@ -1674,6 +1674,7 @@ extern "C" {
pub fn EC_KEY_generate_key(key: *mut EC_KEY) -> c_int;
pub fn EC_KEY_check_key(key: *const EC_KEY) -> c_int;
pub fn EC_KEY_free(key: *mut EC_KEY);
+ pub fn EC_KEY_set_public_key_affine_coordinates(key: *mut EC_KEY, x: *const BIGNUM, y: *const BIGNUM) -> c_int;
#[cfg(not(osslconf = "OPENSSL_NO_EC2M"))]
pub fn EC_GF2m_simple_method() -> *const EC_METHOD;