cURL / Mailing Lists / curl-library / Single Mail


darwin-ssl relies upon Apple documentation error

From: <>
Date: Tue, 12 Nov 2013 17:18:42 -0800

The following code will not start on Mac OS X 10.6 due to a symbol not existing in Security.framework:

  if(CFURLCreateDataAndPropertiesFromResource(NULL, pkcs_url, &pkcs_data,
    NULL, NULL, &status)) {
    const void *cKeys[] = {kSecImportExportPassphrase};
    const void *cValues[] = {password};
    CFDictionaryRef options = CFDictionaryCreate(NULL, cKeys, cValues,
      password ? 1L : 0L, NULL, NULL);

Specifically, kSecImportExportPassphrase does not exist in 10.6. It was added in 10.7, even though Apple's documentation says otherwise:

This results in libcurl-based projects being unable to run on Mac OS 10.6, even if they don't use client-side certificates. A closely-related Stack Overflow post is here:

computer:~ myria$ uname -a
Darwin 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
computer:~ myria$ nm -arch i386 /System/Library/Frameworks/Security.framework/Versions/A/Security | grep kSecImportExportPassphrase
computer:~ myria$

(Note that Darwin 10.8.0 is Mac OS X 10.6.x.)
List admin:
Received on 2013-11-13