cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: NSS support quirks

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 17 Jun 2008 23:20:08 +0200 (CEST)

On Fri, 13 Jun 2008, Rob Crittenden wrote:

Coming back to the fix for the current code that doesn't build for NSS...

> +#include <nss3/base64.h>
> +#include <certdb.h>
>
> #include "memory.h"
> #include "easyif.h" /* for Curl_convert_from_utf8 prototype */
>
> This needs to explicitly use nss3/base64.h for the right include to be found
> since curl provides its own base64.h. I can see that breaking on some
> platforms. It worked ok for me on Fedora 8.

Argh, in Debian the subdir is named "nss" and not "nss3" so we cannot use any
of them in such a hard-coded way! ;-/

Possibly we should make configure figure out which dir name it is and we can
use that name in the #include like:

#include NSSDIR "/base64.h"

Or can we avoid the warnings any other means without too much hacks?

> The function CERT_CompareCerts() is trickier. It is an unexported function
> in NSS. The easy solution is to simply make a local private copy of it in
> nss.c. I can provide a patch if this is a way you'd be willing to go.

I want the function to build (and work) for a current NSS release, and
possibly for semi-old versions as well.

Related to this: we should settle on a NSS release we want to support and make
sure the code is adjusted accordingly. Anyone with any particular opinions on
versions? This is a part of my ongoing documentation of such things in the
docs/INTERNALS file.

-- 
  / daniel.haxx.se
Received on 2008-06-17