Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Seeking help with Mozilla/NSS compilation
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Wan-Teh Chang  
View profile  
 More options Oct 17 2007, 1:19 pm
Newsgroups: mozilla.dev.tech.crypto
From: "Wan-Teh Chang" <w...@google.com>
Date: Wed, 17 Oct 2007 10:19:52 -0700
Local: Wed, Oct 17 2007 1:19 pm
Subject: Re: Seeking help with Mozilla/NSS compilation
On 10/17/07, D3||||!$ <e.kaba...@gmail.com> wrote:

> Hi!!!

> I am new to SSL programming: currently trying to "play" with it... :-)

> I'm having some problems with compiling the sample client-server
> source code given on the Mozilla/NSS official site.

> I went through the code but found that it has been written using the
> NSPR source files. I had both, the NSS+NSPR source package as well as
> the binaries of the same. To make the things "idiot-proof", I put all
> the .C/.CPP/.hs in a single large include folder and then including
> it. I also included the libs, dlls & chks contained in the lib folder
> of the NSS binaries package. I finally ended up with some 40+ linker
> errors in the both, client_test.obj & server_test.obj & sslsamples.obj
> files. This makes me suspect that I've not/erroneously included some
> of the files necessary for compilation...

> Could you please tell me which files are required for the proper
> compilation of the project?

> Also, if you could tell me which files are required to be included for
> developing SSl applications(since before initializing NSS, NSPR has to
> be iniatilized..), I'll be extremely glad.

> Another thing which I wanted to enquire was that some of the files
> were .C while others were .CPP so what should I compile the source as:
> as C code or as CPP code?

You should compile the source as C code.

NSPR and NSS use GNU makefiles.  The build instructions
for NSS (including building NSPR) are at
http://www.mozilla.org/projects/security/pki/nss/nss-3.11.4/nss-3.11.....

The most difficult part is to install the prerequisite GNU make and
Unix utilities on your Windows machine.  Fortunately Ben Smedberg's
"MozillaBuild" package makes this real easy:
http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites#Mozi...

So install MozillaBuild and run the start-msvc8.bat batch file.
It'll start up a command shell running "bash".  In bash, the
command to set an environment variable "FOO" to 1 is

export FOO=1

There is an alternative: use our binary distributions:
https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.6.4/msvc6.0/...
https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_1...

They were built using VC++ 6.0, but should work with VC++ 2005.

Even if you don't use the binary distributions, they still provide
a piece of useful information -- they only include the headers
and libraries that you need to develop an SSL app with NSS/NSPR.
You can also get this info from the build tree.

NSPR headers you need are in mozilla/dist/WIN954.0_OPT.OBJ/include,
except all the headers in mozilla/dist/WIN954.0_OPT.OBJ/include/md and
the header mozilla/dist/WIN954.0_OPT.OBJ/include/private/primpl.h.

NSS headers you need are in mozilla/dist/public/nss

The libraries you need:
Import libraries: nspr4.lib, plc4.lib, plds4.lib, nss3.lib, smime3.lib, ssl3.lib
DLLs: nspr4.dll, plc4.dll, plds4.dll, nss3.dll, softokn3.dll,
softokn3.chk, freebl3.dll, freebl3.chk, smime3.dll, ssl3.dll

Note: the binary data files softokn3.chk and freebl3.chk are
needed for using NSS in the FIPS mode.

Wan-Teh


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.