-
-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New OpenSSL 3.* API for managing EVP_PKEY objects
The OpenSSL 3.* users now do not have a way to use non-deprecated API by using this rust bindings, which is not sustainable in the long term as either distributions will stop building with the deprecated API or it will be eventually removed. This is now mostly PoC on using RSA and ECDSA keys using the new API in tests. It does not expose all possible API that are available as I did not have a good way to test the unused API yet. I do not know if this API is available in some other *SSL libraries right now so for now all of the additions are marked with #[cfg(ossl300)]. This is partially based on #2051 which was abandoned. Fixes: #2047
- Loading branch information
Showing
12 changed files
with
501 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use super::*; | ||
use libc::*; | ||
|
||
/* OpenSSL 3.* only */ | ||
|
||
pub const OSSL_KEYMGMT_SELECT_PRIVATE_KEY: c_int = 0x01; | ||
pub const OSSL_KEYMGMT_SELECT_PUBLIC_KEY: c_int = 0x02; | ||
pub const OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS: c_int = 0x04; | ||
pub const OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS: c_int = 0x80; | ||
pub const OSSL_KEYMGMT_SELECT_ALL_PARAMETERS: c_int = | ||
OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use super::super::*; | ||
use libc::*; | ||
|
||
/* OpenSSL 3.* only */ | ||
|
||
extern "C" { | ||
pub fn OSSL_PARAM_BLD_new() -> *mut OSSL_PARAM_BLD; | ||
pub fn OSSL_PARAM_BLD_free(bld: *mut OSSL_PARAM_BLD); | ||
pub fn OSSL_PARAM_BLD_push_BN( | ||
bld: *mut OSSL_PARAM_BLD, | ||
key: *const c_char, | ||
bn: *const BIGNUM, | ||
) -> c_int; | ||
pub fn OSSL_PARAM_BLD_push_utf8_string( | ||
bld: *mut OSSL_PARAM_BLD, | ||
key: *const c_char, | ||
buf: *const c_char, | ||
bsize: usize, | ||
) -> c_int; | ||
pub fn OSSL_PARAM_BLD_push_octet_string( | ||
bld: *mut OSSL_PARAM_BLD, | ||
key: *const c_char, | ||
buf: *const c_void, | ||
bsize: usize, | ||
) -> c_int; | ||
pub fn OSSL_PARAM_BLD_to_param(bld: *mut OSSL_PARAM_BLD) -> *mut OSSL_PARAM; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.