Commit Graph

231 Commits

Author SHA1 Message Date
nelsonb%netscape.com
b904b47318 Detect empty emailAddr strings in CERTCertificates. Bugzilla bug 211540.
Modified Files:
    cmd/dbck/dbck.c cmd/signtool/util.c lib/certdb/certdb.c
    lib/certdb/stanpcertdb.c lib/pkcs7/p7decode.c lib/pki/certificate.c
    lib/pki/pki3hack.c lib/smime/cmssiginfo.c lib/softoken/pkcs11u.c
2003-11-15 00:10:01 +00:00
wchang0222%aol.com
a5782dcab7 Fixed a comment error. r=relyea. 2003-11-13 16:21:46 +00:00
wchang0222%aol.com
4868d7e8c2 Bugzilla bug 225373: the return value of CERT_NameToAscii must be freed
with PORT_Free.
Modified Files:
	cmd/lib/secutil.c cmd/selfserv/selfserv.c
	cmd/signver/pk7print.c cmd/strsclnt/strsclnt.c
	cmd/tstclnt/tstclnt.c lib/certdb/cert.h
2003-11-13 16:10:45 +00:00
nelsonb%netscape.com
019719d8a8 Eliminate a cert leak. Patch is Bob Relyea's.
Parial fix for Bugscape bug 53573.
2003-11-11 21:45:48 +00:00
nelsonb%netscape.com
87e5cbd19a Fix some bugs in the code that formats OIDs for printing.
Bugscape bug 53334.
2003-11-06 02:02:32 +00:00
nelsonb%netscape.com
374349f143 Rename get_oid_string to CERT_GetOidString and export it. Also, export
CERT_DestroyOidSequence.  bug 222568.  r=jpierre (for this portion).
2003-11-04 01:48:39 +00:00
wchang0222%aol.com
d5bd3135a1 Bugzilla bug 223624: use PR_MAX to avoid redefining MAX, a macro commonly
defined in system headers. r=nelsonb.
2003-10-25 14:08:31 +00:00
jpierre%netscape.com
4d26e30240 Initialize crlHandle . r=wtc 2003-10-25 00:41:14 +00:00
nelsonb%netscape.com
5251bce355 Eliminate redundant function declarations. Bug 208854. r=wchang0222 2003-10-14 17:44:33 +00:00
jpierre%netscape.com
60c78ee111 Fix for bug 141882 - convert email query keys to lowercase when searching . r=wtc 2003-09-30 02:33:40 +00:00
jpierre%netscape.com
7d744437c3 Fix for bug 143334 : add support for GeneralizedTime in certificates and CRLs. r=wtc,nelsonb 2003-09-19 04:08:51 +00:00
jpierre%netscape.com
4ee83fcf13 Fix for 216701 - verify CRLs with cert verification date rather than CRL lastupdate date 2003-08-30 01:07:21 +00:00
jpierre%netscape.com
9260c97765 Fix for 214201. remove unused variable 2003-08-27 01:47:57 +00:00
nelsonb%netscape.com
e7297b0a76 Fix bug 213084. Detect when cert in signature cannot be imported.
Detect NULL pointer, don't crash.
2003-07-31 00:16:27 +00:00
bishakhabanerjee%netscape.com
0a15715c3b Bug 213902 : removing unused variable "next" in "cert_DecodeNameConstraintSubTree" 2003-07-28 21:53:16 +00:00
nelsonb%netscape.com
0545cae9b8 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
2003-07-09 04:14:23 +00:00
wtc%netscape.com
04e80d83ca Bug 212004: in CERT_IsUserCert we should test for a null cert->trust and
treat it as no trust.  r=nelsonb.
2003-07-09 04:12:16 +00:00
nelsonb%netscape.com
6228d8c075 Export SEC_DupCRL and declare it in certdb.h. Bug 208194.
Modified Files:	nss/nss.def certdb/certdb.h
2003-07-09 04:00:48 +00:00
wtc%netscape.com
485a88c60e 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.
2003-07-08 18:41:28 +00:00
nelsonb%netscape.com
c636fad8e7 Fix bug 211049. Another issue with empty pointer lists from group
decodings.  Patch by Wan-Teh Chang <wtc@netscape.com>.
2003-07-01 01:16:57 +00:00
nelsonb%netscape.com
c27a303c8d 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.
2003-06-27 00:33:05 +00:00
nelsonb%netscape.com
7c5e03d5f4 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.
2003-06-26 01:56:34 +00:00
nelsonb%netscape.com
7665e37260 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.
2003-06-26 01:25:10 +00:00
nelsonb%netscape.com
a09e87bce0 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.
2003-06-23 23:15:33 +00:00
nelsonb%netscape.com
2ab3bc3979 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.
2003-06-21 08:10:07 +00:00
nelsonb%netscape.com
66f40f98bd 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.
2003-06-21 07:07:47 +00:00
nelsonb%netscape.com
9b63114ba0 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.
2003-06-21 06:44:43 +00:00
nelsonb%netscape.com
1042ec6f88 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.
2003-06-21 05:23:07 +00:00
nelsonb%netscape.com
a4f1b04288 Fix numerous more potential NULL pointer deref crashes. Bug 208038 2003-06-19 01:08:53 +00:00
nelsonb%netscape.com
40399ce6d5 Further refinements to the Name Constraints checking logic, to make it
more compliant with RFC 3280.  Bug 208047.
2003-06-18 04:32:44 +00:00
nelsonb%netscape.com
9c76888937 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.
2003-06-18 00:38:12 +00:00
nelsonb%netscape.com
bbf159fcc1 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.
2003-06-17 23:44:14 +00:00
nelsonb%netscape.com
546ef9889f Rewrite of cert_CompareNameWithConstraints and the static functions it
calls, to make it conform with RFC 3280.  Bug 208047.
2003-06-06 09:12:21 +00:00
nelsonb%netscape.com
216592c31b Augment and centralize the list of known cert name attribute types.
Bug 207711.
2003-06-06 01:17:04 +00:00
nelsonb%netscape.com
f4f2e9f053 Eliminate more NULL pointer dereferences. Bug 207740. 2003-06-05 04:59:38 +00:00
wtc%netscape.com
a2aaa0dd1a Bug 204555: Eliminated other potential crashes in code related to
certificate names.  r=wtc.  (The patch is Nelson's.)
2003-06-02 18:10:43 +00:00
nelsonb%netscape.com
7b750ca1fb Correctly copy RDNs with empty AVA lists. Partial fix for bug 204555. 2003-05-28 21:18:09 +00:00
nelsonb%netscape.com
b22ba4ae70 Fix bugs experienced with oddly constructed general names.
Partially fixes bug 204555. r=wtc a=sspitzer
2003-05-24 06:27:35 +00:00
ian.mcgreer%sun.com
cc0baa49b7 bug 204788, DirectoryString should default to UTF8String
r=nelsonb
2003-05-15 21:24:10 +00:00
jpierre%netscape.com
f54ce239c6 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 2003-04-17 00:32:54 +00:00
relyea%netscape.com
126930373b Bug 142867: pk12util needs to be able to import intermediate CA's into hw
tokens.
2003-03-24 19:09:08 +00:00
relyea%netscape.com
a9f27f307f Bug 162976. Make CRL updates 'atomic' . Insert new CRL before deleting the
old one.b
2003-03-04 22:34:56 +00:00
ian.mcgreer%sun.com
fbd8eb30c2 bug 174200, don't attempt to decode cert when destroying it, handle failure
to decode cert serial number
r=nelsonb
2003-02-18 20:53:14 +00:00
nelsonb%netscape.com
340366e2ff Fix crash in CERT_CheckKeyUsage caused by dereferencing a returned pointer
without checkin it for NULL.
2003-01-31 02:49:13 +00:00
wtc%netscape.com
6eb33bd89e Bug 183612: added some comments. 2002-12-24 02:25:36 +00:00
wtc%netscape.com
b5e025dea3 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.
2002-12-19 00:26:34 +00:00
wtc%netscape.com
12860a5501 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
2002-12-17 01:39:46 +00:00
nelsonb%netscape.com
a4ffefd8be Support SHA256, SHA384, and SHA512 hashes in NSS. 2002-12-12 06:05:45 +00:00
relyea%netscape.com
5a83c35578 Make SubjectAltEncode a public function. Fixes build breakage in Linux 2002-12-10 17:41:16 +00:00
relyea%netscape.com
962c8ddfb3 Create profiles for all the email addresses in a certificate. 2002-12-10 17:14:17 +00:00