//go:linkname x509_CFDictionaryGetValueIfPresent x509_CFDictionaryGetValueIfPresent //go:cgo_import_dynamic x509_CFDictionaryGetValueIfPresent CFDictionaryGetValueIfPresent "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation" public static (CFRef, bool) CFDictionaryGetValueIfPresent(CFRef dict, CFString key) { CFRef value = default; bool ok = default; var ret = syscall(funcPC(x509_CFDictionaryGetValueIfPresent_trampoline), uintptr(dict), uintptr(key), uintptr(@unsafe.Pointer(_addr_value)), 0L, 0L, 0L); if (ret == 0L) {
// CFDataToSlice returns a copy of the contents of data as a bytes slice. public static slice <byte> CFDataToSlice(CFRef data) { var length = CFDataGetLength(data); var ptr = CFDataGetBytePtr(data); ptr <array <byte> > src = new ptr <ptr <array <byte> > >(@unsafe.Pointer(ptr)).slice(-1, length, length); var @out = make_slice <byte>(length); copy(out, src); return(out); }
//go:linkname x509_SecTrustSettingsCopyCertificates x509_SecTrustSettingsCopyCertificates //go:cgo_import_dynamic x509_SecTrustSettingsCopyCertificates SecTrustSettingsCopyCertificates "/System/Library/Frameworks/Security.framework/Versions/A/Security" //go:linkname x509_SecTrustSettingsCopyCertificates x509_SecTrustSettingsCopyCertificates //go:cgo_import_dynamic x509_SecTrustSettingsCopyCertificates SecTrustSettingsCopyCertificates "/System/Library/Frameworks/Security.framework/Versions/A/Security" public static (CFRef, error) SecTrustSettingsCopyCertificates(SecTrustSettingsDomain domain) { CFRef certArray = default; error err = default !;
public CFString(CFRef value) => m_value = value;