1 // Copyright 2018 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
10 #cgo CFLAGS: -x objective-c
11 #cgo LDFLAGS: -framework CoreFoundation -framework Security
12 #include <TargetConditionals.h>
13 #include <CoreFoundation/CoreFoundation.h>
14 #include <Security/Security.h>
15 #if TARGET_OS_IPHONE == 0 && __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
16 typedef CFStringRef SecKeyAlgorithm;
17 static CFDataRef SecKeyCreateSignature(SecKeyRef key, SecKeyAlgorithm algorithm, CFDataRef dataToSign, CFErrorRef *error){return NULL;}
18 #define kSecKeyAlgorithmECDSASignatureDigestX962SHA1 foo()
19 static SecKeyAlgorithm foo(void){return NULL;}
26 C.SecKeyCreateSignature(0, C.kSecKeyAlgorithmECDSASignatureDigestX962SHA1, 0, nil)
29 func Test(t *testing.T) {}