X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/b1ab9ed8d0e0f1c3b66d7daa8fd5564444c56195..80e2389990082500d76eb566d4946be3e786c3ef:/sec/Security/SecFramework.h diff --git a/sec/Security/SecFramework.h b/sec/Security/SecFramework.h index bfba8ee9..6b1f6e0e 100644 --- a/sec/Security/SecFramework.h +++ b/sec/Security/SecFramework.h @@ -34,9 +34,7 @@ #include #include -#if defined(__cplusplus) -extern "C" { -#endif +__BEGIN_DECLS #define SecString(key, comment) CFSTR(key) #define SecStringFromTable(key, tbl, comment) CFSTR(key) @@ -61,8 +59,9 @@ CFDataRef SecDigestCreate(CFAllocatorRef allocator, const SecAsn1Oid *algorithm, const SecAsn1Item *params, const UInt8 *data, CFIndex length); -#if defined(__cplusplus) -} -#endif +// Wrapper to provide a CFErrorRef for legacy API. +OSStatus SecOSStatusWith(bool (^perform)(CFErrorRef *error)); + +__END_DECLS #endif /* !_SECURITY_SECFRAMEWORK_H_ */