kSecDigestHMACMD5, SHA1, SHA2 missing from Security.framework

Originator:wiml
Number:rdar://10424173 Date Originated:09-Nov-2011 06:24 PM
Status:Closed Resolved:30-Apr-2012
Product: Product Version:10.7
Classification: Reproducible:Always
 
09-Nov-2011 06:24 PM W Lewis:
Summary:

The symbols kSecDigestHMACMD5, kSecDigestHMACSHA1, and kSecDigestHMACSHA2 are declared in SecDigestTransform.h, but are not actually available from the Security framework.

Steps to Reproduce:

Write & compile a program which references any of these symbols

Expected Results:

Program links successfully

Actual Results:

Ld /Volumes/Local/Users/omnibuild/wiml-tmp/Prods/Debug/OmniFoundation.framework/Versions/A/OmniFoundation normal x86_64
    cd /Volumes/Local/Users/omnibuild/wiml-tmp/OmniGroup/Frameworks/OmniFoundation
    setenv MACOSX_DEPLOYMENT_TARGET 10.7
    /Developer/usr/bin/gcc-4.2 -arch x86_64 -dynamiclib -isysroot /Developer/SDKs/MacOSX10.7.sdk -L/Volumes/Local/Users/omnibuild/wiml-tmp/Prods/Debug -F/Volumes/Local/Users/omnibuild/wiml-tmp/Prods/Debug -F/Developer/SDKs/MacOSX10.7.sdk/Library/Frameworks -filelist /Volumes/Local/Users/omnibuild/wiml-tmp/Prods/Builds/OmniFoundation.build/Debug/OmniFoundation.build/Objects-normal/x86_64/OmniFoundation.LinkFileList -install_name /Volumes/Local/Users/omnibuild/wiml-tmp/Prods/Debug/OmniFoundation.framework/Versions/A/OmniFoundation -mmacosx-version-min=10.7 -sectorder __TEXT __text OmniFoundation.order -lbz2 -framework OmniBase -framework System -framework Foundation -framework CoreServices -framework CoreFoundation -framework SystemConfiguration -lz -framework ExceptionHandling -lxml2 -framework Security -single_module -compatibility_version 1 -current_version 1 -o /Volumes/Local/Users/omnibuild/wiml-tmp/Prods/Debug/OmniFoundation.framework/Versions/A/OmniFoundation
Undefined symbols for architecture x86_64:
  "_kSecDigestHMACMD5", referenced from:
      _lionAlgorithmParameters in OFXMLSignature.o
  "_kSecDigestHMACSHA1", referenced from:
      _lionAlgorithmParameters in OFXMLSignature.o
  "_kSecDigestHMACSHA2", referenced from:
      _lionAlgorithmParameters in OFXMLSignature.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

Regression:

This is a regression from the 10.6 crypto APIs --- many of them worked!

Notes:

% fgrep kSecDigestHMAC Security.framework/Headers/*
Security.framework/Headers/SecDigestTransform.h:extern const CFStringRef kSecDigestHMACMD5;
Security.framework/Headers/SecDigestTransform.h:extern const CFStringRef kSecDigestHMACSHA1;
Security.framework/Headers/SecDigestTransform.h:extern const CFStringRef kSecDigestHMACSHA2;
% nm Security.framework/Security | fgrep kSecDigestHMAC
00000000003039f8 s _kSecDigestHMACKeyAttribute
00000000003039d0 s _kSecDigestHMACMD5
00000000003039d8 s _kSecDigestHMACSHA1
00000000003039e0 s _kSecDigestHMACSHA2

Note the lower-case 's', indicating that the symbol is private/static/not visible.

Comments

Do you know if there is any trick to workaround to this?

Unfortunately for us building for 10.6 is not an option, but do you know of a way to use the symbols from the old libraries somehow?

By SelfTransformingElfMachine at March 11, 2012, 2:07 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!