libgmssl_sys/
lib.rs

1#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
2
3include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
4
5#[cfg(test)]
6mod tests {
7    use super::*;
8
9    #[test]
10    fn test_sm2_gen() {
11        unsafe {
12            let mut key = std::mem::MaybeUninit::uninit();
13            let r = sm2_key_generate(key.as_mut_ptr());
14            assert_eq!(r, 1);
15            let key = key.assume_init();
16            println!("SM2_KEY: {key:?}")
17        }
18    }
19}