Hi Rainer,

NSPR threads are just POSIX threads with NSPR thread IDs.
NSPR assigns NSPR thread IDs on demand to POSIX threads
not created by NSPR.  So your POSIX threads can coexist
with NSPR with no problem.

To use the TLS library in NSS, you only need to know about
some basic NSPR types (PRInt32, PRInt64, PRTime, etc.)
and NSPR's socket I/O functions (PRFileDesc, PR_OpenTCPSocket,
PR_Recv, PR_Send, PR_Close, etc.).  NSPR's socket I/O
functions were designed to be similar to the BSD socket
functions, so it should be easy to learn, and the only new
concept is the use of I/O layering to wrap the TLS functionality
inside the same PRFileDesc type and PR_xxx socket I/O
functions.  You'd need to learn the same amount of functions
with other SSL libraries.  For example, this seems like the
mapping between the two libraries (please pardon the
indentation):

PRFileDesc             gnutls_session_t

PR_ImportTCPSocket  gnutls_transport_set_ptr
+ SSL_ImportFD

PR_Send               gnutls_record_send

PR_Recv               gnutls_record_recv

PR_Shutdown       gnutls_bye
+ PR_Close

So it's the PR_ prefix that raises an eyebrow.

I agree that GnuTLS has better documentation and samples.
The authors of GnuTLS have done an excellent job.
Do you know where our documentation and samples are?

Are you using NSS because its MPL/GPL/LGPL tri-license
is compatible with the GPL?

Wan-Teh
_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to