-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauthtype_cgo_darwin.go
39 lines (30 loc) · 1.51 KB
/
authtype_cgo_darwin.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// go-seckeychain - Native OS X Security.framework binding for Golang
// Copyright (c) 2015 Chaiwat Shuetrakoonpaiboon. All rights reserved.
//
// Use of this source code is governed by a MIT license that can be found in
// the LICENSE file.
// +build darwin,cgo
package seckeychain
// See https://developer.apple.com/library/mac/documentation/Security/Reference/keychainservices/index.html for the APIs used below.
// Also see https://developer.apple.com/library/ios/documentation/Security/Conceptual/keychainServConcepts/01introduction/introduction.html .
/*
#cgo CFLAGS: -mmacosx-version-min=10.6 -D__MAC_OS_X_VERSION_MAX_ALLOWED=1060
#cgo LDFLAGS: -framework CoreFoundation -framework Security
#include <stdlib.h>
#include <CoreFoundation/CoreFoundation.h>
#include <Security/Security.h>
*/
import "C"
type AuthenticationType C.SecAuthenticationType
// From http://www.opensource.apple.com/source/libsecurity_keychain/libsecurity_keychain-34101/lib/SecKeychain.h
const (
AuthenticationTypeNTLM = C.kSecAuthenticationTypeNTLM
AuthenticationTypeMSN = C.kSecAuthenticationTypeMSN
AuthenticationTypeDPA = C.kSecAuthenticationTypeDPA
AuthenticationTypeRPA = C.kSecAuthenticationTypeRPA
AuthenticationTypeHTTPBasic = C.kSecAuthenticationTypeHTTPBasic
AuthenticationTypeHTTPDigest = C.kSecAuthenticationTypeHTTPDigest
AuthenticationTypeHTMLForm = C.kSecAuthenticationTypeHTMLForm
AuthenticationTypeDefault = C.kSecAuthenticationTypeDefault
AuthenticationTypeAny = C.kSecAuthenticationTypeAny
)