use core::ffi::*;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
use crate::*;
#[cfg(feature = "cssmconfig")]
pub type CSSM_KRSP_HANDLE = uint32;
#[cfg(feature = "cssmconfig")]
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct cssm_kr_name {
pub Type: uint8,
pub Length: uint8,
pub Name: *mut c_char,
}
#[cfg(all(feature = "cssmconfig", feature = "objc2"))]
unsafe impl Encode for cssm_kr_name {
const ENCODING: Encoding = Encoding::Struct(
"cssm_kr_name",
&[
<uint8>::ENCODING,
<uint8>::ENCODING,
<*mut c_char>::ENCODING,
],
);
}
#[cfg(all(feature = "cssmconfig", feature = "objc2"))]
unsafe impl RefEncode for cssm_kr_name {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[deprecated]
#[cfg(feature = "cssmconfig")]
pub type CSSM_KR_NAME = cssm_kr_name;
#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
#[deprecated]
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct cssm_kr_profile {
pub UserName: CSSM_KR_NAME,
pub UserCertificate: CSSM_CERTGROUP_PTR,
pub KRSCertChain: CSSM_CERTGROUP_PTR,
pub LE_KRANum: uint8,
pub LE_KRACertChainList: CSSM_CERTGROUP_PTR,
pub ENT_KRANum: uint8,
pub ENT_KRACertChainList: CSSM_CERTGROUP_PTR,
pub INDIV_KRANum: uint8,
pub INDIV_KRACertChainList: CSSM_CERTGROUP_PTR,
pub INDIV_AuthenticationInfo: CSSM_DATA_PTR,
pub KRSPFlags: uint32,
pub KRSPExtensions: CSSM_DATA_PTR,
}
#[cfg(all(
feature = "SecAsn1Types",
feature = "cssmconfig",
feature = "cssmtype",
feature = "objc2"
))]
unsafe impl Encode for cssm_kr_profile {
const ENCODING: Encoding = Encoding::Struct(
"cssm_kr_profile",
&[
<CSSM_KR_NAME>::ENCODING,
<CSSM_CERTGROUP_PTR>::ENCODING,
<CSSM_CERTGROUP_PTR>::ENCODING,
<uint8>::ENCODING,
<CSSM_CERTGROUP_PTR>::ENCODING,
<uint8>::ENCODING,
<CSSM_CERTGROUP_PTR>::ENCODING,
<uint8>::ENCODING,
<CSSM_CERTGROUP_PTR>::ENCODING,
<CSSM_DATA_PTR>::ENCODING,
<uint32>::ENCODING,
<CSSM_DATA_PTR>::ENCODING,
],
);
}
#[cfg(all(
feature = "SecAsn1Types",
feature = "cssmconfig",
feature = "cssmtype",
feature = "objc2"
))]
unsafe impl RefEncode for cssm_kr_profile {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[deprecated]
#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
pub type CSSM_KR_PROFILE = cssm_kr_profile;
#[deprecated]
#[cfg(all(feature = "SecAsn1Types", feature = "cssmconfig", feature = "cssmtype"))]
pub type CSSM_KR_PROFILE_PTR = *mut cssm_kr_profile;
#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
#[deprecated]
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct cssm_kr_wrappedproductinfo {
pub StandardVersion: CSSM_VERSION,
pub StandardDescription: CSSM_STRING,
pub ProductVersion: CSSM_VERSION,
pub ProductDescription: CSSM_STRING,
pub ProductVendor: CSSM_STRING,
pub ProductFlags: uint32,
}
#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
unsafe impl Encode for cssm_kr_wrappedproductinfo {
const ENCODING: Encoding = Encoding::Struct(
"cssm_kr_wrappedproductinfo",
&[
<CSSM_VERSION>::ENCODING,
<CSSM_STRING>::ENCODING,
<CSSM_VERSION>::ENCODING,
<CSSM_STRING>::ENCODING,
<CSSM_STRING>::ENCODING,
<uint32>::ENCODING,
],
);
}
#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
unsafe impl RefEncode for cssm_kr_wrappedproductinfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[deprecated]
#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
pub type CSSM_KR_WRAPPEDPRODUCT_INFO = cssm_kr_wrappedproductinfo;
#[deprecated]
#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
pub type CSSM_KR_WRAPPEDPRODUCT_INFO_PTR = *mut cssm_kr_wrappedproductinfo;
#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
#[deprecated]
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct cssm_krsubservice {
pub SubServiceId: uint32,
pub Description: *mut c_char,
pub WrappedProduct: CSSM_KR_WRAPPEDPRODUCT_INFO,
}
#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
unsafe impl Encode for cssm_krsubservice {
const ENCODING: Encoding = Encoding::Struct(
"cssm_krsubservice",
&[
<uint32>::ENCODING,
<*mut c_char>::ENCODING,
<CSSM_KR_WRAPPEDPRODUCT_INFO>::ENCODING,
],
);
}
#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
unsafe impl RefEncode for cssm_krsubservice {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[deprecated]
#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
pub type CSSM_KRSUBSERVICE = cssm_krsubservice;
#[deprecated]
#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
pub type CSSM_KRSUBSERVICE_PTR = *mut cssm_krsubservice;
#[cfg(feature = "cssmconfig")]
pub type CSSM_KR_POLICY_TYPE = uint32;
#[cfg(feature = "cssmconfig")]
pub type CSSM_KR_POLICY_FLAGS = uint32;
#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
#[deprecated]
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct cssm_kr_policy_list_item {
pub next: *mut kr_policy_list_item,
pub AlgorithmId: CSSM_ALGORITHMS,
pub Mode: CSSM_ENCRYPT_MODE,
pub MaxKeyLength: uint32,
pub MaxRounds: uint32,
pub WorkFactor: uint8,
pub PolicyFlags: CSSM_KR_POLICY_FLAGS,
pub AlgClass: CSSM_CONTEXT_TYPE,
}
#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
unsafe impl Encode for cssm_kr_policy_list_item {
const ENCODING: Encoding = Encoding::Struct(
"cssm_kr_policy_list_item",
&[
<*mut kr_policy_list_item>::ENCODING,
<CSSM_ALGORITHMS>::ENCODING,
<CSSM_ENCRYPT_MODE>::ENCODING,
<uint32>::ENCODING,
<uint32>::ENCODING,
<uint8>::ENCODING,
<CSSM_KR_POLICY_FLAGS>::ENCODING,
<CSSM_CONTEXT_TYPE>::ENCODING,
],
);
}
#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
unsafe impl RefEncode for cssm_kr_policy_list_item {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[deprecated]
#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
pub type CSSM_KR_POLICY_LIST_ITEM = cssm_kr_policy_list_item;
#[deprecated]
#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
pub type CSSM_KR_POLICY_LIST_ITEM_PTR = *mut cssm_kr_policy_list_item;
#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
#[deprecated]
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct cssm_kr_policy_info {
pub krbNotAllowed: CSSM_BOOL,
pub numberOfEntries: uint32,
pub policyEntry: *mut CSSM_KR_POLICY_LIST_ITEM,
}
#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
unsafe impl Encode for cssm_kr_policy_info {
const ENCODING: Encoding = Encoding::Struct(
"cssm_kr_policy_info",
&[
<CSSM_BOOL>::ENCODING,
<uint32>::ENCODING,
<*mut CSSM_KR_POLICY_LIST_ITEM>::ENCODING,
],
);
}
#[cfg(all(feature = "cssmconfig", feature = "cssmtype", feature = "objc2"))]
unsafe impl RefEncode for cssm_kr_policy_info {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[deprecated]
#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
pub type CSSM_KR_POLICY_INFO = cssm_kr_policy_info;
#[deprecated]
#[cfg(all(feature = "cssmconfig", feature = "cssmtype"))]
pub type CSSM_KR_POLICY_INFO_PTR = *mut cssm_kr_policy_info;