-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprotocol_cgo_darwin.go
65 lines (56 loc) · 2.67 KB
/
protocol_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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// 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 ProtocolType C.SecProtocolType
// From http://www.opensource.apple.com/source/libsecurity_keychain/libsecurity_keychain-34101/lib/SecKeychain.h
const (
ProtocolTypeFTP = C.kSecProtocolTypeFTP
ProtocolTypeFTPAccount = C.kSecProtocolTypeFTPAccount
ProtocolTypeHTTP = C.kSecProtocolTypeHTTP
ProtocolTypeIRC = C.kSecProtocolTypeIRC
ProtocolTypeNNTP = C.kSecProtocolTypeNNTP
ProtocolTypePOP3 = C.kSecProtocolTypePOP3
ProtocolTypeSMTP = C.kSecProtocolTypeSMTP
ProtocolTypeSOCKS = C.kSecProtocolTypeSOCKS
ProtocolTypeIMAP = C.kSecProtocolTypeIMAP
ProtocolTypeLDAP = C.kSecProtocolTypeLDAP
ProtocolTypeAppleTalk = C.kSecProtocolTypeAppleTalk
ProtocolTypeAFP = C.kSecProtocolTypeAFP
ProtocolTypeTelnet = C.kSecProtocolTypeTelnet
ProtocolTypeSSH = C.kSecProtocolTypeSSH
ProtocolTypeFTPS = C.kSecProtocolTypeFTPS
ProtocolTypeHTTPS = C.kSecProtocolTypeHTTPS
ProtocolTypeHTTPProxy = C.kSecProtocolTypeHTTPProxy
ProtocolTypeHTTPSProxy = C.kSecProtocolTypeHTTPSProxy
ProtocolTypeFTPProxy = C.kSecProtocolTypeFTPProxy
ProtocolTypeCIFS = C.kSecProtocolTypeCIFS
ProtocolTypeSMB = C.kSecProtocolTypeSMB
ProtocolTypeRTSP = C.kSecProtocolTypeRTSP
ProtocolTypeRTSPProxy = C.kSecProtocolTypeRTSPProxy
ProtocolTypeDAAP = C.kSecProtocolTypeDAAP
ProtocolTypeEPPC = C.kSecProtocolTypeEPPC
ProtocolTypeIPP = C.kSecProtocolTypeIPP
ProtocolTypeNNTPS = C.kSecProtocolTypeNNTPS
ProtocolTypeLDAPS = C.kSecProtocolTypeLDAPS
ProtocolTypeTelnetS = C.kSecProtocolTypeTelnetS
ProtocolTypeIMAPS = C.kSecProtocolTypeIMAPS
ProtocolTypeIRCS = C.kSecProtocolTypeIRCS
ProtocolTypePOP3S = C.kSecProtocolTypePOP3S
ProtocolTypeCVSpserver = C.kSecProtocolTypeCVSpserver
ProtocolTypeSVN = C.kSecProtocolTypeSVN
ProtocolTypeAny = C.kSecProtocolTypeAny
)