aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys/src
diff options
context:
space:
mode:
authorBradley Beddoes <[email protected]>2017-08-21 15:08:48 +1000
committerBradley Beddoes <[email protected]>2017-08-21 15:08:48 +1000
commitf599df124b59144bd03776f33efc7369918a4376 (patch)
tree2914cd001d85cc75c4ec39056fb82745f4cabd6b /openssl-sys/src
parentMerge pull request #682 from sfackler/sha-struct (diff)
downloadrust-openssl-f599df124b59144bd03776f33efc7369918a4376.tar.xz
rust-openssl-f599df124b59144bd03776f33efc7369918a4376.zip
Add ability to get affine coordinates from EcPoint
The initial usecase here is creating JWK representations as defined within RFC 7517 from an EcKey created via a PEM source.
Diffstat (limited to 'openssl-sys/src')
-rw-r--r--openssl-sys/src/lib.rs26
1 files changed, 21 insertions, 5 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs
index 3617229b..48d07b4a 100644
--- a/openssl-sys/src/lib.rs
+++ b/openssl-sys/src/lib.rs
@@ -1714,7 +1714,11 @@ 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: *mut BIGNUM, y: *mut BIGNUM) -> c_int;
+ pub fn EC_KEY_set_public_key_affine_coordinates(
+ key: *mut EC_KEY,
+ x: *mut BIGNUM,
+ y: *mut BIGNUM,
+ ) -> c_int;
#[cfg(not(osslconf = "OPENSSL_NO_EC2M"))]
pub fn EC_GF2m_simple_method() -> *const EC_METHOD;
@@ -1798,6 +1802,21 @@ extern "C" {
ctx: *mut BN_CTX,
) -> c_int;
pub fn EC_POINT_free(point: *mut EC_POINT);
+ pub fn EC_POINT_get_affine_coordinates_GFp(
+ group: *const EC_GROUP,
+ p: *const EC_POINT,
+ x: *mut BIGNUM,
+ y: *mut BIGNUM,
+ ctx: *mut BN_CTX,
+ ) -> c_int;
+ #[cfg(not(osslconf = "OPENSSL_NO_EC2M"))]
+ pub fn EC_POINT_get_affine_coordinates_GF2m(
+ group: *const EC_GROUP,
+ p: *const EC_POINT,
+ x: *mut BIGNUM,
+ y: *mut BIGNUM,
+ ctx: *mut BN_CTX,
+ ) -> c_int;
pub fn ERR_peek_last_error() -> c_ulong;
pub fn ERR_get_error() -> c_ulong;
@@ -2643,10 +2662,7 @@ extern "C" {
flags: c_uint,
) -> c_int;
#[cfg(not(libressl))]
- pub fn SMIME_read_CMS(
- bio: *mut BIO,
- bcont: *mut *mut BIO,
- ) -> *mut CMS_ContentInfo;
+ pub fn SMIME_read_CMS(bio: *mut BIO, bcont: *mut *mut BIO) -> *mut CMS_ContentInfo;
#[cfg(not(libressl))]
pub fn CMS_ContentInfo_free(cms: *mut CMS_ContentInfo);
}