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. 4 5 //go:build darwin 6 7 package issue24161e0 8 9 /* 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;} 20 #endif 21 */ 22 import "C" 23 import "testing" 24 25 func f1() { 26 C.SecKeyCreateSignature(0, C.kSecKeyAlgorithmECDSASignatureDigestX962SHA1, 0, nil) 27 } 28 29 func Test(t *testing.T) {} 30