Well, I'll try to be very precise this time.

I am writing a little Java program that uses an NSS Internal PKCS#11
Module for signing. Am using Win XP, service pack 3 and, for now, no
Visual C++ is installed.

So am using the JSS 4.2 that uses NSPR 4.6.4 and NSS 3.11.4. I've
downloaded the JSS Shared library on
ftp://ftp.mozilla.org/pub/mozilla.org/security/jss/releases/JSS_4_2_RTM/WINNT5.0_OPT.OBJ/lib
for the optimized build of jss4.dll and the JSS classes contained in
the jar file in 
ftp://ftp.mozilla.org/pub/mozilla.org/security/jss/releases/JSS_4_2_RTM/jss4.jar.

When exploring the jss4.dll with "dependency walker", I've discovered
that it depends on other libraries that do not exist in my machine.
This libraries are :
- libnspr4.dll
- libplc4.dll
- libplds4.dll
- efsadu.dll
- ieshims.dll
- wer.dll

(you can check by yourself)

I was questioning myself : how a release version of the dll could
depend on other libraries that do not exist in my machine ?
Trying to absolutely run my program, I've downloaded these libraries
on the net.
Exploring now libnspr4.dll with "dependency walker", I've discovered
that it depends on the msvcrtd.dll. Once again, msvcrtd.dll does not
exist in my machine, I had to download it.

############
Problem N°1:
------------
With not going further, when you have to download another libraries to
use the jss4.dll, a release library supposed to work with the internal
dependencies of Win XP, I think there's a real problem.
############

Anyway, I've continued on my way and run my little java program.
When running, it fails with this message box :
----------------
Debug Assertion Failed!
Program: C:\WINDOWS\system32\java.exe
File: dbgheap.c
Line: 1044

Expression: _CrtIsValidHeapPointer(pUserData)

For information on how your program can cause an assertion failure,
see the Visual C++ documentation on asserts.

Abandon       Retry       Ignore
----------------

This is the begining of the log issued by the JVM :
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x10213ad7, pid=3356,
tid=1928
#
# JRE version: 6.0_14-b08
# Java VM: Java HotSpot(TM) Client VM (14.0-b16 mixed mode, sharing
windows-x86 )
# Problematic frame:
# C  [MSVCRTD.dll+0x13ad7]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Looking for MSVCRTD.dll on the net, i've found that it is a sort of
utils library that manages integers, strings,... and the [d] is added
to express that is a debug version.

############
Problem N°2 :
-------------
How a release version of the dll such jss4.dll uses a debug library
MSVCRTD.dll, and we know that MSVCRT.dll exists in C:\Windows\System32
and is probably the non-debug release of MSVCRTD.dll.
############

Then I've decided to build the shared library by myself. For doing
this, i've installed :
step 1 : Visual C++ 2008 Express Edition,
step 2 : Windows SDK,
step 3 : mozillaBuild,
step 4 : run the cmd.exe and set these variables :
           - set OS_TARGET=WINNT,
           - set PATH=%PATH%;C:\mozilla-build\moztools\bin,
           - set BUILD_OPT=1,
           - set CVSROOT=:pserver:anonym...@cvs-mirror.mozilla.org:/
cvsroot,
           - set HOME=c:/home,
step 5 :
cvs login
cvs co -r NSPR_4_6_4_RTM mozilla/nsprpub
cvs co -r NSS_3_11_4_RTM mozilla/dbm mozilla/security/dbm
cvs co -r NSS_3_11_4_RTM mozilla/security/coreconf mozilla/security/
nss

step 6 :
cd mozilla\security\nss
gmake nss_build_all

To be precise "gmake" didn't work properly, there was some options in
the Makefile that it doesn't recogonize. Launching the "make" command
gave me some results but incomplet build, the system was blocked some
times when the "make" command was running....

I hope this will bring you the sufficient informations to help me to
bypass this problem.

Once again, thank you.
-- 
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to