[lsb-discuss] [Fwd: NSS public functions]

Howard Chu hyc at symas.com
Mon Aug 11 21:22:07 PDT 2008

Wan-Teh Chang wrote:
> On Mon, Aug 11, 2008 at 1:55 PM, Howard Chu<hyc at symas.com>  wrote:
>> Note - apps that use NSS generally cannot use OS-native calls for these
>> extremely standard functions (including I/O and memory management). Instead
>> they must use NSPR calls.
> It is true that NSS requires NSPR, but it is not true that apps that
> use NSS cannot use OS-native calls for standard functions such
> as  I/O and memory management.  Apps that use NSS can call
> malloc and free for memory management and the standard I/O
> functions for file I/O.
> What NSS requires these apps to do is to wrap their socket I/O
> in a PRFileDesc object.  NSPR itself provides a default implementation
> of PRFileDesc for TCP socket I/O (the PR_NewTCPSocket function),
> but the apps don't have to use it.  NSS implements the SSL protocol
> as a PRFileDesc layer on top of the PRFileDesc layer for socket I/O.
> This PRFileDesc wrapper for the socket I/O is similar to the BIO
> in OpenSSL.

Thanks for that explanation, that clears things up for me. Still the docs give 
a quite different impression.

   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

More information about the lsb-discuss mailing list