Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing OpenSSL functions from CFM Carbon under Tiger




On Jul 4, 2005, at 1:37 PM, Daniel Jalkut wrote:

As far as I know, the SSL functions are not advertised as being part of any framework on OS X. They are supposed to be accessed directly from the libssl dylib. Examining my Panther system, I can't see anything obvious that explains why the bundle calls were working for you even on Panther.


CFBundle has long permitted very sloppy practices on the part of CFM code, for compatibility reasons--some early sample code, I believe, spread mistaken ideas that happened to work on the first versions of Mac OS X, until the mistake could no longer be corrected.


The intent of CFBundleGetFunctionPointerForName is that the symbol to be looked up should come from the bundle specified. In the case of an umbrella framework, this includes symbols from any subframework, but not from anything else that may happen to be loaded.

However, when it is called from CFM, CFBundle will perform a global search, as a last resort and purely as a compatibility measure. Nevertheless, the symbol must be present for the search to succeed, and from the description of this problem, it sounds as though the necessary library may not even be loaded in the failing executable. In that case the solution would be as simple as loading it, using any of the dyld APIs (for Tiger, the recommended one would be dlopen).

Douglas Davidson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden
References: 
 >Accessing OpenSSL functions from CFM Carbon under Tiger (From: Eric Arlotti <email@hidden>)
 >Re: Accessing OpenSSL functions from CFM Carbon under Tiger (From: Daniel Jalkut <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.