Documentation ¶
Rendered for darwin/amd64
Overview ¶
Package macOS provides cgo-less wrappers for Core Foundation and Security.framework, similarly to how package syscall provides access to libSystem.dylib.
Index ¶
- Variables
- func CFArrayGetCount(array CFRef) int
- func CFDataGetBytePtr(data CFRef) uintptr
- func CFDataGetLength(data CFRef) int
- func CFDataToSlice(data CFRef) []byte
- func CFEqual(a, b CFRef) bool
- func CFNumberGetValue(num CFRef) (int32, error)
- func CFRelease(ref CFRef)
- type CFRef
- func CFArrayGetValueAtIndex(array CFRef, index int) CFRef
- func CFDictionaryGetValueIfPresent(dict CFRef, key CFString) (value CFRef, ok bool)
- func SecItemExport(cert CFRef) (data CFRef, err error)
- func SecPolicyCopyProperties(policy CFRef) CFRef
- func SecTrustSettingsCopyCertificates(domain SecTrustSettingsDomain) (certArray CFRef, err error)
- func SecTrustSettingsCopyTrustSettings(cert CFRef, domain SecTrustSettingsDomain) (trustSettings CFRef, err error)
- type CFString
- type OSStatus
- type SecTrustSettingsDomain
- type SecTrustSettingsResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoTrustSettings = errors.New("no trust settings found")
View Source
var SecPolicyAppleSSL = StringToCFString("1.2.840.113635.100.1.3") // defined by POLICYMACRO
View Source
var SecPolicyOid = StringToCFString("SecPolicyOid")
View Source
var SecTrustSettingsPolicy = StringToCFString("kSecTrustSettingsPolicy")
View Source
var SecTrustSettingsPolicyString = StringToCFString("kSecTrustSettingsPolicyString")
View Source
var SecTrustSettingsResultKey = StringToCFString("kSecTrustSettingsResult")
Functions ¶
func CFArrayGetCount ¶
func CFDataGetBytePtr ¶
func CFDataGetLength ¶
func CFDataToSlice ¶
CFDataToSlice returns a copy of the contents of data as a bytes slice.
func CFNumberGetValue ¶
Types ¶
type CFRef ¶
type CFRef uintptr
CFRef is an opaque reference to a Core Foundation object. It is a pointer, but to memory not owned by Go, so not an unsafe.Pointer.
func CFArrayGetValueAtIndex ¶
func SecItemExport ¶
func SecPolicyCopyProperties ¶
func SecTrustSettingsCopyCertificates ¶
func SecTrustSettingsCopyCertificates(domain SecTrustSettingsDomain) (certArray CFRef, err error)
func SecTrustSettingsCopyTrustSettings ¶
func SecTrustSettingsCopyTrustSettings(cert CFRef, domain SecTrustSettingsDomain) (trustSettings CFRef, err error)
type CFString ¶
type CFString CFRef
func StringToCFString ¶
StringToCFString returns a copy of the UTF-8 contents of s as a new CFString.
type SecTrustSettingsDomain ¶
type SecTrustSettingsDomain int32
const ( SecTrustSettingsDomainUser SecTrustSettingsDomain = iota SecTrustSettingsDomainAdmin SecTrustSettingsDomainSystem )
type SecTrustSettingsResult ¶
type SecTrustSettingsResult int32
const ( SecTrustSettingsResultInvalid SecTrustSettingsResult = iota SecTrustSettingsResultTrustRoot SecTrustSettingsResultTrustAsRoot SecTrustSettingsResultDeny SecTrustSettingsResultUnspecified )
Click to show internal directories.
Click to hide internal directories.