1 use crate::{guid, Guid, Status};
2 use core::ffi::c_void;
3 
4 newtype_enum! {
5     pub enum TlsConfigDataType: i32 => {
6         HOST_PUBLIC_CERT     = 0,
7         HOST_PRIVATE_KEY     = 1,
8         CA_CERTIFICATE       = 2,
9         CERT_REVOCATION_LIST = 3,
10         MAXIMUM              = 4,
11     }
12 }
13 
14 #[derive(Debug)]
15 #[repr(C)]
16 pub struct TlsConfigurationProtocol {
17     pub set_data: unsafe extern "efiapi" fn(
18         this: *mut Self,
19         typ: TlsConfigDataType,
20         data: *const c_void,
21         size: usize,
22     ) -> Status,
23 
24     pub get_data: unsafe extern "efiapi" fn(
25         this: *const Self,
26         typ: TlsConfigDataType,
27         data: *mut c_void,
28         size: *mut usize,
29     ) -> Status,
30 }
31 
32 impl TlsConfigurationProtocol {
33     pub const GUID: Guid = guid!("1682fe44-bd7a-4407-b7c7-dca37ca3922d");
34     pub const SERVICE_BINDING_GUID: Guid = guid!("952cb795-ff36-48cf-a249-4df486d6ab8d");
35 }
36