Skip to content

Commit 0332bc6

Browse files
committed
Fix SecAuthenticationType endianness
1 parent c7e89fd commit 0332bc6

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

crates/header-translator/configs/builtin.toml

-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ class.ABNewPersonViewController.methods.newPersonViewDelegate.skipped = true
2828

2929
# Dependent on target endianness
3030
typedef.WideChar.skipped = true # union+typedef in CoreServices
31-
enum.SecAuthenticationType.skipped = true # in Security

framework-crates/objc2-security/src/lib.rs

+7
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,10 @@ unsafe impl Encode for cssm_list_element {
108108
unsafe impl RefEncode for cssm_list_element {
109109
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
110110
}
111+
112+
// Used by `SecAuthenticationType` for endianness-dependent constants.
113+
#[cfg(feature = "SecKeychain")]
114+
#[allow(non_snake_case)]
115+
pub(crate) const fn AUTH_TYPE_FIX_(code: FourCharCode) -> FourCharCode {
116+
FourCharCode::from_be(code)
117+
}

framework-crates/objc2-security/translation-config.toml

-6
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,6 @@ static.oidSubjectAltName.skipped = true
133133
static.oidSubjectInfoAccess.skipped = true
134134
static.oidSubjectKeyIdentifier.skipped = true
135135

136-
# `AUTH_TYPE_FIX_` macro in definition
137-
enum.SecAuthenticationType.use-value = true
138-
enum.anonymous.constants.CSSM_EVIDENCE_FORM_APPLE_HEADER.use-value = true
139-
enum.anonymous.constants.CSSM_EVIDENCE_FORM_APPLE_CERTGROUP.use-value = true
140-
enum.anonymous.constants.CSSM_EVIDENCE_FORM_APPLE_CERT_INFO.use-value = true
141-
142136
# References parent enum SecuritySessionId, which is hard to handle
143137
enum.anonymous.constants.callerSecuritySession.use-value = true
144138

generated

0 commit comments

Comments
 (0)