Missing functions in latest NSS library

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing functions in latest NSS library

John
Hi,

I've updated my codes to use the latest Mozilla xulrunner SDK 38.0.5 (which includes NSS 3.19.1). However I'm getting the following errors:

error LNK2001: unresolved external symbol _PK11_ListFixedKeysInSlot
error LNK2001: unresolved external symbol _PK11_DeleteTokenSymKey
error LNK2001: unresolved external symbol _PK11_SetSymKeyNickname
error LNK2001: unresolved external symbol _PK11_ImportSymKeyWithFlags
error LNK2001: unresolved external symbol _PK11_ImportDERCert
error LNK2001: unresolved external symbol _PK11_ListPublicKeysInSlot
error LNK2001: unresolved external symbol _SECKEY_DestroyPublicKeyList
error LNK2001: unresolved external symbol _PK11_FindCertFromDERCert
error LNK2001: unresolved external symbol _BTOA_ConvertItemToAscii

I did not get these error with Mozilla xulrunner SDK 32.0 (which includes NSS 3.16.4).

I'm linking against nss3.lib. I've check other libraries (DLLs) but could not find the above functions. Am I missing something?

Thanks,
John

 
Reply | Threaded
Open this post in threaded view
|

Re: Missing functions in latest NSS library

Kai Engert-4
On Tue, 2015-06-09 at 04:34 -0700, John wrote:
> I did not get these error with Mozilla xulrunner SDK 32.0 (which includes
> NSS 3.16.4).

This might be caused by Mozilla's optimization attempts.

On certain platforms, Mozilla merges all NSS code into a single shared
library, and limit the exported functions to those that Mozilla
requires.

As an unfortunate result, the NSS library shipped by Mozilla is a
crippled version, that exports a subset of NSS functions, only, although
it uses the same name nss3.dll.

Looking at file config/external/nss/nss.def in the Firefox sources, I
don't see the first function you've mentioned
(PK11_ListFixedKeysInSlot).

You could try to patch the mozilla code, probably this source file, to
include all the functions that you require.

Kai


--
dev-tech-crypto mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-crypto
Reply | Threaded
Open this post in threaded view
|

Re: Missing functions in latest NSS library

John
Thanks - I was looking at the wrong nss.def file.

Will try patching the source.

Thanks again,
John
Reply | Threaded
Open this post in threaded view
|

Re: Missing functions in latest NSS library

John
My original link errors were resolved with a full version of the NSS library, built from NSS 3.19.1 sources without any modification (with BUILD_OPT set to 1) .

However I'm now getting the following error for another project.

unresolved external symbol _CERT_DecodeCertFromPackage

It looks like this function has been commented out in nss.def
;+#CERT_DecodeCertFromPackage;

Was there a reason for this? Can I simply uncomment, rebuild, and use this function in my codes?

Thanks,
John
Reply | Threaded
Open this post in threaded view
|

Re: Missing functions in latest NSS library

John
Actually, simply uncommenting the line in nss.def doesn't work - NSS build fails with the following:

nss.def : error LNK2001: unresolved external symbol CERT_DecodeCertFromPackage

Do I need to make other changes elsewhere?

Thanks,
John
Reply | Threaded
Open this post in threaded view
|

Re: Missing functions in latest NSS library

John
Seems CERT_DecodeCertFromPackage is now included in smime3.dll instead of nss3.dll.