use core::ffi::*;
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
use crate::*;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct cssm_data {
pub Length: usize,
pub Data: *mut u8,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for cssm_data {
const ENCODING: Encoding =
Encoding::Struct("cssm_data", &[<usize>::ENCODING, <*mut u8>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for cssm_data {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[deprecated = "SecAsn1 is not supported"]
pub type SecAsn1Item = cssm_data;
#[deprecated = "SecAsn1 is not supported"]
pub type SecAsn1Oid = cssm_data;
#[deprecated = "SecAsn1 is not supported"]
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct SecAsn1AlgId {
pub algorithm: SecAsn1Oid,
pub parameters: SecAsn1Item,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for SecAsn1AlgId {
const ENCODING: Encoding =
Encoding::Struct("?", &[<SecAsn1Oid>::ENCODING, <SecAsn1Item>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for SecAsn1AlgId {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[deprecated = "SecAsn1 is not supported"]
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct SecAsn1PubKeyInfo {
pub algorithm: SecAsn1AlgId,
pub subjectPublicKey: SecAsn1Item,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for SecAsn1PubKeyInfo {
const ENCODING: Encoding =
Encoding::Struct("?", &[<SecAsn1AlgId>::ENCODING, <SecAsn1Item>::ENCODING]);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for SecAsn1PubKeyInfo {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct SecAsn1Template_struct {
pub kind: u32,
pub offset: u32,
pub sub: NonNull<c_void>,
pub size: u32,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for SecAsn1Template_struct {
const ENCODING: Encoding = Encoding::Struct(
"SecAsn1Template_struct",
&[
<u32>::ENCODING,
<u32>::ENCODING,
<NonNull<c_void>>::ENCODING,
<u32>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for SecAsn1Template_struct {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[deprecated = "SecAsn1 is not supported"]
pub type SecAsn1Template = SecAsn1Template_struct;
#[deprecated = "SecAsn1 is not supported"]
pub type SecAsn1TemplateChooser = core::ffi::c_void;
#[deprecated = "SecAsn1 is not supported"]
pub type SecAsn1TemplateChooserPtr = *mut SecAsn1TemplateChooser;