summaryrefslogtreecommitdiffstats
path: root/vendor/openssl-sys/src/ec.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/openssl-sys/src/ec.rs')
-rw-r--r--vendor/openssl-sys/src/ec.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/openssl-sys/src/ec.rs b/vendor/openssl-sys/src/ec.rs
new file mode 100644
index 0000000..995a84f
--- /dev/null
+++ b/vendor/openssl-sys/src/ec.rs
@@ -0,0 +1,16 @@
+use libc::*;
+use std::ptr;
+
+use super::*;
+
+pub const OPENSSL_EC_NAMED_CURVE: c_int = 1;
+
+#[cfg(ossl300)]
+pub unsafe fn EVP_EC_gen(curve: *const c_char) -> *mut EVP_PKEY {
+ EVP_PKEY_Q_keygen(
+ ptr::null_mut(),
+ ptr::null_mut(),
+ "EC\0".as_ptr().cast(),
+ curve,
+ )
+}