Skip to content

Commit d9161dc

Browse files
committed
sys/evp: add EVP_MAC symbols
1 parent 592a0fb commit d9161dc

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

openssl-sys/src/handwritten/evp.rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,3 +822,39 @@ cfg_if! {
822822
}
823823
}
824824
}
825+
826+
cfg_if! {
827+
if #[cfg(ossl300)] {
828+
extern "C" {
829+
pub fn EVP_MAC_fetch(libctx: *mut OSSL_LIB_CTX, algorithm: *const c_char, properties: *const c_char) -> *mut EVP_MAC;
830+
pub fn EVP_MAC_up_ref(mac: *mut EVP_MAC) -> c_int;
831+
pub fn EVP_MAC_free(mac: *mut EVP_MAC);
832+
pub fn EVP_MAC_is_a(mac: *const EVP_MAC, name: *const c_char) -> c_int;
833+
pub fn EVP_MAC_get0_name(mac: *const EVP_MAC) -> *const c_char;
834+
pub fn EVP_MAC_get0_description(mac: *const EVP_MAC) -> *const c_char;
835+
pub fn EVP_MAC_get0_provider(mac: *const EVP_MAC) -> *const OSSL_PROVIDER;
836+
pub fn EVP_MAC_get_params(mac: *mut EVP_MAC, params: *mut OSSL_PARAM) -> c_int;
837+
838+
pub fn EVP_MAC_CTX_new(mac: *mut EVP_MAC) -> *mut EVP_MAC_CTX;
839+
pub fn EVP_MAC_CTX_free(ctx: *mut EVP_MAC_CTX);
840+
pub fn EVP_MAC_CTX_dup(src: *const EVP_MAC_CTX) -> *mut EVP_MAC_CTX;
841+
pub fn EVP_MAC_CTX_get0_mac(ctx: *mut EVP_MAC_CTX) -> *mut EVP_MAC;
842+
pub fn EVP_MAC_CTX_get_params(ctx: *mut EVP_MAC_CTX, params: *mut OSSL_PARAM) -> c_int;
843+
pub fn EVP_MAC_CTX_set_params(ctx: *mut EVP_MAC_CTX, params: *const OSSL_PARAM) -> c_int;
844+
845+
pub fn EVP_MAC_CTX_get_mac_size(ctx: *mut EVP_MAC_CTX) -> size_t;
846+
pub fn EVP_MAC_CTX_get_block_size(ctx: *mut EVP_MAC_CTX) -> size_t;
847+
848+
pub fn EVP_MAC_init(ctx: *mut EVP_MAC_CTX, key: *const c_uchar, keylen: size_t, params: *const OSSL_PARAM) -> c_int;
849+
pub fn EVP_MAC_update(ctx: *mut EVP_MAC_CTX, data: *const c_uchar, datalen: size_t) -> c_int;
850+
pub fn EVP_MAC_final(ctx: *mut EVP_MAC_CTX, out: *mut c_uchar, outl: *mut size_t, outsize: size_t) -> c_int;
851+
pub fn EVP_MAC_finalXOF(ctx: *mut EVP_MAC_CTX, out: *mut c_uchar, outsize: size_t) -> c_int;
852+
853+
pub fn EVP_MAC_gettable_params(mac: *const EVP_MAC) -> *const OSSL_PARAM;
854+
pub fn EVP_MAC_gettable_ctx_params(mac: *const EVP_MAC) -> *const OSSL_PARAM;
855+
pub fn EVP_MAC_settable_ctx_params(mac: *const EVP_MAC) -> *const OSSL_PARAM;
856+
pub fn EVP_MAC_CTX_gettable_params(ctx: *mut EVP_MAC_CTX) -> *const OSSL_PARAM;
857+
pub fn EVP_MAC_CTX_settable_params(ctx: *mut EVP_MAC_CTX) -> *const OSSL_PARAM;
858+
}
859+
}
860+
}

openssl-sys/src/handwritten/types.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,3 +856,8 @@ pub type OSSL_PASSPHRASE_CALLBACK = Option<
856856
arg: *mut c_void,
857857
) -> c_int,
858858
>;
859+
860+
#[cfg(ossl300)]
861+
pub enum EVP_MAC {}
862+
#[cfg(ossl300)]
863+
pub enum EVP_MAC_CTX {}

0 commit comments

Comments
 (0)