1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-06-04 05:57:49 +02:00

lavf/tls_securetransport: build on iOS

This works as expected on iOS, except for the ca_file feature which
is disabled because SecItemImport is not available.

Signed-off-by: Aman Gupta <aman@tmm1.net>
This commit is contained in:
Aman Gupta 2017-10-25 11:03:14 -07:00
parent f38d0d0c22
commit fd18d310ec
2 changed files with 9 additions and 1 deletions

6
configure vendored
View File

@ -2035,6 +2035,7 @@ SYSTEM_FUNCS="
posix_memalign posix_memalign
pthread_cancel pthread_cancel
sched_getaffinity sched_getaffinity
SecItemImport
SetConsoleTextAttribute SetConsoleTextAttribute
SetConsoleCtrlHandler SetConsoleCtrlHandler
setmode setmode
@ -6032,9 +6033,12 @@ fi
enabled securetransport && enabled securetransport &&
check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" &&
check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" || check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" ||
disable securetransport disable securetransport
enabled securetransport &&
check_func SecItemImport "-Wl,-framework,CoreFoundation -Wl,-framework,Security"
enabled schannel && enabled schannel &&
check_func_headers "windows.h security.h" InitializeSecurityContext -DSECURITY_WIN32 -lsecur32 && check_func_headers "windows.h security.h" InitializeSecurityContext -DSECURITY_WIN32 -lsecur32 &&
check_cpp_condition winerror.h "defined(SEC_I_CONTEXT_EXPIRED)" && check_cpp_condition winerror.h "defined(SEC_I_CONTEXT_EXPIRED)" &&

View File

@ -69,6 +69,9 @@ static int print_tls_error(URLContext *h, int ret)
static int import_pem(URLContext *h, char *path, CFArrayRef *array) static int import_pem(URLContext *h, char *path, CFArrayRef *array)
{ {
#if !HAVE_SECITEMIMPORT
return AVERROR_PATCHWELCOME;
#else
AVIOContext *s = NULL; AVIOContext *s = NULL;
CFDataRef data = NULL; CFDataRef data = NULL;
int64_t ret = 0; int64_t ret = 0;
@ -124,6 +127,7 @@ end:
if (s) if (s)
avio_close(s); avio_close(s);
return ret; return ret;
#endif
} }
static int load_ca(URLContext *h) static int load_ca(URLContext *h)