222 Commits

Author SHA1 Message Date
jpierre%netscape.com
45ea31cac4 Fix for bug 141882 - convert email query keys to lowercase when searching . r=wtc
git-svn-id: svn://10.0.0.236/trunk@147450 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-30 02:33:40 +00:00
jpierre%netscape.com
e147b65161 Fix for bug 143334 : add support for GeneralizedTime in certificates and CRLs. r=wtc,nelsonb
git-svn-id: svn://10.0.0.236/trunk@147045 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-19 04:08:51 +00:00
jpierre%netscape.com
08d0a83ad4 Fix for 216701 - verify CRLs with cert verification date rather than CRL lastupdate date
git-svn-id: svn://10.0.0.236/trunk@146456 18797224-902f-48f8-a5cc-f745e15eee43
2003-08-30 01:07:21 +00:00
jpierre%netscape.com
c135255d2e Fix for 214201. remove unused variable
git-svn-id: svn://10.0.0.236/trunk@146368 18797224-902f-48f8-a5cc-f745e15eee43
2003-08-27 01:47:57 +00:00
nelsonb%netscape.com
e4252fb60f Fix bug 213084. Detect when cert in signature cannot be imported.
Detect NULL pointer, don't crash.


git-svn-id: svn://10.0.0.236/trunk@145407 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-31 00:16:27 +00:00
bishakhabanerjee%netscape.com
25c02d6eaa Bug 213902 : removing unused variable "next" in "cert_DecodeNameConstraintSubTree"
git-svn-id: svn://10.0.0.236/trunk@145293 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-28 21:53:16 +00:00
nelsonb%netscape.com
1c7ab81449 Change cert_GetCertificateEmailAddresses to return NULL rather than
a pointer to an empty string when a cert has no email addresses.
Partial fix for bug 211540.  Modified certdb/alg1485.c


git-svn-id: svn://10.0.0.236/trunk@144625 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-09 04:14:23 +00:00
wtc%netscape.com
b92ea1b87f Bug 212004: in CERT_IsUserCert we should test for a null cert->trust and
treat it as no trust.  r=nelsonb.


git-svn-id: svn://10.0.0.236/trunk@144624 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-09 04:12:16 +00:00
nelsonb%netscape.com
a9b14bcc5e Export SEC_DupCRL and declare it in certdb.h. Bug 208194.
Modified Files:	nss/nss.def certdb/certdb.h


git-svn-id: svn://10.0.0.236/trunk@144623 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-09 04:00:48 +00:00
wtc%netscape.com
3482ce4312 Bug 211384: fixed the bug that importing a CRL that already exists in the
DB causes NSS_Shutdown to fail.  Two files were changed.  1. crl.c: we
should not obtain a slot reference because PK11_FindCrlByName already
obtained a slot reference.  2. pk11cert.c: cleaned up code and fixed a slot
reference leak if the SECITEM_AllocItem call fails.  r=nelsonb.


git-svn-id: svn://10.0.0.236/trunk@144570 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-08 18:41:28 +00:00
nelsonb%netscape.com
02bbbd5bfa Fix bug 211049. Another issue with empty pointer lists from group
decodings.  Patch by Wan-Teh Chang <wtc@netscape.com>.


git-svn-id: svn://10.0.0.236/trunk@144326 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-01 01:16:57 +00:00
nelsonb%netscape.com
f76d526f1a Fix several bugs reported in bug 210707.
Change loops over RDNs and AVAs to detect NULL pointers.
Change list of attribute type "keywords" to match RFCs and internet
drafts.
Quote attribute values strings that contain adjacent embedded blanks.
Don't quote hex string values.
Always use hex string values when type OID is unrecognized.


git-svn-id: svn://10.0.0.236/trunk@144202 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-27 00:33:05 +00:00
nelsonb%netscape.com
22e603216c Move the declaration for CERT_CompareNameSpace from cert.h to genname.h
because it is a private function.  Change the interface for this
function so that it returns a SECStatus, unambiguously indicating the
success or failure of the name constraints test.  The function no
longer takes a list of cert subject names, instead, it takes a list
of cert pointers, and optionally outputs one of those pointers when
an error occurs.  This eliminates a cert reference leak.


git-svn-id: svn://10.0.0.236/trunk@144179 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-26 01:56:34 +00:00
nelsonb%netscape.com
7e283ffb16 This patch extracts rfc822 names from a cert's distinguished name at the
time when the list of cert names is being built and builds a GeneralName
out of it, just as if the rfc822 name had come from a subject alt name
extension. This way, no special handling is needed of either directory
names or rfc822 names in the name constraints code.  The special "phase 1"
loop in cert_CompareNameWithConstraints disappears compmletely.  And all
the cases in the (former phase 2) loop can now simply assert that the
name's type matches the constraint's type exactly.

This patch also factors out the code that creates new CERTGeneralNames and
that copies a single CERTGeneralName into new separate functions.  This
eliminates a lot of duplicated code whose correctness required lengthy
inspection.  Now these primitive operations are centralized.


git-svn-id: svn://10.0.0.236/trunk@144173 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-26 01:25:10 +00:00
nelsonb%netscape.com
e0c793b702 Whitespace cleanup. This patch causes numerous lines that were wider
than 80 columns to be folded according to NSS coding conventions.
This patch does not fix any run-time error.


git-svn-id: svn://10.0.0.236/trunk@144074 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-23 23:15:33 +00:00
nelsonb%netscape.com
be68bd5876 CERT_EncodeGeneralName and CERT_DecodeGeneralName contain large switch
statements that repeat code for every case.  This patch factors out that
common code from the cases, making the switches much smaller and reducing
bloat.


git-svn-id: svn://10.0.0.236/trunk@144025 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-21 08:10:07 +00:00
nelsonb%netscape.com
5722104522 Cleanup CERT_GetGeneralNameByType so that it detects when it has
encountered a general name of a type that it doesn't recognize, and
so that it properly casts the return value to be of the right type.


git-svn-id: svn://10.0.0.236/trunk@144022 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-21 07:07:47 +00:00
nelsonb%netscape.com
0e0f5d436b The general name code uses arenas, which is good, but it never marks
and releases space in the arenas, so the arenas just grow and grow
until the test is completely over.  This patch adds comments showing
where mark and release calls could (and probably should) be added.
It also changes CERT_CopyGeneralName to have only two exit paths,
two return statements, in preparation for the eventual use of mark and
release.


git-svn-id: svn://10.0.0.236/trunk@144020 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-21 06:44:43 +00:00
nelsonb%netscape.com
29029da5f0 a) Add more missing null pointer tests that I discovered. Bug 208649.
b) change all PORT_*Alloc calls that allocate new structs or arrays of
same to use the PORT_*New* macros instead.
c) ifdef out some dead functions that are rife with failure to detect
allocation failures.


git-svn-id: svn://10.0.0.236/trunk@144019 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-21 05:23:07 +00:00
nelsonb%netscape.com
95412857d7 Fix numerous more potential NULL pointer deref crashes. Bug 208038
git-svn-id: svn://10.0.0.236/trunk@143908 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-19 01:08:53 +00:00
nelsonb%netscape.com
06e2246375 Further refinements to the Name Constraints checking logic, to make it
more compliant with RFC 3280.  Bug 208047.


git-svn-id: svn://10.0.0.236/trunk@143840 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-18 04:32:44 +00:00
nelsonb%netscape.com
691797151a Move declarations of NSS private functions for general names from cert.h
to genname.h, and eliminate declarations from cert.h that were also
in genname.h.  If we ever decide to make any of these functions public,
we can move their declarations back to cert.h.


git-svn-id: svn://10.0.0.236/trunk@143828 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-18 00:38:12 +00:00
nelsonb%netscape.com
5d15f38564 Make CERT_DecodeAVAValue take const inputs and detect NULL pointers.
Rewrite CERT_CompareAVA to compare the type OIDs first, and then if
the values are not of the same encoding, convert them before comparing.
Also, do comparisons of printableString encoding properly.  Bug 208649.


git-svn-id: svn://10.0.0.236/trunk@143826 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-17 23:44:14 +00:00
nelsonb%netscape.com
dcc6f42199 Rewrite of cert_CompareNameWithConstraints and the static functions it
calls, to make it conform with RFC 3280.  Bug 208047.


git-svn-id: svn://10.0.0.236/trunk@143388 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-06 09:12:21 +00:00
nelsonb%netscape.com
1b18439180 Augment and centralize the list of known cert name attribute types.
Bug 207711.


git-svn-id: svn://10.0.0.236/trunk@143377 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-06 01:17:04 +00:00
nelsonb%netscape.com
2079cb2cf5 Eliminate more NULL pointer dereferences. Bug 207740.
git-svn-id: svn://10.0.0.236/trunk@143323 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-05 04:59:38 +00:00
wtc%netscape.com
fb6e7ff56e Bug 204555: Eliminated other potential crashes in code related to
certificate names.  r=wtc.  (The patch is Nelson's.)


git-svn-id: svn://10.0.0.236/trunk@143187 18797224-902f-48f8-a5cc-f745e15eee43
2003-06-02 18:10:43 +00:00
nelsonb%netscape.com
6aa86eb2bc Correctly copy RDNs with empty AVA lists. Partial fix for bug 204555.
git-svn-id: svn://10.0.0.236/trunk@142990 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-28 21:18:09 +00:00
nelsonb%netscape.com
a7e2ad0eb1 Fix bugs experienced with oddly constructed general names.
Partially fixes bug 204555. r=wtc a=sspitzer


git-svn-id: svn://10.0.0.236/trunk@142888 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-24 06:27:35 +00:00
ian.mcgreer%sun.com
91eac68da6 bug 204788, DirectoryString should default to UTF8String
r=nelsonb


git-svn-id: svn://10.0.0.236/trunk@142511 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-15 21:24:10 +00:00
jpierre%netscape.com
151353c3d6 Fix for 201134 - race condition when verifying certs. Don't reset the value of nsCertType in CERTCertificate in the middle of the computation. r=nelsonb
git-svn-id: svn://10.0.0.236/trunk@141280 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-17 00:35:21 +00:00
relyea%netscape.com
65773f5b59 Bug 142867: pk12util needs to be able to import intermediate CA's into hw
tokens.


git-svn-id: svn://10.0.0.236/trunk@140152 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-24 19:09:08 +00:00
relyea%netscape.com
a3130b9d86 Bug 162976. Make CRL updates 'atomic' . Insert new CRL before deleting the
old one.b


git-svn-id: svn://10.0.0.236/trunk@138882 18797224-902f-48f8-a5cc-f745e15eee43
2003-03-04 22:34:56 +00:00
ian.mcgreer%sun.com
e26258fd38 bug 174200, don't attempt to decode cert when destroying it, handle failure
to decode cert serial number
r=nelsonb


git-svn-id: svn://10.0.0.236/trunk@137945 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-18 20:53:14 +00:00
nelsonb%netscape.com
216c70fc28 Fix crash in CERT_CheckKeyUsage caused by dereferencing a returned pointer
without checkin it for NULL.


git-svn-id: svn://10.0.0.236/trunk@137180 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-31 02:49:13 +00:00
wtc%netscape.com
37a5a7c29e Bug 183612: added some comments.
git-svn-id: svn://10.0.0.236/trunk@135609 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-24 02:25:36 +00:00
wtc%netscape.com
9bb9b998ad 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@135480 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-19 00:26:34 +00:00
wtc%netscape.com
688bbc9eba Bug 183612: added support for looking up a cert by subject key ID and
creating a CMS recipient info from a subject key ID.  The patch was
contributed by Javi Delgadillo <javi@netscape.com>. r=relyea, wtc.
Modified Files:
	certdb/cert.h certdb/certdb.c certdb/certdb.h certdb/certv3.c
	certdb/stanpcertdb.c nss/nss.def nss/nssinit.c
	pk11wrap/pk11cert.c pk11wrap/pk11func.h pk11wrap/secmod.h
	pki/pki3hack.c smime/cms.h smime/cmslocal.h smime/cmspubkey.c
	smime/cmsrecinfo.c smime/cmssiginfo.c smime/cmst.h
	smime/smime.def


git-svn-id: svn://10.0.0.236/trunk@135377 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-17 01:39:46 +00:00
nelsonb%netscape.com
d36cf9c052 Support SHA256, SHA384, and SHA512 hashes in NSS.
git-svn-id: svn://10.0.0.236/trunk@135163 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-12 06:05:45 +00:00
relyea%netscape.com
e6e68328f4 Make SubjectAltEncode a public function. Fixes build breakage in Linux
git-svn-id: svn://10.0.0.236/trunk@135039 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-10 17:41:16 +00:00
relyea%netscape.com
1d0c8ab8f4 Create profiles for all the email addresses in a certificate.
git-svn-id: svn://10.0.0.236/trunk@135034 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-10 17:14:17 +00:00
wtc%netscape.com
ff1e8de9dc Bug 39494: added a check to prevent buffer overflow. r=mcgreer,nelsonb.
git-svn-id: svn://10.0.0.236/trunk@134817 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-04 23:41:49 +00:00
ian.mcgreer%sun.com
4a6e624c98 bug 172247, don't allow import of duplicate issuer/serial certs
git-svn-id: svn://10.0.0.236/trunk@134280 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-21 20:43:15 +00:00
jpierre%netscape.com
1ed6e55689 Fix for bug 180894 - don't assert in ShutdownCRLCache()
git-svn-id: svn://10.0.0.236/trunk@134124 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-19 21:37:50 +00:00
jpierre%netscape.com
fcdf6d31a0 Patch for 180228 - export CRL cache flush API . r=wtc
git-svn-id: svn://10.0.0.236/trunk@133887 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-15 05:04:05 +00:00
ian.mcgreer%sun.com
b9da288235 bug 39494, handle non-standard AVAs properly
r=nelsonb


git-svn-id: svn://10.0.0.236/trunk@133828 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-14 17:04:43 +00:00
jpierre%netscape.com
941f0104bd Fix for 177798 . Improve handling of initialization / shutdown of the CRL cache using a static status variable
git-svn-id: svn://10.0.0.236/trunk@133228 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-07 00:02:31 +00:00
ian.mcgreer%sun.com
ac48db6445 bug 177366, clean up refcounting
r=relyea


git-svn-id: svn://10.0.0.236/trunk@133173 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-06 18:53:55 +00:00
jpierre%netscape.com
43710b3f3b Fix for bug 177798 - NULL pointers in ShutdownCRLCache to allow shutdown/restart
of NSS.


git-svn-id: svn://10.0.0.236/trunk@132852 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-02 00:07:48 +00:00
jpierre%netscape.com
f40d5c295c Fix for bug 175115 . Remove incorrect check for CA cert expiration. Also fix CRL signature verification and clean up internal functions . r=mcgreer,relyea,nelsonb,wtc
git-svn-id: svn://10.0.0.236/trunk@132742 18797224-902f-48f8-a5cc-f745e15eee43
2002-10-30 23:31:38 +00:00