7481 Commits

Author SHA1 Message Date
slavomir.katuscak%sun.com
a324bac4ad Bug 461544: Adding DSA support. r=alexei
git-svn-id: svn://10.0.0.236/trunk@255486 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-11 12:26:46 +00:00
nelson%bolyard.com
11f55a56aa Bug 414635 - Implement HASH_GetType. r=nelson,rrelyea
Patch contributed by Honza Bambas (:mayhemer) <honzab@allpeers.com>


git-svn-id: svn://10.0.0.236/trunk@255478 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:42 +00:00
wtc%google.com
47d7f96061 Bug 436430: NSS public headers should not use NSPR 1.0 compatibility types
and macros.  Replaced PRArenaPool by PLArenaPool and int64 by PRTime.  The
patch is generated by Nelson Bolyard <nelson@bolyard.com>.  r=wtc
Modified Files:
	certdb/cert.h certdb/certdb.h certdb/certt.h certhigh/ocsp.h
	cryptohi/cryptohi.h cryptohi/keyhi.h cryptohi/keythi.h
	freebl/blapit.h pk11wrap/pk11priv.h pk11wrap/pk11pub.h
	pk11wrap/secmodt.h pkcs12/p12.h pkcs12/p12t.h pkcs12/pkcs12t.h
	pkcs7/pkcs7t.h pkcs7/secpkcs7.h smime/cms.h util/nssb64.h
	util/secasn1.h util/secder.h util/secdig.h util/secitem.h
	util/secoid.h


git-svn-id: svn://10.0.0.236/trunk@255477 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:41 +00:00
wtchang%redhat.com
6da134d7b6 Bugzilla Bug 313196: HMAC code should not use a fixed hash input block size
of 64 bytes, which is wrong for SHA-384 and SHA-512.  This requires adding
the hash input block size to the SECHashObject structure. r=relyea,nelsonb
Modified Files:
	cryptohi/hasht.h cryptohi/sechash.c freebl/alghmac.c
	freebl/blapit.h freebl/rawhash.c


git-svn-id: svn://10.0.0.236/trunk@255476 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:40 +00:00
rrelyea%redhat.com
5574e013e4 [Bug 401928] Support generalized PKCS#5 v2 PBEs
Still part of the pk11wrap patch
r=nelson


git-svn-id: svn://10.0.0.236/trunk@255475 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:39 +00:00
rrelyea%redhat.com
d55e9b04d6 Bug 391296 – Need an update helper for Shared Databases
r=nelson.


git-svn-id: svn://10.0.0.236/trunk@255474 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:38 +00:00
wtc%google.com
49afdfd211 Bug 402777: moved all fake PKCS #11 defines from secmodt.h to pkcs11n.h.
r=rrelyea.  In loader.c, functions returning void must not return a value.
Modified Files:
	lib/freebl/loader.c lib/pk11wrap/secmodt.h
	lib/softoken/pkcs11n.h


git-svn-id: svn://10.0.0.236/trunk@255473 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:37 +00:00
julien.pierre.bugs%sun.com
d71daa298c Fix for bug 90426 . Stop using obsolete int32 and uint32 typedefs . r=nelson
git-svn-id: svn://10.0.0.236/trunk@255472 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:36 +00:00
gerv%gerv.net
0ba7689a6e Bug 236613: change to MPL/LGPL/GPL tri-license. Restore Id: lines.
git-svn-id: svn://10.0.0.236/trunk@255471 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:35 +00:00
wtc%google.com
6a4a31320e Bug 402777: Two changes to make lib/util more stand-alone. Moved
CKM_INVALID_MECHANISM from secmodt.h to pkcs11n.h.  Moved the three
CERTValidity functions from lib/util/sectime.c to lib/certdb/certdb.c.
r=rrelyea.
Modified Files:
	lib/certdb/certdb.c lib/nss/utilwrap.c lib/pk11wrap/secmodt.h
	lib/softoken/pkcs11n.h lib/util/nssutil.def lib/util/secoid.c
	lib/util/sectime.c lib/util/utilrename.h


git-svn-id: svn://10.0.0.236/trunk@255470 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:34 +00:00
rrelyea%redhat.com
ce0555eb14 Need to provide a way to modify and create new PKCS #11 objects.
bug 401026
r=julien

Implements 2 new functions, one to modify existing pkcs #11 objects, and
another to creat them.


git-svn-id: svn://10.0.0.236/trunk@255469 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:33 +00:00
julien.pierre.bugs%sun.com
e1c2071eb3 Fix for bug 220115 . Make the CKM constants unsigned . r=nelson
git-svn-id: svn://10.0.0.236/trunk@255468 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:32 +00:00
rrelyea%redhat.com
f35cc7615f Add Camilla cipher suites TLS RFC4132 bug 361025
code supplied by okazaki@kick.gr.jp


git-svn-id: svn://10.0.0.236/trunk@255467 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:31 +00:00
relyea%netscape.com
2eba608c1d Bug 272484 Certificate manager crashes [@ _PR_MD_ATOMIC_DECREMENT - PK11_FreeSymKey]
The problem only happens if we try to import a key into a token which then fails
to import. The basic issue was a hack in the pkcs 7 code to support PKCS 12, A
special structure was used to replace the SymKey structure, and the code 'knew'
the special structure existed before it dealt with the symkey. The fix addes a
new capability to symkeys, where applications can attach application specific
data to the key structure. PKCS 12 uses this to attache the PBE information
for CMS. (part 1 of 3)

This patch also improves the key's reuse of sessions, so sessions are not thrashed
when SSL is used with them.

r=wtc


git-svn-id: svn://10.0.0.236/trunk@255466 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:30 +00:00
relyea%netscape.com
221995519a Bug 119500 PKCS#11 CKF_PROTECTED_AUTHENTICATION_PATH token flag not supported
wtc's review r=wtc


git-svn-id: svn://10.0.0.236/trunk@255465 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:29 +00:00
relyea%netscape.com
8dfbc7fc32 Bugzilla Bug 119500 PKCS#11 CKF_PROTECTED_AUTHENTICATION_PATH token flag not supported
r=nelson

This is only the NSS portion of this patch. The PSM portion will be checked in once the
NSS portion is mainlined to mozilla.


git-svn-id: svn://10.0.0.236/trunk@255464 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:28 +00:00
relyea%netscape.com
262e9f2eeb Only call C_WaitForSlotEvent if the module is PKCS #11 v2.01 or later.
bug 196811 r=wtc sr=julien


git-svn-id: svn://10.0.0.236/trunk@255463 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:27 +00:00
wtchang%redhat.com
155a2ec064 Bugzilla Bug 299197: define two bitflags for every PKCS #11 object
attribute with no exceptions. renamed PK11_ATTR_READONLY as
PK11_ATTR_UNMODIFIABLE.  In pk11_OpFlagsToAttributes, backed out a change
I made before.  Made pk11_AttrFlagsToAttributes table-driven. In
pk11_loadPrivKeyWithFlags, fixed the bug (always loading the public key as
a token object).  Other code cleanups. r=relyea,nelsonb.
Modified files: pk11akey.c pk11obj.c pk11pub.h pk11skey.c secmodt.h


git-svn-id: svn://10.0.0.236/trunk@255462 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:26 +00:00
wtchang%redhat.com
0e0c8071f3 Bugzilla Bug 299197: added PK11AttrFlags and PK11_GenerateKeyPairWithFlags.
Modified PK11_TokenKeyGenWithFlags to take a PK11AttrFlags parameter.
PK11AttrFlags controls the values of commonly used PKCS #11 object
attributes that have Boolean values. r=relyea,nelsonb.
Modified Files:
	nss/nss.def pk11wrap/pk11akey.c pk11wrap/pk11obj.c
	pk11wrap/pk11pub.h pk11wrap/pk11skey.c pk11wrap/secmodi.h
	pk11wrap/secmodt.h


git-svn-id: svn://10.0.0.236/trunk@255461 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:25 +00:00
wtchang%redhat.com
c8dbcddb2a Bugzilla Bug 286439: Removed PKCS11_USE_THREADS and PK11_USE_THREADS.
r=relyea,nelsonb.
Modified Files:
	pk11wrap/pk11list.c pk11wrap/pk11pars.c pk11wrap/pk11skey.c
	pk11wrap/pk11slot.c pk11wrap/pk11util.c pk11wrap/secmod.h
	pk11wrap/secmodi.h pk11wrap/secmodt.h pk11wrap/secmodti.h
	softoken/pkcs11.c softoken/pkcs11i.h softoken/pkcs11u.c


git-svn-id: svn://10.0.0.236/trunk@255460 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:24 +00:00
relyea%netscape.com
fe17f2bec3 Bugzilla Bug 252702
NSS needs to handle better token insertion and removal.

Applied from patch to NSS 3.9


git-svn-id: svn://10.0.0.236/trunk@255459 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:23 +00:00
relyea%netscape.com
49b8bc51cc refactor pk11util, splitting large single files down to a managable size.
bug 246130. The new factor is:

pk11akey.c - asymetric keys constructed from pk11cert.c and pk11skey.c
pk11auth.c - authentication/password management factored from pk11slot.c
pk11cert.c - cert code with private key, crls and trust factored out.
pk11ctx.c -- pkcs11 context code, factored out of pk11skey.c
new pk11func.h -- for backward compatibility.
pk11mech.c - mechanism mapping code, factored mostly from pk11slot.c
pk11nobj.c - netscape objects (crls and trust), factored mostly from pk11cert.c
pk11obj.c - generic object support, factored from pk11skey.c pk11slot.c and
pk11cert.c
pk11priv.h -- private functions factored from pk11func.h
pk11pub.h -- public functions factored from pk11func.h
pk11skey.c - now only symetric key ops; private, public key ops, generic ops
and crypto contexs have been factored out.
pk11slot.c - still slot operations. Authentication, generic object ops,
mechanism mapping has been factored out.

This patch should only have refactoring, no new functions or other changes.


git-svn-id: svn://10.0.0.236/trunk@255458 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:22 +00:00
relyea%netscape.com
4d184ed9a6 Bug 244914, 244907 r=nelsonb
Add support for unprotected private keys without requiring authentication.
Add support to access application specific PKCS #11 objects through NSS.


git-svn-id: svn://10.0.0.236/trunk@255457 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:21 +00:00
gerv%gerv.net
d310f82bd8 Bug 236613: change to MPL/LGPL/GPL tri-license.
git-svn-id: svn://10.0.0.236/trunk@255456 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:20 +00:00
wtc%netscape.com
7ef0ce9940 Bug 183612: renamed some new functions to be consistent with existing
function names containing SubjectKey and PublicKey.  Moved internal
functions to private headers and use the lowercase cert_ prefix for the
internal functions for subject key ID mapping hash table. r=nelsonb.


git-svn-id: svn://10.0.0.236/trunk@255455 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:19 +00:00
relyea%netscape.com
7c14261324 221067 NSS needs to be able to create token symkeys from unwrap and derive.
git-svn-id: svn://10.0.0.236/trunk@255454 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:18 +00:00
jpierre%netscape.com
3d941008c3 Fix for bug 215186 - add missing options to PK11_ListCerts . r=wtc
git-svn-id: svn://10.0.0.236/trunk@255453 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:17 +00:00
wtc%netscape.com
994f3cd51a Bugzilla bug 213158: fixed the misspelling of "attach". The patch is
contributed by Pierre Chanial <chanial@noos.fr>.
Modified Files: pk11slot.c secmodt.h


git-svn-id: svn://10.0.0.236/trunk@255452 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:16 +00:00
nelsonb%netscape.com
0f9d0f0940 Add missing declaration of NSS_Get_SECKEY_EncryptedPrivateKeyInfoTemplate
git-svn-id: svn://10.0.0.236/trunk@255451 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:15 +00:00
nelsonb%netscape.com
8f767acef6 Support SHA256, SHA384, and SHA512 hashes in NSS.
git-svn-id: svn://10.0.0.236/trunk@255450 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:14 +00:00
relyea%netscape.com
628058357e Fix SDR race condition with a coarse lock. Does not address multiaccess DB
races. Bug 169296.


git-svn-id: svn://10.0.0.236/trunk@255449 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:13 +00:00
nelsonb%netscape.com
a907808bc2 Add new SHAxxx hash algorithms to tables of SECHashObjects.
git-svn-id: svn://10.0.0.236/trunk@255448 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:12 +00:00
relyea%netscape.com
de0618aab1 Add token removal blocking function.
git-svn-id: svn://10.0.0.236/trunk@255447 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:11 +00:00
jpierre%netscape.com
7d0d5bc3e0 Fix for 98068 - PR_CALLBACK OS/2 issues
git-svn-id: svn://10.0.0.236/trunk@255446 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:10 +00:00
nicolson%netscape.com
d795bba911 Fix 114979: SECKEY_EncryptedPrivateKeyInfoTemplate no longer in public
header file.
r=relyea.


git-svn-id: svn://10.0.0.236/trunk@255445 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:09 +00:00
relyea%netscape.com
801d87a448 NSS 3.4 integration changes.
1) 3.4 needs to bump the version numbers up by one on secmod.db from NSS 3.3
   2) Need to add escapes to the configdirectory. (should add them to other parameters as well.
   3) put exported files back into the correct headers.
   4) Add _BEGIN/_END protos where appropriate.


git-svn-id: svn://10.0.0.236/trunk@255444 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:08 +00:00
relyea%netscape.com
a02cf5b62e Land BOB_WORK_BRANCH unto the tip.
remove lots of depricated files.
move some files to appropriate directories (pcertdb *_rand
associated headers to soft token, for instance)
rename several stan files which had the same name as other nss files.
remove depricated functions.


git-svn-id: svn://10.0.0.236/trunk@255443 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:07 +00:00
relyea%netscape.com
8e93697045 1) fix warnings on AIX, HP, Linux, and Solaris.
2) Move private functions into private headers.

3) Sharpen the layer separation between NSS components, especially pkcs #12
and soft token.

4) Remove dead code.


git-svn-id: svn://10.0.0.236/trunk@255442 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:06 +00:00
relyea%netscape.com
fd5e572e26 Land new PKCS #11 initialization code.
git-svn-id: svn://10.0.0.236/trunk@255441 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:05 +00:00
nicolson%netscape.com
fbfa9dd136 Changes for NSS/JSS integration.
git-svn-id: svn://10.0.0.236/trunk@255440 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:04 +00:00
nelsonb%netscape.com
2e67c809eb Merge NSS 3.2.1 changes.
git-svn-id: svn://10.0.0.236/trunk@255439 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:03 +00:00
relyea%netscape.com
e2571a855c Add wrapper bindings for AES so S/MIME and SSL may implement their AES suites.
git-svn-id: svn://10.0.0.236/trunk@255438 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:02 +00:00
relyea%netscape.com
8ce83a6d3b Incorporate Wan-Teh's suggestion of using a typdef for the enum.
Follow the same standard we use elsewhere for enums.


git-svn-id: svn://10.0.0.236/trunk@255437 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:01 +00:00
relyea%netscape.com
b82a64c454 Bug 65903: Fixes to allow iWS admin stuff to work with shared library NSS
Add necessary exported symbols.
Fix bug in NSS_Initialize where we weren't passing the read only paramter
	through.
Add function to search for Certificate Lists so that Traverse does not need to
	be exposed.
Update pkcs11 names.


git-svn-id: svn://10.0.0.236/trunk@255436 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:48:00 +00:00
wtc%netscape.com
9b5abb540b Bugzilla bug #65416: assign values explicitly to enumeration constants.
The same values that the compiler would assign are assigned, with only
one exception (cmmfNoPKIStatus in cmmft.h).  This is patch id=22555,
reviewed by Nelson Bolyard.


git-svn-id: svn://10.0.0.236/trunk@255435 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:47:59 +00:00
nelsonb%netscape.com
e606731cf3 Changes to deal with exporting data from Windows DLLs.
SECHashObjects[] is no longer exported.
New function HASH_GetHashObject returns pointer to selected const object.
SSL statistics are now in a structure whose address is obtained via a
call to SSL_GetStatistics().
On NT, the new symbol NSS_USE_STATIC_LIBS must be declared in programs
that use the static SSL library.
Also, propagate "const" declaration for SECHashObjects.


git-svn-id: svn://10.0.0.236/trunk@255434 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:47:58 +00:00
relyea%netscape.com
ce070b7c81 Initial NSS Open Source checkin
git-svn-id: svn://10.0.0.236/trunk@255433 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:47:57 +00:00
relyea%netscape.com
61f9727759 Add SSL and TLS to the slotlist search functions
git-svn-id: svn://10.0.0.236/trunk@255432 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:47:28 +00:00
relyea%netscape.com
5756782aab Initial NSS Open Source Checkin
git-svn-id: svn://10.0.0.236/trunk@255431 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-10 22:47:27 +00:00
nelson%bolyard.com
2ab43f8f49 Bug 439115: DB merge allows nickname conflicts in merged DB
patch by rrelyea and nelson, r=alexei.volkov


git-svn-id: svn://10.0.0.236/trunk@255355 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-05 05:02:20 +00:00