summaryrefslogtreecommitdiffstats
path: root/vendor/openssl-sys/src
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/openssl-sys/src')
-rw-r--r--vendor/openssl-sys/src/evp.rs18
-rw-r--r--vendor/openssl-sys/src/handwritten/asn1.rs9
-rw-r--r--vendor/openssl-sys/src/handwritten/ec.rs4
-rw-r--r--vendor/openssl-sys/src/handwritten/evp.rs7
-rw-r--r--vendor/openssl-sys/src/handwritten/ssl.rs17
-rw-r--r--vendor/openssl-sys/src/handwritten/x509v3.rs11
-rw-r--r--vendor/openssl-sys/src/lib.rs5
-rw-r--r--vendor/openssl-sys/src/obj_mac.rs2
8 files changed, 64 insertions, 9 deletions
diff --git a/vendor/openssl-sys/src/evp.rs b/vendor/openssl-sys/src/evp.rs
index 72ca2434f..56eaa4bbf 100644
--- a/vendor/openssl-sys/src/evp.rs
+++ b/vendor/openssl-sys/src/evp.rs
@@ -10,6 +10,8 @@ pub const EVP_PKEY_RSA: c_int = NID_rsaEncryption;
pub const EVP_PKEY_DSA: c_int = NID_dsa;
pub const EVP_PKEY_DH: c_int = NID_dhKeyAgreement;
pub const EVP_PKEY_EC: c_int = NID_X9_62_id_ecPublicKey;
+#[cfg(ossl111)]
+pub const EVP_PKEY_SM2: c_int = NID_sm2;
#[cfg(any(ossl111, libressl370))]
pub const EVP_PKEY_X25519: c_int = NID_X25519;
#[cfg(any(ossl111, libressl370))]
@@ -285,3 +287,19 @@ pub unsafe fn EVP_PKEY_CTX_add1_hkdf_info(
info as *mut c_void,
)
}
+
+pub unsafe fn EVP_PKEY_assign_RSA(pkey: *mut EVP_PKEY, rsa: *mut RSA) -> c_int {
+ EVP_PKEY_assign(pkey, EVP_PKEY_RSA, rsa as *mut c_void)
+}
+
+pub unsafe fn EVP_PKEY_assign_DSA(pkey: *mut EVP_PKEY, dsa: *mut DSA) -> c_int {
+ EVP_PKEY_assign(pkey, EVP_PKEY_DSA, dsa as *mut c_void)
+}
+
+pub unsafe fn EVP_PKEY_assign_DH(pkey: *mut EVP_PKEY, dh: *mut DH) -> c_int {
+ EVP_PKEY_assign(pkey, EVP_PKEY_DH, dh as *mut c_void)
+}
+
+pub unsafe fn EVP_PKEY_assign_EC_KEY(pkey: *mut EVP_PKEY, ec_key: *mut EC_KEY) -> c_int {
+ EVP_PKEY_assign(pkey, EVP_PKEY_EC, ec_key as *mut c_void)
+}
diff --git a/vendor/openssl-sys/src/handwritten/asn1.rs b/vendor/openssl-sys/src/handwritten/asn1.rs
index fa43a7a5c..16ffcccfe 100644
--- a/vendor/openssl-sys/src/handwritten/asn1.rs
+++ b/vendor/openssl-sys/src/handwritten/asn1.rs
@@ -10,6 +10,7 @@ pub struct ASN1_ENCODING {
extern "C" {
pub fn ASN1_OBJECT_free(x: *mut ASN1_OBJECT);
+ pub fn OBJ_dup(x: *const ASN1_OBJECT) -> *mut ASN1_OBJECT;
}
stack!(stack_st_ASN1_OBJECT);
@@ -94,7 +95,14 @@ extern "C" {
#[cfg(ossl110)]
pub fn ASN1_ENUMERATED_get_int64(pr: *mut i64, a: *const ASN1_ENUMERATED) -> c_int;
+ pub fn ASN1_TYPE_new() -> *mut ASN1_TYPE;
+ pub fn ASN1_TYPE_set(a: *mut ASN1_TYPE, type_: c_int, value: *mut c_void);
pub fn ASN1_TYPE_free(x: *mut ASN1_TYPE);
+ pub fn d2i_ASN1_TYPE(
+ k: *mut *mut ASN1_TYPE,
+ buf: *mut *const u8,
+ len: c_long,
+ ) -> *mut ASN1_TYPE;
}
const_ptr_api! {
@@ -102,5 +110,6 @@ const_ptr_api! {
pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_uchar, s: #[const_ptr_if(any(ossl110, libressl280))] ASN1_STRING) -> c_int;
pub fn ASN1_STRING_type(x: #[const_ptr_if(any(ossl110, libressl280))] ASN1_STRING) -> c_int;
pub fn ASN1_generate_v3(str: #[const_ptr_if(any(ossl110, libressl280))] c_char, cnf: *mut X509V3_CTX) -> *mut ASN1_TYPE;
+ pub fn i2d_ASN1_TYPE(a: #[const_ptr_if(ossl300)] ASN1_TYPE, pp: *mut *mut c_uchar) -> c_int;
}
}
diff --git a/vendor/openssl-sys/src/handwritten/ec.rs b/vendor/openssl-sys/src/handwritten/ec.rs
index 6ee475f32..182a5559a 100644
--- a/vendor/openssl-sys/src/handwritten/ec.rs
+++ b/vendor/openssl-sys/src/handwritten/ec.rs
@@ -46,6 +46,8 @@ extern "C" {
pub fn EC_GROUP_set_asn1_flag(key: *mut EC_GROUP, flag: c_int);
+ pub fn EC_GROUP_get_asn1_flag(group: *const EC_GROUP) -> c_int;
+
pub fn EC_GROUP_get_curve_GFp(
group: *const EC_GROUP,
p: *mut BIGNUM,
@@ -99,7 +101,7 @@ extern "C" {
pub fn EC_POINT_dup(p: *const EC_POINT, group: *const EC_GROUP) -> *mut EC_POINT;
- #[cfg(ossl111)]
+ #[cfg(any(ossl111, boringssl, libressl350))]
pub fn EC_POINT_get_affine_coordinates(
group: *const EC_GROUP,
p: *const EC_POINT,
diff --git a/vendor/openssl-sys/src/handwritten/evp.rs b/vendor/openssl-sys/src/handwritten/evp.rs
index 050d2c88b..4041d8b67 100644
--- a/vendor/openssl-sys/src/handwritten/evp.rs
+++ b/vendor/openssl-sys/src/handwritten/evp.rs
@@ -311,6 +311,7 @@ extern "C" {
pub fn EVP_des_ede3_cbc() -> *const EVP_CIPHER;
pub fn EVP_des_ede3_cfb64() -> *const EVP_CIPHER;
pub fn EVP_des_cbc() -> *const EVP_CIPHER;
+ #[cfg(not(osslconf = "OPENSSL_NO_RC4"))]
pub fn EVP_rc4() -> *const EVP_CIPHER;
pub fn EVP_bf_ecb() -> *const EVP_CIPHER;
pub fn EVP_bf_cbc() -> *const EVP_CIPHER;
@@ -521,6 +522,12 @@ extern "C" {
pub fn EVP_PKEY_derive_init(ctx: *mut EVP_PKEY_CTX) -> c_int;
pub fn EVP_PKEY_derive_set_peer(ctx: *mut EVP_PKEY_CTX, peer: *mut EVP_PKEY) -> c_int;
+ #[cfg(ossl300)]
+ pub fn EVP_PKEY_derive_set_peer_ex(
+ ctx: *mut EVP_PKEY_CTX,
+ peer: *mut EVP_PKEY,
+ validate_peer: c_int,
+ ) -> c_int;
pub fn EVP_PKEY_derive(ctx: *mut EVP_PKEY_CTX, key: *mut c_uchar, size: *mut size_t) -> c_int;
#[cfg(ossl300)]
diff --git a/vendor/openssl-sys/src/handwritten/ssl.rs b/vendor/openssl-sys/src/handwritten/ssl.rs
index f179a04ab..d4f4b619f 100644
--- a/vendor/openssl-sys/src/handwritten/ssl.rs
+++ b/vendor/openssl-sys/src/handwritten/ssl.rs
@@ -648,6 +648,15 @@ extern "C" {
num: size_t,
readbytes: *mut size_t,
) -> c_int;
+ #[cfg(ossl111)]
+ pub fn SSL_bytes_to_cipher_list(
+ s: *mut SSL,
+ bytes: *const c_uchar,
+ len: size_t,
+ isv2format: c_int,
+ sk: *mut *mut stack_st_SSL_CIPHER,
+ scsvs: *mut *mut stack_st_SSL_CIPHER,
+ ) -> c_int;
}
extern "C" {
@@ -905,9 +914,13 @@ extern "C" {
#[cfg(ossl111)]
pub fn SSL_set_num_tickets(s: *mut SSL, num_tickets: size_t) -> c_int;
- #[cfg(ossl111)]
+ #[cfg(ossl111b)]
pub fn SSL_CTX_get_num_tickets(ctx: *const SSL_CTX) -> size_t;
+ #[cfg(all(ossl111, not(ossl111b)))]
+ pub fn SSL_CTX_get_num_tickets(ctx: *mut SSL_CTX) -> size_t;
- #[cfg(ossl111)]
+ #[cfg(ossl111b)]
pub fn SSL_get_num_tickets(s: *const SSL) -> size_t;
+ #[cfg(all(ossl111, not(ossl111b)))]
+ pub fn SSL_get_num_tickets(s: *mut SSL) -> size_t;
}
diff --git a/vendor/openssl-sys/src/handwritten/x509v3.rs b/vendor/openssl-sys/src/handwritten/x509v3.rs
index 09a92640b..2ee045259 100644
--- a/vendor/openssl-sys/src/handwritten/x509v3.rs
+++ b/vendor/openssl-sys/src/handwritten/x509v3.rs
@@ -6,6 +6,11 @@ pub enum CONF_METHOD {}
extern "C" {
pub fn GENERAL_NAME_new() -> *mut GENERAL_NAME;
pub fn GENERAL_NAME_free(name: *mut GENERAL_NAME);
+ pub fn GENERAL_NAME_set0_othername(
+ gen: *mut GENERAL_NAME,
+ oid: *mut ASN1_OBJECT,
+ value: *mut ASN1_TYPE,
+ ) -> c_int;
}
#[repr(C)]
@@ -97,6 +102,8 @@ extern "C" {
) -> c_int;
#[cfg(ossl110)]
+ pub fn X509_get_pathlen(x: *mut X509) -> c_long;
+ #[cfg(ossl110)]
pub fn X509_get_extension_flags(x: *mut X509) -> u32;
#[cfg(ossl110)]
pub fn X509_get_key_usage(x: *mut X509) -> u32;
@@ -106,9 +113,9 @@ extern "C" {
pub fn X509_get0_subject_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING;
#[cfg(ossl110)]
pub fn X509_get0_authority_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING;
- #[cfg(ossl111)]
+ #[cfg(ossl111d)]
pub fn X509_get0_authority_issuer(x: *mut X509) -> *const stack_st_GENERAL_NAME;
- #[cfg(ossl111)]
+ #[cfg(ossl111d)]
pub fn X509_get0_authority_serial(x: *mut X509) -> *const ASN1_INTEGER;
}
diff --git a/vendor/openssl-sys/src/lib.rs b/vendor/openssl-sys/src/lib.rs
index c3084755c..784b7637e 100644
--- a/vendor/openssl-sys/src/lib.rs
+++ b/vendor/openssl-sys/src/lib.rs
@@ -1,15 +1,12 @@
#![allow(
clippy::missing_safety_doc,
- clippy::unreadable_literal,
- clippy::uninlined_format_args,
- clippy::upper_case_acronyms,
dead_code,
non_camel_case_types,
non_snake_case,
non_upper_case_globals,
- overflowing_literals,
unused_imports
)]
+#![cfg_attr(feature = "unstable_boringssl", allow(ambiguous_glob_reexports))]
#![doc(html_root_url = "https://docs.rs/openssl-sys/0.9")]
#![recursion_limit = "128"] // configure fixed limit across all rust versions
diff --git a/vendor/openssl-sys/src/obj_mac.rs b/vendor/openssl-sys/src/obj_mac.rs
index 22bfccba3..6ae48834b 100644
--- a/vendor/openssl-sys/src/obj_mac.rs
+++ b/vendor/openssl-sys/src/obj_mac.rs
@@ -935,6 +935,8 @@ pub const NID_ED25519: c_int = 952;
#[cfg(ossl111)]
pub const NID_ED448: c_int = 1088;
#[cfg(ossl111)]
+pub const NID_sm2: c_int = 1172;
+#[cfg(ossl111)]
pub const NID_sm3: c_int = 1143;
#[cfg(libressl291)]
pub const NID_sm3: c_int = 968;