security/nss/tests/pkcs11/netscape/trivial/README.txt

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 This is a very trivial program that loads and excercises a PKCS#11
michael@0 2 module, trying basic operations. I used it as a basic check that
michael@0 3 my data-only modules for NSS worked, and I'm including it here as
michael@0 4 a first sample test program.
michael@0 5
michael@0 6
michael@0 7 This program uses GNU autoconf: run ./configure --help for info.
michael@0 8 In addition to the standard options, the configure script accepts
michael@0 9 the following:
michael@0 10
michael@0 11 --with-nspr[=path] specify location of NSPR
michael@0 12 --with-nss-dist[=path] specify path to NSS dist directory
michael@0 13 --with-nss-hdrs[=path] or, specify path to installed NSS headers
michael@0 14 --with-rsa-hdrs[=path] if not using NSS, specify path to RSA headers
michael@0 15 --disable-debug default is enabled
michael@0 16
michael@0 17 This program uses NSPR; you may specify the path to your NSPR
michael@0 18 installation by using the "--with-nspr" option. The specified
michael@0 19 directory should be the one containing "include" and "lib."
michael@0 20 If this option is not given, the default is the usual prefix
michael@0 21 directories; see ./configure --help for more info.
michael@0 22
michael@0 23 This program requires either the pkcs11*.h files from RSA, or
michael@0 24 the NSS equivalents. To specify their location, you must
michael@0 25 specify one of --with-nss-dist, --with-nss-hdrs, or --with-rsa-hdrs.
michael@0 26
michael@0 27 If you have an NSS build tree, specify --with-nss-dist and provide
michael@0 28 the path to the mozilla/dist/*.OBJ directory. (If you got this
michael@0 29 package by checking it out from mozilla, it should be about six
michael@0 30 directories up, once you've built NSS.)
michael@0 31
michael@0 32 Alternatively, if you have an NSS installation (including "private"
michael@0 33 files, e.g. "ck.h") you may point directly to the directory containing
michael@0 34 the headers with --with-nss-hdrs.
michael@0 35
michael@0 36 If you would rather use the RSA-provided header files, or your own
michael@0 37 versions of them, specify their location with --with-rsa-hdrs.
michael@0 38
michael@0 39 The flag --disable-debug doesn't really do much here other than
michael@0 40 exclude the CVS_ID info from the binary.
michael@0 41
michael@0 42
michael@0 43 To run the program, specify the name of the .so (or your platform's
michael@0 44 equivalent) containing the module to be tested, e.g.:
michael@0 45
michael@0 46 ./trivial ../../../../../../dist/*.OBJ/lib/libnssckbi.so
michael@0 47
michael@0 48
michael@0 49 If you're using NSS, and using our experimental "installer's
michael@0 50 arguments" fields in CK_C_INITIALIZE_ARGS, you can specify an
michael@0 51 "installer argument" with the -i flag:
michael@0 52
michael@0 53 ./trivial -i ~/.netscape/certs.db [...]/libnssckdb.so
michael@0 54
michael@0 55
michael@0 56 Share and enjoy.

mercurial