Simon Josefsson wrote:
>
> Any chance of making PR_ImportTCPSocket() into a "official" function?
No. Although PR_ImportTCPSocket() works in most cases, it cannot
be made to work in general.
> I think it's quite useful if you're trying to use NSS to SSL-ify a
> program that does not already use NSPR.
That's true. It is a quick solution that has the following constraints:
1. Your application should continue to work after what NSPR does to the
native file descriptors. For example, on Unix NSPR sets the Unix
file descriptors for sockets in non-blocking mode (i.e., setting
their O_NONBLOCK flag).
2. Your application should not perform operations on the native file
descriptors that conflict with NSPR. Take Unix as example again.
Your application should not unset the O_NONBLOCK flag of the Unix
file descriptors for sockets that have been imported into NSPR.
The "correct" way to SSL-ify a program that does not already use NSPR
is to implement your own PRFileDesc. You will have to implement the
relevant I/O methods in PRIOMethods table.
> (Also, RPM's would be nice. Would you accept a RPM .spec if I write
> one, or is someone already working on it?)
Nobody is working on a RPM .spec file. Do you not like the packaging
our our binary distributions, or are RPM's more convenient?
We can check in a PRM .spec file if we know how to maintain it.
Wan-Teh