Compare commits

..

1397 Commits

Author SHA1 Message Date
nrthomas%gmail.com
98b8fc71cc Bug 494813, disable gnome bug buddy to catch assertions on linux, r=ccooper
git-svn-id: svn://10.0.0.236/branches/test_mem@257286 18797224-902f-48f8-a5cc-f745e15eee43
2009-05-26 03:19:57 +00:00
nrthomas%gmail.com
f494347706 Bug 494324, update header comments for move from bm-xserve11 to 08
git-svn-id: svn://10.0.0.236/branches/test_mem@257260 18797224-902f-48f8-a5cc-f745e15eee43
2009-05-22 02:23:09 +00:00
nrthomas%gmail.com
881f23a40e Bug 455395, fix up mac debug builder for branding change, r=bustage
git-svn-id: svn://10.0.0.236/branches/test_mem@256990 18797224-902f-48f8-a5cc-f745e15eee43
2009-04-21 00:45:46 +00:00
nrthomas%gmail.com
1381cb486a Clobber fxdbug-win32-tbox to attempt to fix intermittant leak
git-svn-id: svn://10.0.0.236/branches/test_mem@253312 18797224-902f-48f8-a5cc-f745e15eee43
2008-07-28 00:18:04 +00:00
bhearsum%mozilla.com
a3a78e0962 bug 441945: firefox 3.0 leak test machines -> Firefox3.0 tree.
git-svn-id: svn://10.0.0.236/branches/test_mem@252861 18797224-902f-48f8-a5cc-f745e15eee43
2008-07-04 13:21:11 +00:00
reed%reedloden.com
8b8f75fdeb Clobber dwitte.
git-svn-id: svn://10.0.0.236/branches/test_mem@244803 18797224-902f-48f8-a5cc-f745e15eee43
2008-02-03 01:39:28 +00:00
(no author)
32661ec11f This commit was manufactured by cvs2svn to create branch 'test_mem'.
git-svn-id: svn://10.0.0.236/branches/test_mem@243548 18797224-902f-48f8-a5cc-f745e15eee43
2008-01-19 18:10:57 +00:00
nrthomas%gmail.com
3ee5d6b936 Disable Breakpad/Crashreporter across all three leak test boxes - was enabled for linux, and set by env-var for mac
git-svn-id: svn://10.0.0.236/branches/test_mem@243119 18797224-902f-48f8-a5cc-f745e15eee43
2008-01-15 16:25:00 +00:00
nrthomas%gmail.com
b65eec9df6 Convert Firefox trunk tinderboxes doing debug builds to ffxbld key
git-svn-id: svn://10.0.0.236/branches/test_mem@242634 18797224-902f-48f8-a5cc-f745e15eee43
2008-01-08 14:20:46 +00:00
ccooper%deadsquid.com
0559555390 b=374823
- use CleanProfile again after landing codebase set_pref changes for Mac


git-svn-id: svn://10.0.0.236/branches/test_mem@240656 18797224-902f-48f8-a5cc-f745e15eee43
2007-12-08 03:53:57 +00:00
dbaron%dbaron.org
66d3e62dfd Make assertions fatal. verbal a=coop
git-svn-id: svn://10.0.0.236/branches/test_mem@238024 18797224-902f-48f8-a5cc-f745e15eee43
2007-10-23 17:16:13 +00:00
ccooper%deadsquid.com
d6efa56918 - switch to the main tree
git-svn-id: svn://10.0.0.236/branches/test_mem@238022 18797224-902f-48f8-a5cc-f745e15eee43
2007-10-23 16:27:25 +00:00
ccooper%deadsquid.com
ce46f8a0bf b=374822
- initial configs for Windows debug+leak test builds


git-svn-id: svn://10.0.0.236/branches/test_mem@237866 18797224-902f-48f8-a5cc-f745e15eee43
2007-10-18 20:58:11 +00:00
(no author)
81fe2374c1 This commit was manufactured by cvs2svn to create branch 'test_mem'.
git-svn-id: svn://10.0.0.236/branches/test_mem@236703 18797224-902f-48f8-a5cc-f745e15eee43
2007-09-26 10:58:37 +00:00
jwalden%mit.edu
c3fc3aa726 Bug 374827 - Make assertions fatal on the Firefox debug Mac tinderbox! r=dbaron
git-svn-id: svn://10.0.0.236/branches/test_mem@236494 18797224-902f-48f8-a5cc-f745e15eee43
2007-09-22 14:13:55 +00:00
preed%mozilla.com
07a12e8252 Bug 396805: merge the relevant test_mem_newref branch changes to the test_mem branch.
git-svn-id: svn://10.0.0.236/branches/test_mem@236473 18797224-902f-48f8-a5cc-f745e15eee43
2007-09-21 20:14:31 +00:00
dbaron%dbaron.org
c631043490 Enable trace-malloc bloat test.
git-svn-id: svn://10.0.0.236/branches/test_mem@232357 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-20 00:26:21 +00:00
dbaron%dbaron.org
0901420a53 Change assertion configuration to something that actually works so we won't be confused when fixing bug 374827.
git-svn-id: svn://10.0.0.236/branches/test_mem@232355 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-20 00:24:22 +00:00
dbaron%dbaron.org
7e9a393a0f Use new stack-and-abort value added in bug 391722 so we get stacks with our fatal assertions.
git-svn-id: svn://10.0.0.236/branches/test_mem@231838 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-10 19:44:42 +00:00
ccooper%deadsquid.com
cd36de38e6 b=388691
- trigger another clobber


git-svn-id: svn://10.0.0.236/branches/test_mem@230311 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-19 18:55:53 +00:00
ccooper%deadsquid.com
5107d5b4e4 b=388691
- test clobbering a non-release build


git-svn-id: svn://10.0.0.236/branches/test_mem@230299 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-19 17:06:35 +00:00
gavin%gavinsharp.com
0378a4d258 Trying to clobber again
git-svn-id: svn://10.0.0.236/branches/test_mem@230245 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-18 22:02:56 +00:00
gavin%gavinsharp.com
85dbc09d16 Clobber to fix bustage
git-svn-id: svn://10.0.0.236/branches/test_mem@230237 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-18 21:40:54 +00:00
ccooper%deadsquid.com
32aaf5af61 b=374823
- move to Firefox tree


git-svn-id: svn://10.0.0.236/branches/test_mem@230204 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-18 17:49:05 +00:00
ccooper%deadsquid.com
5b94339183 b=374823
- changes for non-universal build
- reuse profile to allow automatic exiting


git-svn-id: svn://10.0.0.236/branches/test_mem@229625 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-10 19:16:56 +00:00
dbaron%dbaron.org
f9ebfc947f Make assertions fatal. b=374825
git-svn-id: svn://10.0.0.236/branches/test_mem@228781 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-26 23:50:04 +00:00
dbaron%dbaron.org
b9757831d2 Reverting again, since the tree is now closed.
git-svn-id: svn://10.0.0.236/branches/test_mem@228773 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-26 18:58:50 +00:00
dbaron%dbaron.org
d6fe465b4f Make assertions fatal. b=374825
git-svn-id: svn://10.0.0.236/branches/test_mem@228769 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-26 18:45:44 +00:00
dbaron%dbaron.org
41c14f2543 Reverting, since this looks like a bad time.
git-svn-id: svn://10.0.0.236/branches/test_mem@228764 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-26 17:46:44 +00:00
dbaron%dbaron.org
f87cbd2b10 Make assertions fatal. b=374825
git-svn-id: svn://10.0.0.236/branches/test_mem@228763 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-26 17:44:54 +00:00
ccooper%deadsquid.com
c23bcb4d45 -enabled libxul
- add descriptive extra name


git-svn-id: svn://10.0.0.236/branches/test_mem@228316 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-19 14:20:52 +00:00
ccooper%deadsquid.com
cba8a70328 b=374823
- initial check-in of Mac mem test configs


git-svn-id: svn://10.0.0.236/branches/test_mem@228313 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-19 13:13:35 +00:00
(no author)
cd13b45757 This commit was manufactured by cvs2svn to create branch 'test_mem'.
git-svn-id: svn://10.0.0.236/branches/test_mem@228113 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-15 09:09:34 +00:00
dbaron%dbaron.org
db74d7e1de Never mind.
git-svn-id: svn://10.0.0.236/branches/test_mem@228017 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-14 00:09:58 +00:00
dbaron%dbaron.org
6029eedfd7 Temporary debugging of bug 381199.
git-svn-id: svn://10.0.0.236/branches/test_mem@228015 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-14 00:07:41 +00:00
benjamin%smedbergs.us
cddf2fcc8b Disable libxul on the memory-testing tinderbox because I haven't figured out how trace-malloc+libxul should work
git-svn-id: svn://10.0.0.236/branches/test_mem@227858 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-12 14:18:35 +00:00
rhelmer%mozilla.com
6c7d3ffe13 bumping timout to 1600s for BloatTest a=mconnor
git-svn-id: svn://10.0.0.236/branches/test_mem@224602 18797224-902f-48f8-a5cc-f745e15eee43
2007-04-17 01:46:00 +00:00
dbaron%dbaron.org
84776b1ab4 Bump bloat test timeout from 480 to 600.
git-svn-id: svn://10.0.0.236/branches/test_mem@224126 18797224-902f-48f8-a5cc-f745e15eee43
2007-04-04 03:10:41 +00:00
rhelmer%mozilla.com
43c7e06318 try longer timeout for bloat test
git-svn-id: svn://10.0.0.236/branches/test_mem@222569 18797224-902f-48f8-a5cc-f745e15eee43
2007-03-28 23:55:18 +00:00
dbaron%dbaron.org
91738b6681 Turn trace-malloc bloat test back on so we can try to get it working.
git-svn-id: svn://10.0.0.236/branches/test_mem@220105 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-14 05:56:15 +00:00
preed%mozilla.com
5e96d72a2a Since we're not running Tinderbox from within X, pretty sure we need to define a DisplayServer variable.
git-svn-id: svn://10.0.0.236/branches/test_mem@219891 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-09 10:32:41 +00:00
bzbarsky%mit.edu
d764d9c941 Clobbering because preed says it'll fix the red.
git-svn-id: svn://10.0.0.236/branches/test_mem@219884 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-09 07:42:55 +00:00
bzbarsky%mit.edu
e64a7bbfb7 Turning Rlk back on
git-svn-id: svn://10.0.0.236/branches/test_mem@219880 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-09 07:29:51 +00:00
bzbarsky%mit.edu
33aa90b0a3 Disable the bloat tests for a cycle so this box can go green. r=rhelmer
git-svn-id: svn://10.0.0.236/branches/test_mem@219806 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-09 01:05:33 +00:00
rhelmer%mozilla.com
939cab1675 point to Firefox tree as per bz in irc
git-svn-id: svn://10.0.0.236/branches/test_mem@219694 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-08 07:14:01 +00:00
rhelmer%mozilla.com
0aa1349243 turn off fatal assertions
git-svn-id: svn://10.0.0.236/branches/test_mem@219693 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-08 07:00:18 +00:00
rhelmer%mozilla.com
b12f358df2 stay on Firefox tree for now
git-svn-id: svn://10.0.0.236/branches/test_mem@219692 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-08 06:53:07 +00:00
rhelmer%mozilla.com
f411a2e2c3 point to Firefox tree
git-svn-id: svn://10.0.0.236/branches/test_mem@219691 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-08 06:47:23 +00:00
rhelmer%mozilla.com
313aa37a03 config for new leak test/debug box, to replace balsa after removal of non-cairo
git-svn-id: svn://10.0.0.236/branches/test_mem@219690 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-08 06:43:11 +00:00
(no author)
cd3e8cbab4 This commit was manufactured by cvs2svn to create branch 'test_mem'.
git-svn-id: svn://10.0.0.236/branches/test_mem@219643 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-07 08:42:59 +00:00
dbaron%dbaron.org
1f58a0431b clobber to force new nightlies after landing of bug 177805
git-svn-id: svn://10.0.0.236/trunk@219641 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-07 08:42:57 +00:00
sharparrow1%yahoo.com
dd459d0a71 Bug 177805: Fix the use of units in Gecko. r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@219640 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-07 07:46:44 +00:00
dbaron%dbaron.org
d70c26f70c Bump trunk version numbers to 1.9a3pre / 3.0a3pre. b=369583 r=preed
git-svn-id: svn://10.0.0.236/trunk@219637 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-07 06:37:22 +00:00
mattwillis%gmail.com
bf9e38324a bug 369543 - Replaces Australia/Perth's timezone with one that includes DST. r2=dmose
git-svn-id: svn://10.0.0.236/trunk@219634 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-07 05:02:40 +00:00
preed%mozilla.com
6ac8e57882 Bug 369550: Correct MozBuild::Util::RunShellCommand() assert()ions. Also slipped in changes to the assert()ion comments, to annotate when HashFile() fails. r=rhelmer
git-svn-id: svn://10.0.0.236/trunk@219624 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-07 01:21:25 +00:00
inonit%inonit.com
8d5e23343d Fix bug 288027 (XMLList not instanceof XML)
git-svn-id: svn://10.0.0.236/trunk@219613 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 23:00:00 +00:00
glen.beasley%sun.com
df21cf05e4 193386 added MAC OS X support for mangle test r=neil, sr=slavo
git-svn-id: svn://10.0.0.236/trunk@219612 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 22:42:36 +00:00
mattwillis%gmail.com
7d48b50f63 bug 369270 - Add check for latest tzid to GetInTimezone. r1=ctalbert, r2=dmose
git-svn-id: svn://10.0.0.236/trunk@219611 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 22:03:59 +00:00
olav%bkor.dhs.org
7fe049197d Bug 366629: Bugmail messed up if adding dependency for resolved bug in new bug
Patch by Olav Vitters <olav@bkor.dhs.org> r=LpSolit a=LpSolit


git-svn-id: svn://10.0.0.236/trunk@219610 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 22:02:21 +00:00
rhelmer%mozilla.com
6a3da1e03d comment out Tag test, not ready yet
git-svn-id: svn://10.0.0.236/trunk@219607 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 21:09:05 +00:00
glen.beasley%sun.com
6cd5a259cb 333636 bind exception in socket tests r=neil
git-svn-id: svn://10.0.0.236/trunk@219603 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 20:50:00 +00:00
rhelmer%mozilla.com
613ddc2fb1 clobber per vlad, dom inspector broken
git-svn-id: svn://10.0.0.236/trunk@219591 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 19:08:57 +00:00
gavin%gavinsharp.com
c1f70a91d4 Fix typo from patch for bug 221934, a=vlad
git-svn-id: svn://10.0.0.236/trunk@219589 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 18:23:49 +00:00
inonit%inonit.com
1b5f5cbe76 Fix license boilerplate on recent commits
git-svn-id: svn://10.0.0.236/trunk@219587 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 17:48:46 +00:00
mattwillis%gmail.com
317507575c Turning off l10n builds now that bug 340845 is getting resolved
git-svn-id: svn://10.0.0.236/trunk@219581 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 15:00:49 +00:00
lpsolit%gmail.com
48f42b9e1e Bug 348282: importxml.pl throws Bugzilla::Bug::ValidateTime warnings if the time value is not defined and param timetrackinggroup defined - Patch by Guzmán Brasó <gbn@hqso.net> r/a=LpSolit
git-svn-id: svn://10.0.0.236/trunk@219580 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 14:58:42 +00:00
timeless%mozdev.org
dde92de42a Bug 361533 arm port is broken XPTC_PUBLIC_API / XPTC_InvokeByIndex weren't updated for arm
patch by romaxa@gmail.com r=timeless moa=timeless (this is ports only)


git-svn-id: svn://10.0.0.236/trunk@219572 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 08:25:37 +00:00
bzbarsky%mit.edu
7f404ae71e Adding tests for bug 144004.
git-svn-id: svn://10.0.0.236/trunk@219571 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 07:32:09 +00:00
bzbarsky%mit.edu
f6cd049d5f Check lengths. Bug 369413, r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@219568 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 06:40:06 +00:00
bzbarsky%mit.edu
9de03e10b2 Remove dead code. Followup for bug 243159, rs=roc
git-svn-id: svn://10.0.0.236/trunk@219567 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 06:23:18 +00:00
cltbld
bb7bff9877 Automated update from host egg.build.mozilla.org
git-svn-id: svn://10.0.0.236/trunk@219566 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 05:44:33 +00:00
stridey%gmail.com
d1628895fe Bug 282250: Add negotiateauth support for Camino. Patch by Smokey Ardisson <alqahira@ardisson.org> r/sr=mento
git-svn-id: svn://10.0.0.236/trunk@219564 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 05:35:02 +00:00
bzbarsky%mit.edu
9a255541b4 Adding test for bug 361091.
git-svn-id: svn://10.0.0.236/trunk@219563 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 05:14:25 +00:00
scott%scott-macgregor.org
777ad23fc2 remove ^M characters
git-svn-id: svn://10.0.0.236/trunk@219562 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 05:13:09 +00:00
gavin%gavinsharp.com
ebd8283c51 Bug 369427: perform window.open() URL security check before popup blocking, to ensure that we don't notify UI of a blocked popup that would have otherwise failed anyways, r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219561 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 05:11:13 +00:00
cls%seawood.org
2ba64f3fbb Bump the number of directories that can be passed to mkdepend via -I to 1024.
Bug #367860 r=bsmedberg


git-svn-id: svn://10.0.0.236/trunk@219559 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 05:09:08 +00:00
rhelmer%mozilla.com
0296002457 proper log call r=preed
git-svn-id: svn://10.0.0.236/trunk@219558 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 05:08:40 +00:00
rob_strong%exchangecode.com
2fbf8ab052 Bug 369314 – Trunk install takes over as default browser from a release build. Only take over specific protocol keys that firefox.exe is already the default. r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@219556 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 05:04:25 +00:00
scott%scott-macgregor.org
c68d0697bd Bug #369109 --> thunderbird release notes url should use the url formatter to get formatted instead of making it a string property. r=axel
git-svn-id: svn://10.0.0.236/trunk@219555 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 05:03:41 +00:00
dbaron%dbaron.org
4e5f01e33a Don't clear scope on Object.prototype. b=368958 r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@219553 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 04:48:20 +00:00
glen.beasley%sun.com
b39cfcbb42 367910 pk11mode -verbose mode r=Neil, sr=alexei
git-svn-id: svn://10.0.0.236/trunk@219552 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 04:43:41 +00:00
despotdaemon
2c6b172605 Pseudo-automatic update of changes made by biswatosh.chakraborty@sun.com.
git-svn-id: svn://10.0.0.236/trunk@219550 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 03:38:57 +00:00
mattwillis%gmail.com
1b6ad22958 New Sunbird about graphic with TM
git-svn-id: svn://10.0.0.236/trunk@219548 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 02:48:27 +00:00
dbaron%dbaron.org
78c1bb12a3 Backing out 361299 in an attempt to fix orange on argo-vm on Firefox tinderbox.
git-svn-id: svn://10.0.0.236/trunk@219547 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 01:59:19 +00:00
sayrer%gmail.com
1102f7dc57 Bug 368994. more mochitests in content/. r=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219541 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 00:20:25 +00:00
bzbarsky%mit.edu
c8d8cb0476 Only do first-line stuff when inserting directly into the block in question.
Bug 367489 followup, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@219540 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 00:18:08 +00:00
asqueella%gmail.com
4ea730a6bc more fixes for bustage from bug 361299
git-svn-id: svn://10.0.0.236/trunk@219539 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 00:09:47 +00:00
ghendricks%novell.com
2c95b178a2 Added access controls to test plans. Users must now either be a member of the Testers group, added to a plan via regular expressions, or added explicitly to modify plans and their objects.
git-svn-id: svn://10.0.0.236/trunk@219538 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 00:02:16 +00:00
inonit%inonit.com
139a1152d9 Fix bug in EXPECT EXIT
Emulate SpiderMonkey exit code for OutOfMemoryError


git-svn-id: svn://10.0.0.236/trunk@219537 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 23:41:15 +00:00
lpsolit%gmail.com
0ef3c298cc Bug 360838: ./runtests.pl 1 fails if Email::Reply is not installed - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
git-svn-id: svn://10.0.0.236/trunk@219536 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 23:15:36 +00:00
christophe.ravel.bugs%sun.com
3b324230b3 Set the JSS version to 4.2.5 Beta.
Tag: none.


git-svn-id: svn://10.0.0.236/trunk@219535 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 23:07:31 +00:00
joshmoz%gmail.com
659955bc5b fix bustage from bug 361299
git-svn-id: svn://10.0.0.236/trunk@219533 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 22:58:53 +00:00
asqueella%gmail.com
417111a4c5 Bug 221934 - Display page title in DOM Inspector Window
patch by Michael Gall <michael@wakeless.net>
r=db48x, sr=neil


git-svn-id: svn://10.0.0.236/trunk@219532 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 22:45:57 +00:00
asqueella%gmail.com
077e43ad40 Bug 368263 - remove hack around bug 23485 introduced in bug 249322 for multiline urls
patch by Dão Gottwald <dao@design-noir.de>
r=gavin


git-svn-id: svn://10.0.0.236/trunk@219531 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 22:39:29 +00:00
joshmoz%gmail.com
838d26124c fix icon decoder on mac os x, don't call GetAlphaBytesPerRow and its underlying GetAlphaLineStride which is
plain wrong in Cairo. patch by Alfred Kayser. r=pav sr=tor


git-svn-id: svn://10.0.0.236/trunk@219529 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 22:35:37 +00:00
asqueella%gmail.com
f7f5613b85 Bug 354330 - nsIPref should have @status DEPRECATED
patch by Magnus Melin <mkmelin+mozilla@iki.fi>
r=timeless, sr=biesi


git-svn-id: svn://10.0.0.236/trunk@219528 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 22:34:35 +00:00
asqueella%gmail.com
82cc2200b9 bug 362695 - Change nsIEditor to remove readonly on transactionManager
patch by Alex Vincent <ajvincent@gmail.com>
r=neil, sr=sfraser


git-svn-id: svn://10.0.0.236/trunk@219527 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 22:24:12 +00:00
olav%bkor.dhs.org
87717d7ecb Bug 366187: Fix regression; ensure dependent changed bugmail will be sent out
Patch by Olav Vitters <olav@bkor.dhs.org> r=LpSolit a=LpSolit


git-svn-id: svn://10.0.0.236/trunk@219525 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 21:34:20 +00:00
gijskruitbosch%gmail.com
35501d6ce6 Bug 353183 - Plugin management should provide feedback themselves
r=silver@warwickcompsoc.co.uk (James Ross)
ChatZilla Only.


git-svn-id: svn://10.0.0.236/trunk@219524 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 21:12:18 +00:00
gijskruitbosch%gmail.com
04dc88412f Bug 367903 - bugzilla url munger shouldn't truncate bug ids of more than 6 digits
r=silver@warwickcompsoc.co.uk (James Ross)
ChatZilla Only.


git-svn-id: svn://10.0.0.236/trunk@219523 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 20:42:42 +00:00
mozilla.mano%sent.com
4e4eab18f2 Copy the security checks for history items to placescontroller/utils, r=sspitzer (patch on bug 362292).
git-svn-id: svn://10.0.0.236/trunk@219522 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 20:38:52 +00:00
despotdaemon
11a3e8f918 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@219521 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 20:16:19 +00:00
despotdaemon
011d8a1238 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@219520 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 20:14:46 +00:00
tor%cs.brown.edu
5a65ba5365 Bug 359516 - replace hand-wired observer scheme for filters with
nsIMutationObserver.  r=roc, sr=sicking


git-svn-id: svn://10.0.0.236/trunk@219519 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 20:04:17 +00:00
ghendricks%novell.com
b439fd4ad9 patch by Guzmán Brasó
r=ghendricks, a=LpSolit


git-svn-id: svn://10.0.0.236/trunk@219518 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 19:55:45 +00:00
despotdaemon
f34e0c871d Pseudo-automatic update of changes made by LpSolit@gmail.com.
git-svn-id: svn://10.0.0.236/trunk@219516 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 19:40:27 +00:00
uriber%gmail.com
6d976f44e8 Avoid including the offset from a continuation frame to the original frame's parent twice when computing the 'all in flow bounding rect'. bug=368735, r+sr=roc.
git-svn-id: svn://10.0.0.236/trunk@219515 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 19:32:26 +00:00
inonit%inonit.com
a127c66df6 Don't rely on JAXP for ignoring comments (semantics are slightly different than E4X, or JRE parser has a bug, not sure which)
git-svn-id: svn://10.0.0.236/trunk@219513 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 19:08:07 +00:00
gavin%gavinsharp.com
a5eb6151d9 Bug 369151: Restored blank tabs can't be reopened once they're closed, patch by Simon Bünzli <zeniko@gmail.com>, r=dietrich
git-svn-id: svn://10.0.0.236/trunk@219512 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 19:06:06 +00:00
mconnor%steelgryphon.com
2ddf149ace bug 360493 - add filters to password manager to also match on actionURL, r=mano, sr+a=dveditz
git-svn-id: svn://10.0.0.236/trunk@219510 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 18:44:51 +00:00
mattwillis%gmail.com
9a5977a1e6 backing out bug 355465. >:(
git-svn-id: svn://10.0.0.236/trunk@219509 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 18:36:40 +00:00
mattwillis%gmail.com
a3bdab86e6 backing out bug 355465. >:(
git-svn-id: svn://10.0.0.236/trunk@219508 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 18:20:10 +00:00
mrbkap%gmail.com
d12b7d5e51 Use a more roundabout way to convert variables to strings and call FindProxyForURL. bug 355214, r=crowder/darin sr=dveditz
git-svn-id: svn://10.0.0.236/trunk@219507 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 18:19:48 +00:00
bzbarsky%mit.edu
eb4de59882 Simplify the posted events setup now that they're owned through dispatch by the
target thread. Bug 369247, r+sr=peterv


git-svn-id: svn://10.0.0.236/trunk@219506 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 18:09:26 +00:00
sspitzer%mozilla.org
1131b041d8 fix for bug #360029: remove places icon from personal toolbar.
patch=dmills

thanks to jminta and philringnalda for the help.

r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@219505 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 17:46:51 +00:00
inonit%inonit.com
797cb974fd Fix infinite-loop condition with >1 generated namespace prefix
git-svn-id: svn://10.0.0.236/trunk@219504 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 17:32:09 +00:00
tor%cs.brown.edu
14d632d01c Bug 367796 - <svg:switch> should be SVGTransformable. r=scootermorris, sr=roc
git-svn-id: svn://10.0.0.236/trunk@219502 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 16:26:23 +00:00
crowder%fiverocks.com
6ec6b0dc77 Bug 366398: Makefile.ref on Darwin builds dynamic library correctly, and a fix for debug builds
git-svn-id: svn://10.0.0.236/trunk@219501 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 16:24:49 +00:00
sspitzer%mozilla.org
e873282d25 fix for bug #368661: on running the installer, remove the updates directory, updates.xml and active-update.xml files. otherwise, we could have a pave over install that then applies a pending update. additonally, after a pave over install the update history needs to be reset.
r=mscott, rstrong


git-svn-id: svn://10.0.0.236/trunk@219499 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 15:52:43 +00:00
inonit%inonit.com
4eb1afc35f Implement E4X without Apache XMLBeans, fix bug #355677
git-svn-id: svn://10.0.0.236/trunk@219498 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 15:24:52 +00:00
inonit%inonit.com
38ad891054 Remove CVS keywords (at least for now) to make merging easier
git-svn-id: svn://10.0.0.236/trunk@219497 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 14:56:40 +00:00
despotdaemon
16fc07e8c6 Pseudo-automatic update of changes made by rcampbell@mozilla.com.
git-svn-id: svn://10.0.0.236/trunk@219496 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 14:50:31 +00:00
Olli.Pettay%helsinki.fi
a9edcad774 Mochitest for Bug 367781, r=peterv
git-svn-id: svn://10.0.0.236/trunk@219492 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 11:29:31 +00:00
Olli.Pettay%helsinki.fi
fe9d7152d0 Mochitest for Bug 367781, r=peterv
git-svn-id: svn://10.0.0.236/trunk@219491 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 11:28:16 +00:00
bclary%bclary.com
9f4d381660 JavaScript Tests - correct bugnumber in tests
git-svn-id: svn://10.0.0.236/trunk@219490 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 11:22:03 +00:00
bclary%bclary.com
bab8f316a9 JavaScript Tests - update test template.js files copyright to 2007, Bug 369347
git-svn-id: svn://10.0.0.236/trunk@219489 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 11:14:08 +00:00
smontagu%smontagu.org
bb62298042 Remove unused method BidiStyleChangeReflow(). Bug 369338, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@219488 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 10:48:27 +00:00
scott%scott-macgregor.org
82ef6035b1 Bug #353987 --> missing altenrate link in atom feed causes a js exception. Patch by Tuukka Tolvanen. sr=mscott
git-svn-id: svn://10.0.0.236/trunk@219487 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 06:38:30 +00:00
bzbarsky%mit.edu
ed0e1d8804 Converting some tests to reftest.
git-svn-id: svn://10.0.0.236/trunk@219486 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 05:32:25 +00:00
bzbarsky%mit.edu
d6f518ac33 Pass the right frame to the first-line stuff. Bug 367489, r+sr=roc.
git-svn-id: svn://10.0.0.236/trunk@219484 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 03:32:25 +00:00
sayrer%gmail.com
5fe975e832 Bug 368994. move more tests. r=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219483 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 03:19:35 +00:00
masayuki%d-toybox.com
ca70d600a8 Bug 369198 some characters missing at drawing r=roc
git-svn-id: svn://10.0.0.236/trunk@219482 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 03:11:53 +00:00
mozilla.mano%sent.com
e6670fd427 Bug 369311 - Typo in buildSelectionMetadata breaks the places context menu in certain conditions. r=gavin.
git-svn-id: svn://10.0.0.236/trunk@219480 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-05 00:28:27 +00:00
bzbarsky%mit.edu
4f7460d6df Make sure to process any pending exceptions the security manager has set if
we're not called from JS.  Bug 369157, r+sr=brendan.


git-svn-id: svn://10.0.0.236/trunk@219479 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 22:06:49 +00:00
uriber%gmail.com
406711070e Always initialize numChildren, now that it's always checked. bug=368893 r=nian.liu sr=roc
git-svn-id: svn://10.0.0.236/trunk@219478 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 21:24:49 +00:00
bienvenu%nventure.com
9171835c7c fix one cause of getting hourglass when clicking on an imap folder, sr=mscott, 271108
git-svn-id: svn://10.0.0.236/trunk@219477 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 21:10:11 +00:00
dbaron%dbaron.org
5a1016536d Be more tolerant of varying font metrics so the tests pass on Mac too, and clean up some things from the last round of changes. b=9458,18217
git-svn-id: svn://10.0.0.236/trunk@219476 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 20:52:46 +00:00
mozilla.mano%sent.com
c5fb9743e8 Bug 368876 - Organize Bookmarks menu-item does not work in non-browser windows. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@219475 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 19:31:30 +00:00
mozilla.mano%sent.com
36cdb865b5 Bug 369222 - Javascript error when opening the context menu for the empty area (i.e. root node) in the places toolbar. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@219474 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 19:23:00 +00:00
bzbarsky%mit.edu
1abd4f2810 Let the consumer have a look at the channel we opened if they want (e.g. if
they want its owner).  Bug 369242, r+sr=biesi


git-svn-id: svn://10.0.0.236/trunk@219473 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 18:03:13 +00:00
lpsolit%gmail.com
947a2c2019 Bug 369268: Wrong title for the API documentation of Bugzilla::WebService::Product - Patch by Guzmán Brasó <gbn@hqso.net> r/a=mkanat
git-svn-id: svn://10.0.0.236/trunk@219472 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 17:51:54 +00:00
mkanat%bugzilla.org
9f91edbd32 Bug 364697: dataloss warning from UTF8 conversion is not precise/scary enough
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat


git-svn-id: svn://10.0.0.236/trunk@219471 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 16:59:30 +00:00
mkanat%bugzilla.org
2e9961db54 Bug 358354: WebService should perform a login in xmlrpc.cgi
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat


git-svn-id: svn://10.0.0.236/trunk@219470 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 16:23:21 +00:00
olav%bkor.dhs.org
416d75ec83 Bug 365317: Must add 'MIME-Version: 1.0' to avoid charset being possibly ignored
Patch By Olav Vitters <olav@bkor.dhs.org> r=mkanat a=mkanat


git-svn-id: svn://10.0.0.236/trunk@219469 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 15:41:10 +00:00
lpsolit%gmail.com
a2bc326acd Bug 364177: On attachment and bug creation, if *one* requestee cannot see the bug, *all* requests are cancelled - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
git-svn-id: svn://10.0.0.236/trunk@219468 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 15:36:47 +00:00
lpsolit%gmail.com
f4a249536d Bug 290288: When editing a bug, include the bug number in the "Bug processed" title - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
git-svn-id: svn://10.0.0.236/trunk@219467 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 15:11:41 +00:00
bzbarsky%mit.edu
e00419d442 These aren't actually interface methods. Bug 369167, r+sr=sicking
git-svn-id: svn://10.0.0.236/trunk@219465 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 05:14:23 +00:00
justdave%bugzilla.org
fea1c6467a Bug 367836: Let the shadowdb connection have its own username and password
r=bear


git-svn-id: svn://10.0.0.236/trunk@219464 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 04:09:22 +00:00
sayrer%gmail.com
bcdc7107e6 Bug 368994. move tests for bug 100533. r=bz
git-svn-id: svn://10.0.0.236/trunk@219463 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-04 00:55:27 +00:00
gijskruitbosch%gmail.com
cb7a140f7e No bug - Sort contributors, add myself.
r=silver@warwickcompsoc.co.uk (James Ross) on IRC
ChatZilla Only.


git-svn-id: svn://10.0.0.236/trunk@219462 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 22:57:21 +00:00
cst%yecc.com
1524f1a475 Bug 369053 className is a property, not an attribute
r=ajschult sr=neil


git-svn-id: svn://10.0.0.236/trunk@219461 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 21:11:41 +00:00
sayrer%gmail.com
ad47eeb06b testing tinderbox messages
git-svn-id: svn://10.0.0.236/trunk@219460 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 19:26:49 +00:00
stridey%gmail.com
4ad75ec183 Camino Only - Bug 362330: Adblocking update. Patch by Smokey Ardisson <alqahira@ardisson.org> r/sr=smfr
git-svn-id: svn://10.0.0.236/trunk@219459 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 19:00:53 +00:00
bienvenu%nventure.com
903538fcfb prevent full download of partial pop3 message from running at same time as get new mail, sr=mscott part of 240049
git-svn-id: svn://10.0.0.236/trunk@219458 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 18:38:48 +00:00
bienvenu%nventure.com
178fb5bc03 fix parsing of boundary header to be case-insensitive, fixes preview text and spotlight file generation, 290057, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@219457 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 18:20:17 +00:00
ajschult%verizon.net
2fc9a0beb8 Bug 368789: use full path to invoke app for bloat tests and stop using page cycler in SeaMonkey. r=rhelmer
git-svn-id: svn://10.0.0.236/trunk@219456 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 17:48:55 +00:00
sayrer%gmail.com
66b2bc60df try experimental TinderboxPrint lines
git-svn-id: svn://10.0.0.236/trunk@219454 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 16:44:46 +00:00
sayrer%gmail.com
48a0b32e96 Bug 369196. change profile setup for mochitest. r=rcampbell
git-svn-id: svn://10.0.0.236/trunk@219453 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 16:43:17 +00:00
masayuki%d-toybox.com
4e1f6fefed Bug 365886 Implement canvas transform() and setTransform(). patch by KUROSAWA, Takeshi (taken) <taken.spc@gmail.com> r=vlad
git-svn-id: svn://10.0.0.236/trunk@219452 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 12:27:49 +00:00
mattwillis%gmail.com
9342dd8b4e debugging mac l10n
git-svn-id: svn://10.0.0.236/trunk@219450 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 07:08:45 +00:00
mattwillis%gmail.com
a89230b6e2 bug 355465 - Make tinderbox more flexible with where it reports l10n packaging status. (Missing piece now included) r=preed
git-svn-id: svn://10.0.0.236/trunk@219449 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 07:04:35 +00:00
jwalden%mit.edu
1c83a04091 Bug 369169 - Turn off server debug output, uncluttering test logs -- if you need to debug the server or want to see where something's going awry, tweak the new DEBUG constant manually. r=sayrer
git-svn-id: svn://10.0.0.236/trunk@219448 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 06:15:26 +00:00
dbaron%dbaron.org
4cdd6631fe Flush layout in subframes before doing a drawWindow. b=369146 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219447 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 03:54:02 +00:00
mattwillis%gmail.com
f9bdf4a612 bug 355465 - Make tinderbox more flexible with where it reports l10n packaging status. r=preed
git-svn-id: svn://10.0.0.236/trunk@219446 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 03:07:58 +00:00
jst%mozilla.org
1e2ff02370 Fix for bug 368945. Prevent creation of safe wrappers for objects that the caller can not access. r+sr=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@219445 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 03:03:07 +00:00
scott%scott-macgregor.org
c21504f7bc Bug #361702 --> nsIIOService::SetManageOfflineStatus throws a JS error on platforms that don't support nsINetworkLinkService. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@219444 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 02:51:10 +00:00
jwalden%mit.edu
6d7428a45a Bug 368942 - Add a do_get_file(path) function to xpcshell-simple, remove do_get_topsrcdir() as unnecessary. Also fix bug 368944 (invalid use of nsILocalFile API in test-harness) at the same time. r=sayrer
git-svn-id: svn://10.0.0.236/trunk@219443 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 01:46:09 +00:00
bzbarsky%mit.edu
93e3b51055 Add test for bug 355213.
git-svn-id: svn://10.0.0.236/trunk@219442 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 01:37:48 +00:00
mkanat%bugzilla.org
02de4d6790 Bump version number post-release.
git-svn-id: svn://10.0.0.236/trunk@219441 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 01:35:17 +00:00
benjamin%smedbergs.us
b41b45239e Bug 78081 - Don't export intermediate libraries; don't need to mention thebes explicitly because it's already EXPORT_LIBRARY. blanket-r=mento
git-svn-id: svn://10.0.0.236/trunk@219439 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 01:24:35 +00:00
tony%ponderer.org
887c20e021 bug 368761: "Report Web Forgery..." in the Help menu should be smarter
patch: swap help menu item based on context
r=bryner


git-svn-id: svn://10.0.0.236/trunk@219438 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 01:22:37 +00:00
benjamin%smedbergs.us
3321f9ce34 Bug 78081 - Don't export intermediate libraries, blanket-r=mento
git-svn-id: svn://10.0.0.236/trunk@219437 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 01:19:04 +00:00
bzbarsky%mit.edu
5d122039d9 Hoist the ref-scrolling stuff up to nsContentSink. Bug 369015, r+sr=sicking
git-svn-id: svn://10.0.0.236/trunk@219436 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 00:48:29 +00:00
graydon%mozilla.com
1bf777ed40 Bug 369134, bandaid for crash during restart under cycle collection.
r=vlad


git-svn-id: svn://10.0.0.236/trunk@219435 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 00:37:44 +00:00
rob_strong%exchangecode.com
7e0c766e77 Bug 369125 – updater.exe doesn't have a good description (updater). r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@219434 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 00:23:50 +00:00
crowder%fiverocks.com
19bb5e772a Bug 355214: backing out mrbkap's patch for more testing
git-svn-id: svn://10.0.0.236/trunk@219433 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 00:15:19 +00:00
bzbarsky%mit.edu
6e5369ff05 Update scrollframes to the new GetCollapsed() API too. Bug 369127, r+sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@219432 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-03 00:08:19 +00:00
scott%scott-macgregor.org
e874ae7526 Bug #366501 --> Make back and forward history buttons default toolbar items. Remove the stop button from the default set. Do a better job sizing the initial width of the thunderbird window for 1024x768 resolution with the wider toolbar. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@219431 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 23:54:17 +00:00
mkanat%bugzilla.org
089437e799 Bump version number pre-release.
git-svn-id: svn://10.0.0.236/trunk@219426 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 23:10:38 +00:00
kaie%kuix.de
8ab4f527d5 Bug 369098, Unable to Import personal certificate
Regression from recent checkin of bug 343612
Backing out obvious duplicate JS line
r=me


git-svn-id: svn://10.0.0.236/trunk@219423 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 22:53:48 +00:00
mrbkap%gmail.com
8aa8e587e4 Use a more roundabout way to convert variables to strings and call FindProxyForURL. bug 355214, r=crowder/darin sr=dveditz
git-svn-id: svn://10.0.0.236/trunk@219422 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 22:40:28 +00:00
justdave%bugzilla.org
1176151d5a [SECURITY] Bug 367071: mod_perl initialization script forgets to allow .htaccess files to prohibit file access.
r=mkanat, a=mkanat


git-svn-id: svn://10.0.0.236/trunk@219421 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 22:23:23 +00:00
bclary%bclary.com
3192cef0ee JavaScript Tests - sub status undefined, bug 369131, not part of the build
git-svn-id: svn://10.0.0.236/trunk@219420 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 21:54:13 +00:00
mkanat%bugzilla.org
530aaa8161 Bug 367674: [SECURITY] XSS when reading Atom feeds due to unescaped HTML
Patch By Frédéric Buclin <LpSolit@gmail.com> r=bkor, a=mkanat


git-svn-id: svn://10.0.0.236/trunk@219419 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 21:42:00 +00:00
mattwillis%gmail.com
1f905b8504 debugging mac l10n
git-svn-id: svn://10.0.0.236/trunk@219418 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 21:40:33 +00:00
stridey%gmail.com
d42d841faa Camino only - Bug 364198: Allow the site icon for local files to act as a proxy for the file. r=smorgan sr=pink.
git-svn-id: svn://10.0.0.236/trunk@219416 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 21:24:34 +00:00
mattwillis%gmail.com
fa9dcbd9a4 debugging mac l10n
git-svn-id: svn://10.0.0.236/trunk@219415 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 20:14:01 +00:00
sspitzer%mozilla.org
871aadc0f1 fix for bug #368661: on running the installer, remove the updates directory, updates.xml and active-update.xml files. otherwise, we could have a pave over install that then applies a pending update. additonally, after a pave over install the update history needs to be reset.
r=lilmatt


git-svn-id: svn://10.0.0.236/trunk@219413 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 18:21:39 +00:00
mike.morgan%oregonstate.edu
e357bc7447 s/7/9/
git-svn-id: svn://10.0.0.236/trunk@219411 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 17:55:35 +00:00
mattwillis%gmail.com
d95bc6618b debugging mac l10n
git-svn-id: svn://10.0.0.236/trunk@219410 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 17:53:16 +00:00
daniel.boelzle%sun.com
134080f78c Bug 340949, 368820, 356125: minding signons.rememberSignons, simple caching, using search_calprops, email alarms, misc cleanup
git-svn-id: svn://10.0.0.236/trunk@219409 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 14:42:50 +00:00
bugzilla%standard8.demon.co.uk
b6443fad4b Bug 119948 duplicated LDIF import code. r=bienvenu,sr=mscott
git-svn-id: svn://10.0.0.236/trunk@219408 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 13:51:40 +00:00
mattwillis%gmail.com
1559f28e4b debugging mac l10n
git-svn-id: svn://10.0.0.236/trunk@219406 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 08:27:46 +00:00
rob_strong%exchangecode.com
3b972cd451 Bustage fix - Bug 369048 – The installer should take over system wide defaults on install if the existing system wide default is for a firefox.exe. r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@219403 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 07:15:54 +00:00
dbaron%dbaron.org
4db2e911a7 Fix inclusion of extra notation in href.
git-svn-id: svn://10.0.0.236/trunk@219402 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 06:41:51 +00:00
sspitzer%mozilla.org
5bd54a78a0 fix for bug #368661: on running the installer, remove the updates directory, updates.xml and active-update.xml files. otherwise, we could have a pave over install that then applies a pending update. additonally, after a pave over install the update history needs to be reset.
r=rstrong


git-svn-id: svn://10.0.0.236/trunk@219401 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 06:37:17 +00:00
rob_strong%exchangecode.com
5471dff1f0 Bug 369048 – The installer should take over system wide defaults on install if the existing system wide default is for a firefox.exe. r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@219400 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 06:35:49 +00:00
dbaron%dbaron.org
8020647767 Tweak inline-block and inline-table z-ordering tests so they work with a broader range of font metrics and line heights.
git-svn-id: svn://10.0.0.236/trunk@219399 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 06:15:24 +00:00
dbaron%dbaron.org
1e94da33b0 Allow display:inline-block to be used on :before and :after. b=368622 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219398 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 06:13:37 +00:00
dbaron%dbaron.org
0903c8befe Move gray-ness of table borders to quirks mode and restore our prior standards-mode behavior. b=84307 r=fantasai sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219397 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 06:11:56 +00:00
preed%mozilla.com
d258d0c6ab Back out mattwillis' fix for bug 355465; perl -c is your friend.
git-svn-id: svn://10.0.0.236/trunk@219396 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 06:08:36 +00:00
mattwillis%gmail.com
10d188367f Respinning to build l10n
git-svn-id: svn://10.0.0.236/trunk@219395 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 05:35:02 +00:00
dbaron%dbaron.org
d58318944f Comment out a test that fails intermittently.
git-svn-id: svn://10.0.0.236/trunk@219394 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 05:18:25 +00:00
rob_strong%exchangecode.com
eb30bba2d6 Bug 367540 - When launching the app from the installer the app runs with elevated privileges. Also fixes Bug 364483 – Firefox stays elevated after update. patch=Masatoshi Kimura (:emk), r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@219393 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 05:07:37 +00:00
dbaron%dbaron.org
f9799eb9b0 Add simple script to clean up reftest output.
git-svn-id: svn://10.0.0.236/trunk@219392 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 05:00:41 +00:00
dbaron%dbaron.org
87181839d8 Add image that I forgot to add when checking in bug 368020.
git-svn-id: svn://10.0.0.236/trunk@219389 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 04:29:52 +00:00
mattwillis%gmail.com
6f54aa1e25 update tinder-config.pl to bug 355465 format
git-svn-id: svn://10.0.0.236/trunk@219387 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 04:09:04 +00:00
mattwillis%gmail.com
731e802569 bug 355465 - Make tinderbox more flexible with where it reports l10n packaging status. r=preed
git-svn-id: svn://10.0.0.236/trunk@219386 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 04:08:36 +00:00
sspitzer%mozilla.org
56a8e2de50 backing out my fix for bug #368661, it will break software update.
git-svn-id: svn://10.0.0.236/trunk@219385 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 04:05:21 +00:00
jst%mozilla.org
764d4a488b Fixing bug 368945. Add more value checking. r+sr=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@219380 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 03:35:06 +00:00
alfred.peng%sun.com
656526444e Bug 365339. set cairo endianness macros in a sane way.
r=vladimir.


git-svn-id: svn://10.0.0.236/trunk@219378 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 03:26:39 +00:00
bzbarsky%mit.edu
3c75597311 Add tests for bug 276037.
git-svn-id: svn://10.0.0.236/trunk@219377 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 03:02:47 +00:00
jwalden%mit.edu
f8b731730a Add reftests for most of bug 1156. There's still more to do, but this covers probably 70-80% of it. r=biesi, sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@219374 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 02:42:04 +00:00
tony%ponderer.org
a9d821f39c bug 369012: split client name and version number into separate query params
during phishing requests
patch: split {moz:client} and {moz:version}
r=marria


git-svn-id: svn://10.0.0.236/trunk@219373 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 02:30:31 +00:00
bzbarsky%mit.edu
a4c17fc701 Make sure to initialize all members and that sort of thing. Bug 369011, r+sr=sicking
git-svn-id: svn://10.0.0.236/trunk@219372 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 02:12:48 +00:00
bienvenu%nventure.com
33539cd9a4 fix imap url parsing problem, sr=mscott 369028
git-svn-id: svn://10.0.0.236/trunk@219370 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 01:03:31 +00:00
masayuki%d-toybox.com
24182bf2fb Bug 365236 Implement font-size-adjust on Mac r=vlad
git-svn-id: svn://10.0.0.236/trunk@219369 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 00:46:48 +00:00
scott%scott-macgregor.org
3f1f9c725b Bug #369026 --> start page style rule cleanup including removing the background gradient. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@219368 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-02 00:16:04 +00:00
ghendricks%novell.com
e136b41bd6 fixed error in patch 2.22
git-svn-id: svn://10.0.0.236/trunk@219366 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 23:50:57 +00:00
mattwillis%gmail.com
16d2f57d6b Spinning Sunbird 0.3.1 RC1
git-svn-id: svn://10.0.0.236/trunk@219364 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 23:17:30 +00:00
sayrer%gmail.com
1958dfebca Bug 357450. Unit tests for getElementsByClassName. r=jst, sr=peterv
git-svn-id: svn://10.0.0.236/trunk@219362 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 22:49:09 +00:00
bienvenu%nventure.com
a419f726dc fix 369009 new profile with account(s) setup with MCD still brings up account wizard, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@219359 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 22:34:01 +00:00
mattwillis%gmail.com
fd7db323ec bug 369014 - Fix typo in Argentina/Catamarca. r1/2=dmose
git-svn-id: svn://10.0.0.236/trunk@219357 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 22:30:15 +00:00
ghendricks%novell.com
0cbc1a3cc3 error in the patch
git-svn-id: svn://10.0.0.236/trunk@219356 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 22:17:43 +00:00
sayrer%gmail.com
122c643287 Bug 368994. move more content/ unit tests. r=sicking
git-svn-id: svn://10.0.0.236/trunk@219354 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 21:44:40 +00:00
sspitzer%mozilla.org
235535882e fix for bug #368661: on running the installer, remove the updates directory, updates.xml and active-update.xml files. otherwise, we could have a pave over install that then applies a pending update. additonally, after a pave over install the update history needs to be reset.
r=dveditz,mscott,lilmatt


git-svn-id: svn://10.0.0.236/trunk@219353 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 21:29:21 +00:00
rhelmer%mozilla.com
a7f586ef6c do not override profile dir for firefox b=341852, r=dbaron
git-svn-id: svn://10.0.0.236/trunk@219351 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 21:07:10 +00:00
rhelmer%mozilla.com
2991de3ced pageloader exgtension for firefox, b=367559 r=robcee
git-svn-id: svn://10.0.0.236/trunk@219349 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 20:56:13 +00:00
ghendricks%novell.com
cb5309cce4 assignee is optional.
git-svn-id: svn://10.0.0.236/trunk@219346 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 20:35:06 +00:00
mkanat%bugzilla.org
d8f8242cd3 Bug 361115: Release Notes For Bugzilla 2.22.2
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit


git-svn-id: svn://10.0.0.236/trunk@219343 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 20:17:54 +00:00
benjamin%smedbergs.us
c5eef58af6 Bug 366354 - fix activex control manifest embedding for VC8, patch by mfinkle r=me
git-svn-id: svn://10.0.0.236/trunk@219333 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 18:57:57 +00:00
nelson%bolyard.com
c5bb81d728 Replace <LAYER> tags with <IFRAME>. Results looks right, but variables
from right frame are not succesfully fetched by left frame.  Bug 54685.


git-svn-id: svn://10.0.0.236/trunk@219332 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 18:55:53 +00:00
crowder%fiverocks.com
2831391b63 Bug 366398: Backing this out since it breaks branch debug builds.
Will restore when I have branch approvals


git-svn-id: svn://10.0.0.236/trunk@219331 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 18:40:00 +00:00
sayrer%gmail.com
364b319b0e Bug 368994. moving test cases closer to the code they test. r=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219330 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 18:24:32 +00:00
sayrer%gmail.com
226d1b3a24 Bug 368994. moving test cases closer to the code they test. r=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219329 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 18:06:09 +00:00
mnyromyr%tprac.de
f6e0ba5f04 Bug 367998: Tag menu in standalone is not color-coded; rs=neil
git-svn-id: svn://10.0.0.236/trunk@219328 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 17:44:34 +00:00
bienvenu%nventure.com
95aee029db allow custom column handlers to add new row properties, sr=mscott 368748
git-svn-id: svn://10.0.0.236/trunk@219326 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 17:39:48 +00:00
scott%scott-macgregor.org
caedc56842 remove some ctrl-m characters
git-svn-id: svn://10.0.0.236/trunk@219325 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 16:58:30 +00:00
Olli.Pettay%helsinki.fi
008258da9a Bug 344369, redesign label to specify control element directly, p=surkov, r=enndeakin+neil
git-svn-id: svn://10.0.0.236/trunk@219323 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 15:59:54 +00:00
sayrer%gmail.com
4b956025f4 Bug 357450. Implement getElementsByClassName. r=jst, sr=peterv
git-svn-id: svn://10.0.0.236/trunk@219322 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 15:14:00 +00:00
szegedia%freemail.hu
0e5fb5b698 setAttributes must not be prevented by READONLY attribute -- we must be able to programmatically reset it.
git-svn-id: svn://10.0.0.236/trunk@219321 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 15:07:49 +00:00
neil%parkwaycc.co.uk
966dcb5343 Support copying from about:config using the browser's Edit/Copy and the Accel+C shortcut as well as the context menu b=239940 r=mats,mano
git-svn-id: svn://10.0.0.236/trunk@219320 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 13:13:51 +00:00
neil%parkwaycc.co.uk
b0b6bc74a8 Spell check results from previous message aren't cleared b=368867 p=mscott r=me sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@219319 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 11:54:46 +00:00
philringnalda%gmail.com
326483cb86 Bug 368902: Unnecessary looping over collapsed children in nsSprocketLayout, patch by Andreas Lange <anlan@lange.cx>, r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219318 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 07:24:28 +00:00
rhelmer%mozilla.com
3bcab571b2 move to new RunShellCommand, split into substeps, various fixes and features. r=
preed, b=368579


git-svn-id: svn://10.0.0.236/trunk@219317 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 06:37:48 +00:00
philringnalda%gmail.com
da8854e143 Bug 361085: document the -no-remote command-line switch in -help, r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@219316 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 06:04:36 +00:00
jwalden%mit.edu
8f31e327b8 Remove debugging output -- bug 351968 is done! (Really.)
git-svn-id: svn://10.0.0.236/trunk@219315 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 05:47:46 +00:00
rhelmer%mozilla.com
b10dcf0c62 move to new RunShellCommand, split into substeps, various fixes and features. r=preed, b=368579
git-svn-id: svn://10.0.0.236/trunk@219314 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 03:50:47 +00:00
ccooper%deadsquid.com
4adb6e6bd8 - adding updated seamonkey trunk configs for linux release build on sea-linux-tbox linux ref VM
git-svn-id: svn://10.0.0.236/trunk@219313 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 03:39:36 +00:00
jwalden%mit.edu
9187d50318 Last bugfixing patch for bug 351968, fixing the yellow on fxexp-win32-tbox. Once I've verified this, there's still some debug code to remove, but that'll be it!
git-svn-id: svn://10.0.0.236/trunk@219312 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 03:34:38 +00:00
scott%scott-macgregor.org
279684ba32 Bug #368867 --> spell check results from previous messages show up in the suggestions list for the inline spell checker when using a cached compose window. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@219310 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 03:31:11 +00:00
bienvenu%nventure.com
f844a5080f don't fetch preview text for imap if the pref isn't set, 368822, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@219309 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 03:26:16 +00:00
sspitzer%mozilla.org
43b44f3c79 supplimental fix for bug #354226: while mail and calendar have a helper.exe
(the renamed uninst.exe), those versions of helper.exe do not contain support
for /postupdate, or the command line switch that does the all the registry
work and log copying.  only firefox's helper.exe has support for that.

r=rstrong.


git-svn-id: svn://10.0.0.236/trunk@219308 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 03:22:13 +00:00
dbaron%dbaron.org
cbdde83088 Make default table and hr border colors be gray rather than special values that depend on the background color, and remove the special values that depend on the background. b=84307 Patch by fantasai <fantasai.bugs@inkedblade.net>. r=bzbarsky sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@219306 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 02:45:55 +00:00
dbaron%dbaron.org
6cef0aeaef Add tests for dynamic resizing of things that depend on width of container. b=163504, 28811
git-svn-id: svn://10.0.0.236/trunk@219305 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 02:14:40 +00:00
dbaron%dbaron.org
c85e259a73 Add tests for support of 'overflow' on inline-block elements. b=367247
git-svn-id: svn://10.0.0.236/trunk@219304 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 02:13:07 +00:00
mattwillis%gmail.com
85fe4d6cd6 bug 368858 - Only open http and https URLs (not javascript: ones) r1=dveditz, r2=dmose
git-svn-id: svn://10.0.0.236/trunk@219303 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 01:55:41 +00:00
mattwillis%gmail.com
441a51bdde bug 368921 - Be sure to convert all timezones. r1/2=dmose
git-svn-id: svn://10.0.0.236/trunk@219300 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-01 01:39:14 +00:00
Olli.Pettay%helsinki.fi
fbdd881a9d Bug 367781, adoptNode should update mMutationBits of the possible |window| object. r+sr=peterv
git-svn-id: svn://10.0.0.236/trunk@219299 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 22:54:24 +00:00
preed%mozilla.com
111110bcf3 Bug 367802: patcher2 needs to use MozBuild::Util. r=rhelmer
git-svn-id: svn://10.0.0.236/trunk@219298 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 21:59:34 +00:00
asqueella%gmail.com
9b444a60f5 remove the extra asterisk causing a strict warning.
irc-r=mano, no bug.


git-svn-id: svn://10.0.0.236/trunk@219297 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 21:53:03 +00:00
asqueella%gmail.com
d6008f9c2e Bug 363996 - subject in new mail notification is stripped of Re:
patch by Magnus Melin <mkmelin+mozilla@iki.fi>
r+sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@219296 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 21:24:59 +00:00
asqueella%gmail.com
961df68b7f Bug 303954 - Incorrect display of non-ASCII characters in template name of "Reply with template" filter
patch by Magnus Melin <mkmelin+mozilla@iki.fi>
r+sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@219295 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 21:14:17 +00:00
scott%scott-macgregor.org
c7b58b8757 Bug #367998 --> tags toolbar drop down doesn't show colors in the stand alone message window. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@219294 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 21:12:55 +00:00
asqueella%gmail.com
c105bf5f6a Bug 366727 - Standardize Cairo Pixel construction and clean the PNG decoder a little
patch by Alfred Kayser <alfredkayser@nl.ibm.com>
r=stuart, sr=vlad


git-svn-id: svn://10.0.0.236/trunk@219293 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 21:09:20 +00:00
mozilla.mano%sent.com
6e50136a42 Bug 368874 - places-commands are not functional in the context menu of web panels. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@219292 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 21:07:00 +00:00
slavomir.katuscak%sun.com
6d3680c1ad Bug 193386: Patch to fips.sh, fixed paths on HP-UX and AIX and added
PASSED/FAILED status reporting. r=nelson


git-svn-id: svn://10.0.0.236/trunk@219291 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 21:03:56 +00:00
asqueella%gmail.com
d4ac305796 Bug 368310 - Remove the obsolete Windows "A" style API calls in nsWindowsRegKey
patch by Ryan Jones <bugs@ryan-jones.com>
r+sr=bsmedberg


git-svn-id: svn://10.0.0.236/trunk@219290 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 21:02:48 +00:00
pedemont%us.ibm.com
1cb9ae458b Bug 330256 - Change generated interfaces package name.
git-svn-id: svn://10.0.0.236/trunk@219289 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 20:54:19 +00:00
benjamin%smedbergs.us
7b6469e9ab Fix Tunit with an objdir for real this time, r=coop
git-svn-id: svn://10.0.0.236/trunk@219288 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 20:52:05 +00:00
benjamin%smedbergs.us
07d98cdffe Bustage fix from bug 351949 - link against shell32 for ShellExecute
git-svn-id: svn://10.0.0.236/trunk@219287 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 20:29:11 +00:00
gavin%gavinsharp.com
3d88b98363 Bug 366398: On Darwin, Makefile.ref builds static libjs.so instead of dynamic libjs.dylib, patch by Brian Crowder <crowder@fiverocks.com>, r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@219286 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 20:09:41 +00:00
crowder%fiverocks.com
7e15ef5662 Bug 366398: On Darwin, Makefile.ref builds static libjs.so instead of dynamic libjs.dylib, r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@219285 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 19:55:41 +00:00
ccooper%deadsquid.com
f68cc4d3e3 - enable unit tests
git-svn-id: svn://10.0.0.236/trunk@219284 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 19:43:05 +00:00
aaronleventhal%moonset.net
bed3b171df Bug 356152. Menu items actions should be called click, not select. Patch by Mike Gao. r=aaronlev
git-svn-id: svn://10.0.0.236/trunk@219283 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 19:43:04 +00:00
bugzilla%standard8.demon.co.uk
8afbb835a5 Bug 335154 Get SeaMonkey's themes registering and switching with Theme Manager (in suiterunner) - no longer need to register default theme via installed-chrome.txt r/sr=Neil
git-svn-id: svn://10.0.0.236/trunk@219279 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 18:56:29 +00:00
vladimir%pobox.com
4ff12c96f9 b=368852, cocoa native theme code needs to flush cairo clip before drawing, r=stuart
git-svn-id: svn://10.0.0.236/trunk@219278 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 18:43:34 +00:00
sayrer%gmail.com
a9fa08bf21 cosmetic changes to test screen
git-svn-id: svn://10.0.0.236/trunk@219277 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 18:25:15 +00:00
jwalden%mit.edu
566f07f0a6 Sigh...still a tinderbox not liking tests -- echoing relevant variables to see their values, still bug 351968
git-svn-id: svn://10.0.0.236/trunk@219276 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 18:16:22 +00:00
ccooper%deadsquid.com
0bdd9e0bf4 - report when TUnit is successful
git-svn-id: svn://10.0.0.236/trunk@219275 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 18:11:11 +00:00
mozilla.mano%sent.com
75e2ea0e29 Bug 361698 - Navigation menuitems don't work in the sidebar's context menu. r=gavin.
git-svn-id: svn://10.0.0.236/trunk@219274 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 18:10:02 +00:00
kaie%kuix.de
c0aad59995 bug 343612, Reset master password confirmation dialog should be opened as a dialog.
patch contributed by Dorian (boissomag@free.fr)
r=kengert


git-svn-id: svn://10.0.0.236/trunk@219273 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 17:57:44 +00:00
mozilla.mano%sent.com
71b8cc9607 Bug 368776 - Feed Preview is broken if Safari is the default reader. r=mento.
git-svn-id: svn://10.0.0.236/trunk@219271 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 17:19:39 +00:00
benjamin%smedbergs.us
34c78edf3f RunUnitTests doesn't work when an objdir is set, r=coop
git-svn-id: svn://10.0.0.236/trunk@219270 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 17:17:32 +00:00
Olli.Pettay%helsinki.fi
1e8d2ecbb1 Bug 368627, Problem with XForms using itemsets across models, r=aaronr+surkov
git-svn-id: svn://10.0.0.236/trunk@219269 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 17:08:30 +00:00
stridey%gmail.com
cc0c55401c Camino only - Bug 360839: Expose preference for saving session state.
git-svn-id: svn://10.0.0.236/trunk@219267 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 16:43:00 +00:00
tor%cs.brown.edu
a9d030d819 Fix build bustage from bug 367503.
git-svn-id: svn://10.0.0.236/trunk@219265 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 16:31:20 +00:00
jst%mozilla.org
481c092675 Fixing bug 355766. Provide safe cross-origin access helper object, and make XPCNativeWrapper.wrappedJSObject use it. r=bzbarsky@mit.edu, sr=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@219264 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 16:25:35 +00:00
cltbld
b99f9a6620 Automated update from host egg.build.mozilla.org
git-svn-id: svn://10.0.0.236/trunk@219263 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 16:21:02 +00:00
philringnalda%gmail.com
b53869a21a Bug 352158: Back/Forward buttons appear disabled in Customize Toolbar view, r=gavin
git-svn-id: svn://10.0.0.236/trunk@219262 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 16:13:13 +00:00
benjamin%smedbergs.us
56576b18a3 No bug: checking to see which tinderboxes don't have python available.
git-svn-id: svn://10.0.0.236/trunk@219261 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 16:12:09 +00:00
tor%cs.brown.edu
5b1e084875 Bug 367503 - Switch nsSVGPathGeometryFrame to thebes. r=longsonr, sr=roc
git-svn-id: svn://10.0.0.236/trunk@219260 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 16:05:42 +00:00
Olli.Pettay%helsinki.fi
ba610d02ec Bug 243370, deCOMtaminate parts of nsIFrame that come from nsIBox, part 2, p=anlan@lange.cx, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@219259 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 16:02:42 +00:00
aaronleventhal%moonset.net
8da4e21793 Bug 368598. Collate multiple related caret/selection moves into one, and fire the accessible caret and selection events after focus events. r=ginn.chen
git-svn-id: svn://10.0.0.236/trunk@219257 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 15:42:55 +00:00
bear%code-bear.com
1d5551edc8 During WriteCheckins() the batchid-###.pl file is not generated if the
readonly param is true (Controls if the hooklist is to be updated).
This is causing grief with Tinderbox as it depends on that file to extract
the tree state when creating pages like quickparse.
bug 368792 r=cls


git-svn-id: svn://10.0.0.236/trunk@219256 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 15:36:26 +00:00
aaronleventhal%moonset.net
9f084b2c4f Bug 365690. Don't fire focus events for autocomplete menus while editing a text field (XUL or HTML). r=ginn.chen
git-svn-id: svn://10.0.0.236/trunk@219255 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 15:13:39 +00:00
aaronleventhal%moonset.net
230605e344 Bug 368779. Should fire object:state-changed:busy when loading document start. r=evan.yan
git-svn-id: svn://10.0.0.236/trunk@219254 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 15:07:12 +00:00
asqueella%gmail.com
198acfba39 Bug 210096, part two - remove inIFileSearch interface and its implementation
patch by Shawn Wilsher <comrade693+bmo@gmail.com>
r=db48x, sr=neil


git-svn-id: svn://10.0.0.236/trunk@219253 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 15:04:36 +00:00
aaronleventhal%moonset.net
125efcd806 Bug 367653. STATE_BUSY no longer cleared after document/window loads. r=ginn.chen
git-svn-id: svn://10.0.0.236/trunk@219252 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 14:55:36 +00:00
asqueella%gmail.com
0f0050a0c3 Bug 366214 - more improvements for JPEG in Cairo
patch by Alfred Kayser <alfredkayser@nl.ibm.com>
r=pavlov, sr=tor

Patch description:

1. Use row_stride and bpr only in non-Cairo builds (for the RGBRow buffer)
   (as jpg scanlines are always 3 bytes (in current config anyway)
2. Use 'client_data' to keep the pointer to the decoder instead of the offsetof
hack
3. Call 'img->ImageUpdated' not for every scanline, but for every batch of
scanlines received (just like OnDataAvailable).

Ad 1: Allows for better Cairo and non-Cairo separation
Ad 2: Removes the need for the offsetof hack
Ad 3: Makes image decoding for JPG in Cairo a lot faster (at least it feels
faster)


git-svn-id: svn://10.0.0.236/trunk@219251 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 14:53:21 +00:00
asqueella%gmail.com
20d87af87f fix bug 368145 - Linker warning when linking nsBrowserApp.obj in MSVC by using -libpath for MSVC and -L for everything else
patch by Ryan VanderMeulen <ryanvm@gmail.com>
r=bsmedberg


git-svn-id: svn://10.0.0.236/trunk@219250 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 14:38:21 +00:00
asqueella%gmail.com
25454ae60b Bug 367616 - Find again 'eats' some characters in View selection source.
patch by Florian Quèze <f.qu@queze.net>
r=gavin


git-svn-id: svn://10.0.0.236/trunk@219249 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 14:25:32 +00:00
longsonr%gmail.com
2577bfb047 Bug 368703 û Some methods in layout/style could be const r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@219248 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 13:59:26 +00:00
mozilla.mano%sent.com
cb1ab5905d Remove hidden character from the patch for bug 326854, thanks Neil.
git-svn-id: svn://10.0.0.236/trunk@219247 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 11:49:16 +00:00
thomas.benisch%sun.com
d0c340a6ef Bug 368558 add colors to Lightning calendars tab rui=mvl r1=lilmatt r2=mvl
git-svn-id: svn://10.0.0.236/trunk@219246 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 11:42:22 +00:00
mozilla.mano%sent.com
f2a5b6ef77 Bug 368449 - 'Open All in Tabs' menu-item label accidentally reverted. r=gavin.
git-svn-id: svn://10.0.0.236/trunk@219245 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 11:29:05 +00:00
mozilla.mano%sent.com
a5b5cab78b Bug 368456 - 'Close Tab' in the context menu for tabs should not be disabled when only one tab is open. r=gavin.
git-svn-id: svn://10.0.0.236/trunk@219244 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 11:24:16 +00:00
longsonr%gmail.com
bbe6c26223 Bug 368693 - use XMost() and YMost() in nsSVGFilters.cpp r+sr=tor
git-svn-id: svn://10.0.0.236/trunk@219243 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 10:10:56 +00:00
scott%scott-macgregor.org
222540d111 Bug #350052 --> View menu loses focus between Sort by and Threads. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@219241 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 08:20:31 +00:00
jwalden%mit.edu
7d3578115c Last commit for bug 351968, I promise!
git-svn-id: svn://10.0.0.236/trunk@219240 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 08:12:24 +00:00
jwalden%mit.edu
a5bbba2cb4 Unbreak test -- the previous commit should work fine. Bug 351968 is completely committed!
git-svn-id: svn://10.0.0.236/trunk@219239 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 07:49:10 +00:00
jwalden%mit.edu
8b7aba480c Final try at bug 351968 -- make relative topsrcdirs work, fixing the last build errors. Because xpcshell tests are fragile, this commit intentionally breaks a test so that I can verify correctness; I'll remove the break when I verify the fix works correctly (via broken test error messages).
git-svn-id: svn://10.0.0.236/trunk@219238 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 07:22:12 +00:00
cls%seawood.org
4399fe9c40 Grab global treedata to get $bonsai_tree for quickparse
Bug #359451


git-svn-id: svn://10.0.0.236/trunk@219237 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 06:35:46 +00:00
cls%seawood.org
b20b291447 Print a warning to the logfiles if batch-#.pl cannot be opened to determine tree state.
Fix the regex that checks for tree state.
Bug #359451


git-svn-id: svn://10.0.0.236/trunk@219236 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 06:17:55 +00:00
jwalden%mit.edu
d02a10351a Fix broken WINNT embedding tests by not building them, as happened before the previous change -- bug 351968 cleanup
git-svn-id: svn://10.0.0.236/trunk@219234 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 05:52:24 +00:00
dbaron%dbaron.org
56bd7b92c6 Missed null check. b=368740 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@219233 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 05:23:47 +00:00
jwalden%mit.edu
fbfbf6be25 Add a *working* hack to fix much of the MozillaTest bustage, I think -- still bug 351968
git-svn-id: svn://10.0.0.236/trunk@219232 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 05:23:40 +00:00
dbaron%dbaron.org
f0021aa428 Make things inside foreignObject reflow in response to style changes that cause reflow. b=328829 r=jwatt sr=roc
git-svn-id: svn://10.0.0.236/trunk@219231 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 05:22:40 +00:00
dbaron%dbaron.org
cebfff8cef Fix handling of background-clip and background-origin to honor GetSkipSides. b=368020 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@219230 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 05:21:05 +00:00
bienvenu%nventure.com
a3d3ff410c fix MCD with better fix for bug 216751, sr=mscott, look at correct pref branch for prefs set in .cfg file
git-svn-id: svn://10.0.0.236/trunk@219229 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 05:16:56 +00:00
sayrer%gmail.com
a09636f4b4 Bug 368725. is wrong in mochitest runtests.pl. r=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219228 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 05:14:23 +00:00
jwalden%mit.edu
a5fda3276c Add a hack to fix much of the MozillaTest bustage, will follow up in bug 351968 and figure out the right way to do this...
git-svn-id: svn://10.0.0.236/trunk@219226 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 04:57:53 +00:00
nelson%bolyard.com
5b3a170bba Bug 366803 - Improve SSL tracing, make it work in browsers, to help with
debugging bug 356470.  r=neil.williams,alexei.volkov


git-svn-id: svn://10.0.0.236/trunk@219222 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 04:20:26 +00:00
jwalden%mit.edu
1d0e6fa95c Testing something to determine the problem that's breaking the MozillaTest tinderboxen running automated tests
git-svn-id: svn://10.0.0.236/trunk@219220 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 03:58:25 +00:00
jwalden%mit.edu
83d07a5ce5 Bug 351968 - Don't copy xpcshell tests and other data to $(DIST) -- a step toward being able to --enable-tests on Mozilla tinderboxen. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@219219 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 03:25:46 +00:00
mozilla.mano%sent.com
a2ca505564 Bug 368781 - bookmark-properties window is busted in places-bookmarks builds.
git-svn-id: svn://10.0.0.236/trunk@219218 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 03:25:03 +00:00
aaronleventhal%moonset.net
ef338173c1 Bug 368729. Use hyphens for property names in ATK property change events. r=parente
git-svn-id: svn://10.0.0.236/trunk@219217 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 03:22:37 +00:00
mozilla.mano%sent.com
d0051a671f Bug 367035 - No 'Bookmark This Tab' and 'Bookmark All Tabs' menuitms in the tabbar context menu (places-bookmarks builds). r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@219216 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 03:09:48 +00:00
bzbarsky%mit.edu
a8acdc68b2 Fire the branch callback for the original cx when we're evaluating in a
sandbox.  Bug 368714, r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@219215 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 03:07:24 +00:00
preed%mozilla.com
b314c46e74 Bug 364499: Fix a problem where we conflated path w/ url; r=rhelmer
git-svn-id: svn://10.0.0.236/trunk@219214 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 02:45:56 +00:00
mozilla.mano%sent.com
eb44fa2328 Bug 342381 - Copying a live bookmark should put the feed url on the clipboard. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@219213 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 02:40:18 +00:00
mattwillis%gmail.com
1e558de59a bug 368724 - Minor cleanup to tzid comparisons per mvl. Patch by lilmatt, r1=ctalbert, r2=dmose
git-svn-id: svn://10.0.0.236/trunk@219210 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-31 00:20:51 +00:00
mats.palmgren%bredband.net
94bd3cef2d Add some protection in nsThebesImage::Draw() against bad calls. b=368427 r+sr=pavlov
git-svn-id: svn://10.0.0.236/trunk@219209 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 22:52:53 +00:00
cls%seawood.org
9e37c8a796 Use local hashes instead of global variables to store tree status data.
Store static tree configuration from treedata.pl into global hash.
Bug #359451 r=bear


git-svn-id: svn://10.0.0.236/trunk@219208 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 22:34:14 +00:00
mats.palmgren%bredband.net
d5c6c5d749 Collapse() might have destroyed 'frame'. b=368697 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@219207 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 22:28:06 +00:00
bienvenu%nventure.com
565ae92077 fix new mail alerts for quoted printable messages with soft line breaks, 368550, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@219206 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 22:23:01 +00:00
sayrer%gmail.com
c3796add5f Bug 367608. implement nsIFile::normalize() on OS X. r=mano, sr=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@219205 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 21:50:45 +00:00
benjamin%smedbergs.us
dfd4da8a97 Bug 368482 - Alpha Linux updates from xptcall changes, patch by falk@debian.org, r=me
git-svn-id: svn://10.0.0.236/trunk@219204 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 21:44:30 +00:00
rob_strong%exchangecode.com
7d48806583 Bug 368525 – Update 7zSD.sfx to include 32 bit images. r=lilmatt
git-svn-id: svn://10.0.0.236/trunk@219202 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 21:39:40 +00:00
jonas%sicking.cc
dc89ea1f2d Bug 18333: Make the XML content sink incremental. Patch by Henri Sivonen<hsivonen@iki.fi>. r=peterv sr=sicking
git-svn-id: svn://10.0.0.236/trunk@219201 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 21:21:06 +00:00
mattwillis%gmail.com
1172c6e14c bug 368709 - Adds missing trailing slash to gTzIdPrefix to make comparisons work. r1=ctalbert, r2=mvl
git-svn-id: svn://10.0.0.236/trunk@219200 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 21:07:34 +00:00
pedemont%us.ibm.com
8b5083bb42 Bug 362530 - Mac XULRunner SDK not copied to FTP server. r=rhelmer
git-svn-id: svn://10.0.0.236/trunk@219199 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 21:04:36 +00:00
mattwillis%gmail.com
2e458ced37 bug 368121 and bug 321653 - Update included timezones to contain 2007 US Daylight Savings Time changes, and convert events, tasks and preferences to the new tzids. r1=ctalbert, r2=dmose
git-svn-id: svn://10.0.0.236/trunk@219198 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 21:04:35 +00:00
mattwillis%gmail.com
05e4b0a41c Respin 0.3.1pre builds for testday to pickup fix for bug 368709
git-svn-id: svn://10.0.0.236/trunk@219195 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 20:24:48 +00:00
shaver%mozilla.org
973808718a Initial import of FUEL files for jresig and mfinkle.
git-svn-id: svn://10.0.0.236/trunk@219192 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 19:52:16 +00:00
roc+%cs.cmu.edu
ae03ab41d5 Bug 368468. Make code conform to Thebes style. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@219191 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 19:49:16 +00:00
uriber%gmail.com
7627d11f46 The correct version of the patch for bug 363198, this time.
git-svn-id: svn://10.0.0.236/trunk@219190 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 19:36:55 +00:00
uriber%gmail.com
512057cadc GetFrameForNodeOffset: if aNode has no children and the offset is 0, return the frame corresponding to aNode rather than failing. patch by Nian Liu <nian.liu@sun.com>. bug=363198 r=uriber sr=roc.
git-svn-id: svn://10.0.0.236/trunk@219189 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 19:29:55 +00:00
bugzilla%standard8.demon.co.uk
74cd823725 Bug 363491 Stops xul apps needing to build in xpfe/global. r=benjamin,mscott,sr=Neil
git-svn-id: svn://10.0.0.236/trunk@219188 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 19:16:33 +00:00
bugzilla%standard8.demon.co.uk
e9213ece34 Bug 363491 Stop suiterunner builds needing to build in xpfe/global (define an about:about module for SeaMonkey) r=dveditz,sr=Neil
git-svn-id: svn://10.0.0.236/trunk@219187 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 19:08:36 +00:00
bugzilla%standard8.demon.co.uk
8513583aec Bug 354010 No error dialog when attempting to create multiple lists of the same name in separate address books. r/sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@219186 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 18:55:45 +00:00
edburns%acm.org
345b029cb2 M webclient/build-tests.xml
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImpl.java
M webclient/src_moz/CurrentPageImpl.cpp
M webclient/src_moz/Makefile.in

- Remove bookmarks because bookmarks is not in XULRunner

M webclient/test/automated/src/classes/org/mozilla/webclient/CurrentPageTest.java

- Disable testCopyCurrentSelectionToSystemClipboard.  Need to try with
  1.5.0.9.

M webclient/test/automated/src/classes/org/mozilla/webclient/NavigationTest.java
M webclient/test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java

- Account for build dir change

M webclient/test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java

- enable copy button.


git-svn-id: svn://10.0.0.236/trunk@219185 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 18:26:37 +00:00
joshmoz%gmail.com
ca0394d0e2 use close button in dialogs in some cases. b=359192 r=cbarrett sr=pinkerton
git-svn-id: svn://10.0.0.236/trunk@219184 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 17:53:48 +00:00
cltbld
c93c38f7b1 Automated update from host egg.build.mozilla.org
git-svn-id: svn://10.0.0.236/trunk@219183 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 17:11:03 +00:00
benjamin%smedbergs.us
6567bfccef Bug 368316 - Add configure detection for VC9 prerelease (codename "Orcas"), patch by Stefanik Gábor <netrolller.3d@gmail.com>, r=me
git-svn-id: svn://10.0.0.236/trunk@219182 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 17:06:58 +00:00
bzbarsky%mit.edu
787c7021bb Check with CAPS before executing in a sandbox. Bug 368655, r+sr=jst.
git-svn-id: svn://10.0.0.236/trunk@219180 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 16:38:15 +00:00
stuart.morgan%alumni.case.edu
f30b95cbe7 Camino only - Checking in missed file from bug 358689
git-svn-id: svn://10.0.0.236/trunk@219179 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 16:05:59 +00:00
longsonr%gmail.com
0f7134181a Bug 307708 û filters should operate in linearRGB color space by default r=dbaron,r=tor,sr=roc
git-svn-id: svn://10.0.0.236/trunk@219177 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 13:19:55 +00:00
asqueella%gmail.com
70c0246288 fix bug 363419 - Direct children of <overlay> not created correctly.
Don't create XUL "placeholder" element for them, instead use the same logic as elsewhere, as these nodes can end up in the master document.

r=smaug, sr=sicking


git-svn-id: svn://10.0.0.236/trunk@219176 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 12:49:24 +00:00
neil%parkwaycc.co.uk
214111bf7d Fix one-time install issue caused by profile selection dialog and CAPS conspiring to register chrome when I didn't expect it b=368223 r=trev@gtchat.de sr=jag
git-svn-id: svn://10.0.0.236/trunk@219175 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 10:20:27 +00:00
Olli.Pettay%helsinki.fi
d22a9090d3 Bug 367310, immediately after closing history crash opening unvisited links [@ nsTreeRows::FindByResource], p=enndeakin, r=me, sr=sicking
git-svn-id: svn://10.0.0.236/trunk@219174 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 08:52:07 +00:00
masayuki%d-toybox.com
ff3a7c1f05 Bug 366285 Need a common class of the fontconfig management for Linux and BeOS r=vlad
git-svn-id: svn://10.0.0.236/trunk@219172 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 08:20:29 +00:00
bzbarsky%mit.edu
b3876987e5 Fix more bustage. Still bug 300691
git-svn-id: svn://10.0.0.236/trunk@219170 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 06:38:26 +00:00
bzbarsky%mit.edu
4e77b25e66 Fix build bustage. Bug 300691
git-svn-id: svn://10.0.0.236/trunk@219169 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 06:25:07 +00:00
bzbarsky%mit.edu
78ccec5f86 Remove some no longer needed code. Bug 368273, r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@219168 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 05:52:27 +00:00
bzbarsky%mit.edu
e194a83392 Make <style> elements notice text content changes. Bug 367612, r+sr=sicking
git-svn-id: svn://10.0.0.236/trunk@219167 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 05:50:22 +00:00
bzbarsky%mit.edu
fc8275495f Fix bug 300691. r+sr=sicking
git-svn-id: svn://10.0.0.236/trunk@219166 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 05:48:22 +00:00
scott%scott-macgregor.org
3e57d3dbda Bug #343933 --> images aren't getting loaded in the compose window after a save operation happens because nsMsgWindow::SetDOMWindow changes the app type to MAIL. Make callers explicitly set the app type instead of doing it in SetDOMWindow.
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@219165 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 05:45:25 +00:00
sayrer%gmail.com
61de23279a bug 368645. mochitest's runtests.pl dies with 'libmozjs.so: cannot open shared object file: No such file or directory'. r=myk
git-svn-id: svn://10.0.0.236/trunk@219164 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 05:28:14 +00:00
scott%scott-macgregor.org
6b38093629 Bug #3459 --> inline subject spell checking should honor the global inline spell check settings. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@219163 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 05:28:13 +00:00
scott%scott-macgregor.org
460bd5aebb Bug #368635 --> hide phishing controls for downloading local list of known phishing urls since we don't have a service provider hooked up yet. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@219161 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 05:17:53 +00:00
rob_strong%exchangecode.com
bfca43936b Landing of interdependent bugs for Vista support. Bug 354005 Setting the app as the OS default is broken on Vista. r=sspitzer, r=dougt, sr=bsmedberg. Bug 351949 – Automatic Update is not working for Vista users with limited account privilege and UAC (User Account Control) enabled. r=sspitzer, r=rstrong. Bug 354226 – nsPostUpdateWin.js fails to update registry keys / log files after an update has been applied. r=rstrong.
git-svn-id: svn://10.0.0.236/trunk@219158 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 05:14:50 +00:00
edburns%acm.org
e72cf3994c M dom/build.xml
M dom/jni/Makefile.in
M dom/jni/javaDOMGlobals.cpp
M dom/src/Makefile.in
M webclient/build-tests.xml
M webclient/build.xml
M webclient/src_ie/Makefile.in
M webclient/src_moz/Makefile.in
M webclient/src_moz/gtk/Makefile.in
M webclient/src_moz/motif/gtkmozilla.h
M webclient/src_share/Makefile.in

- Enable building with an objdir.  Much more civilized.  Thanks very
  much to Bradley Smedberg.


git-svn-id: svn://10.0.0.236/trunk@219157 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 01:51:54 +00:00
despotdaemon
14137191b8 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@219156 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 01:44:07 +00:00
scott%scott-macgregor.org
5014bee07b Bug #346966 --> message headers are spaced too far apart (vertically) when using large fonts. sr=neil
git-svn-id: svn://10.0.0.236/trunk@219155 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 01:20:11 +00:00
roc+%cs.cmu.edu
6d0b53f654 Bug 368153. Allow jar: URLs to return the query part in the document.location.search property. r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@219154 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 01:15:02 +00:00
roc+%cs.cmu.edu
c0189af2ee Bug 368182. Add Xft path to gfxPangoTextRun to hopefully improve performance for 8bit text (rendering should be the same as it used to be pre-gfxPangoTextRun). r=pavlov
git-svn-id: svn://10.0.0.236/trunk@219153 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 01:14:19 +00:00
cst%yecc.com
9ecc3d1c52 Bug 368046 zero-height window messes up tab preview
r+sr=neil


git-svn-id: svn://10.0.0.236/trunk@219152 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 00:13:37 +00:00
cvshook%sicking.cc
ccd1d6884d Kill remainders of ns(XBL|HTML|XUL|Layout)Atoms. r/sr=jst b=368128
git-svn-id: svn://10.0.0.236/trunk@219151 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-30 00:06:41 +00:00
asqueella%gmail.com
788939323b Bug 368606 - mochitest runtests.pl should work with any working directory
r=sayrer


git-svn-id: svn://10.0.0.236/trunk@219149 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 22:32:08 +00:00
aaronr%us.ibm.com
7f97d3f2a1 [XForms] range regression, no thumb showing. Bug 366743, p=msterlin, r=surkov+aaronr
git-svn-id: svn://10.0.0.236/trunk@219147 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 21:42:05 +00:00
Olli.Pettay%helsinki.fi
12ad213b62 Bug 367988, View|Headers|All - when set, full headers shown, on next launch, View|Headers|Normal is marked instead, yet full headers are still shown , r=mscott, sr=neil
git-svn-id: svn://10.0.0.236/trunk@219144 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 20:41:26 +00:00
jwalden%mit.edu
46e05ea2a6 Bug 368158 - nsPipe XPCOM attributes are missing initialization checks. r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@219143 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 20:08:50 +00:00
jwalden%mit.edu
88c64d8de5 Bug 367827 - Testing for DOM serialization with different output encodings. r=bz
git-svn-id: svn://10.0.0.236/trunk@219142 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 20:05:07 +00:00
mvl%exedo.nl
f2ac7e4691 UI bits for bug 215971. r=lilmatt,jminta
git-svn-id: svn://10.0.0.236/trunk@219141 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 20:00:26 +00:00
jwalden%mit.edu
ce2644d865 Bug 368142 - Tests for correct byte-by-byte encodings of Unicode strings. r=smontagu
git-svn-id: svn://10.0.0.236/trunk@219140 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 20:00:03 +00:00
mattwillis%gmail.com
87d05f4866 bug 368490: Fix indenting level so ics import recognizes exceptions of recurring events. r1=lilmatt, r2=mvl
git-svn-id: svn://10.0.0.236/trunk@219139 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 19:56:14 +00:00
jwatt%jwatt.org
adbce890b6 Fix typo. r=stuart (no bug)
git-svn-id: svn://10.0.0.236/trunk@219138 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 19:49:23 +00:00
despotdaemon
73c554dcd3 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@219137 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 19:48:35 +00:00
mike.morgan%oregonstate.edu
073d828589 Fixed typo in comment.
git-svn-id: svn://10.0.0.236/trunk@219135 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 18:48:32 +00:00
despotdaemon
278386638f Pseudo-automatic update of changes made by morgamic@mozilla.com.
git-svn-id: svn://10.0.0.236/trunk@219134 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 18:48:23 +00:00
stridey%gmail.com
ebcaa7dcf6 Camino only - Bug 368457: about:config is broken. Patch by Smokey Ardisson <alqahira@ardisson.org>. r=me sr=pink
git-svn-id: svn://10.0.0.236/trunk@219132 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 18:07:03 +00:00
stuart.morgan%alumni.case.edu
c59e2d6733 Camino only - Bug 368443: Remove stored session when reseting Camino. r=stridey sr=pink
git-svn-id: svn://10.0.0.236/trunk@219131 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 17:59:57 +00:00
stridey%gmail.com
8b09609146 Camino only - Bug 358689: Offer user the choice to restore window state after a crash. Now with (hopefully) orange-free goodness. Original patch by Sean Murphy <camino@seanmurph.com>, bustage fix by Stuart Morgan <stuart.morgan@alumni.case.edu> sr=pink
git-svn-id: svn://10.0.0.236/trunk@219130 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 17:56:28 +00:00
sayrer%gmail.com
10f7224bb4 Bug 368531. add content/html/document/test to the automatic run. r=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219129 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 17:56:19 +00:00
enndeakin%sympatico.ca
9c42661cc7 Bug 92174, add date and time picker widgets to toolkit, r=neil,mano
git-svn-id: svn://10.0.0.236/trunk@219127 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 17:36:20 +00:00
stuart.morgan%alumni.case.edu
4a5a019d21 Camino only - Bug 368570: Don't leak keychain items during form fill. sr=pink
git-svn-id: svn://10.0.0.236/trunk@219126 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 17:33:16 +00:00
stridey%gmail.com
64d05b41cd Camino only - Bug 362655: Make 'Keyboard Shortcuts' menu item pointing to online documentation. r=cl sr=smorgan
git-svn-id: svn://10.0.0.236/trunk@219125 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 17:30:17 +00:00
wr%rosenauer.org
f185f48162 Bug 368544 - don't try to send with empty URL, r=luser
git-svn-id: svn://10.0.0.236/trunk@219123 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 16:04:18 +00:00
smontagu%smontagu.org
83e5b28c9f #undef CS and ES to prevent build errors on Solaris 10 x86. Bug 287388, r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@219121 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 14:37:04 +00:00
martijn.martijn%gmail.com
a9d520ae67 Bug 336279 – Find misses text in this testcase, r=jst, sr=rbs
git-svn-id: svn://10.0.0.236/trunk@219120 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 13:58:24 +00:00
crowder%fiverocks.com
3ef86c2c5d 253142: another script ordering bug, r=brendan
git-svn-id: svn://10.0.0.236/trunk@219118 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 08:22:31 +00:00
dveditz%cruzio.com
7d2deb3c1b suppress bad cert dialogs during extension update checks (bug 366191). r=rstrong, sr=darin
git-svn-id: svn://10.0.0.236/trunk@219117 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 07:58:01 +00:00
scott%scott-macgregor.org
f5048657ad Bug #3459 --> run the inline spell checker on the subject.
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@219116 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 07:41:40 +00:00
scott%scott-macgregor.org
1b86fb7d3f Bug#368532 --> inline table editing controls aren't being displayed because the content policy is blocking resource urls. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@219115 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 07:40:22 +00:00
alfred.peng%sun.com
57c72a1a2e Bug 368377. Stop exporting cairo headers from thebes headers.
Fix Solaris compiler bustage.
Patch by Andreas Lange anlan@lange.cx. r=pavlov.


git-svn-id: svn://10.0.0.236/trunk@219114 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 07:25:05 +00:00
rob_strong%exchangecode.com
730a3baf36 Bug 368524 – Update 7zSD.sfx to include 32 bit images. r=mscott
git-svn-id: svn://10.0.0.236/trunk@219111 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 06:55:59 +00:00
sayrer%gmail.com
97a00cd91d trivial formatting changes to the test screen
git-svn-id: svn://10.0.0.236/trunk@219107 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 05:45:52 +00:00
crowder%fiverocks.com
b687460bad 252995: reordering script_toSource and script_toString, r=brendan
git-svn-id: svn://10.0.0.236/trunk@219103 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 04:50:34 +00:00
scott%scott-macgregor.org
6c30e4b368 Bug #346966 --> message headers have too much vertical spacing on windows with large fonts turned on. r=neil
git-svn-id: svn://10.0.0.236/trunk@219102 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 04:48:55 +00:00
crowder%fiverocks.com
3a04ebbbb1 253003: re-ordering script compile, r=brendan
git-svn-id: svn://10.0.0.236/trunk@219101 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 04:40:34 +00:00
crowder%fiverocks.com
cb8f649b8f 253125: script_exec ordering fix, r=brendan
git-svn-id: svn://10.0.0.236/trunk@219100 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 04:18:49 +00:00
rob_strong%exchangecode.com
432143d212 Bug 333491 – FF installer icon looks bad on Windows Vista. ui-r=beltzner
git-svn-id: svn://10.0.0.236/trunk@219099 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 03:30:24 +00:00
bzbarsky%mit.edu
105ac72207 Missed a spot where we should update our cached band rect. Bug 368330, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@219098 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-29 02:16:23 +00:00
cltbld
994d6810d8 Automated update from host egg.build.mozilla.org
git-svn-id: svn://10.0.0.236/trunk@219086 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 22:21:03 +00:00
mozilla%weilbacher.org
0b13d1e0a5 [OS/2] Bug 333235: Get Thebes to work on OS/2. Required build additions and easy widget changes. r=mkaply
git-svn-id: svn://10.0.0.236/trunk@219085 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 22:20:21 +00:00
lpsolit%gmail.com
7d4c9d3596 Bug 361842: When filing a bug with dependencies, delta_ts is not updated on dependent bugs, preventing correct midair collision detection in these bugs - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=LpSolit
git-svn-id: svn://10.0.0.236/trunk@219084 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 21:20:45 +00:00
justdave%bugzilla.org
23e3029157 Bug 367823: prevent addcheckin.pl from *writing* to the shadow database
r=bear


git-svn-id: svn://10.0.0.236/trunk@219083 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 21:19:07 +00:00
jst%mozilla.org
116af3ce87 Fixing bug 366082. Prevent Adobe Acrobat from loading URLs other than http:, https:, or ftp: w/o specifying a target. r+sr=dveditz@cruzio.com
git-svn-id: svn://10.0.0.236/trunk@219081 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 19:50:37 +00:00
inonit%inonit.com
ba0fe65e30 Fix spelling errors in code, documentation
git-svn-id: svn://10.0.0.236/trunk@219079 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 19:31:26 +00:00
inonit%inonit.com
372709b910 Better documentation on jsdriver target
git-svn-id: svn://10.0.0.236/trunk@219078 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 19:28:10 +00:00
inonit%inonit.com
b98a2f53cb Fix for bug #321967 ("default xml namespace =" statement decompiles incorrectly)
git-svn-id: svn://10.0.0.236/trunk@219077 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 19:23:51 +00:00
asqueella%gmail.com
9880dcd409 Bug 368229 - pref-smime-advanced.xul is not used
Magnus Melin <mkmelin+mozilla@iki.fi>
r=bienvenu


git-svn-id: svn://10.0.0.236/trunk@219075 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 19:18:29 +00:00
crowder%fiverocks.com
99a5d3fbd2 Bug 355820: follow-up to fix eval breakage. patch by crowder@fiverocks.com, r=brendan
git-svn-id: svn://10.0.0.236/trunk@219074 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 19:17:29 +00:00
sayrer%gmail.com
1f60178c95 bug 368494. mochitest harness setup bugs. r=asqueella
git-svn-id: svn://10.0.0.236/trunk@219073 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 19:06:05 +00:00
dbaron%dbaron.org
3af9eecb86 Make non-box frames pay better attention to nsITheme::GetWidgetBorder and GetWidgetPadding. b=366722 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@219072 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 17:20:01 +00:00
bzbarsky%mit.edu
a99e9b8f80 Fix crash bug 368166. r=bernd, sr=roc
git-svn-id: svn://10.0.0.236/trunk@219071 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 16:49:26 +00:00
Olli.Pettay%helsinki.fi
d30b60507a Bug 321174, move GetElementsForResult and GetElementsForID to an nsCOMArray, r=enndeakin, sr=sicking
git-svn-id: svn://10.0.0.236/trunk@219070 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 13:17:27 +00:00
asqueella%gmail.com
da8bed279c fix bug 367356, Error: erel has no properties (XMLPrettyPrint.xml)
patch by Dão Gottwald <dao@design-noir.de>
r=gavin


git-svn-id: svn://10.0.0.236/trunk@219069 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 12:58:19 +00:00
jwalden%mit.edu
e5e23c59f9 Bug 368459 - Test for XML.prototype.normalize() in E4X test suite is wrong; also fix the bug the buggy testcase was hiding. r=brendan
git-svn-id: svn://10.0.0.236/trunk@219067 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 06:27:21 +00:00
ajschult%verizon.net
84a2931a30 Fixing Aaron's bustage from bug 368195
git-svn-id: svn://10.0.0.236/trunk@219066 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 05:11:13 +00:00
aaronleventhal%moonset.net
0eb7d1fddc Bug 368195. Add missing ARIA roles treegroup and status. r=evan.yan
git-svn-id: svn://10.0.0.236/trunk@219064 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 04:03:24 +00:00
aaronleventhal%moonset.net
b85e073170 Bug 367412. Fix Mozilla's usage of states, and refactor. r=ginn.chen, r=surkov, sr=neil
git-svn-id: svn://10.0.0.236/trunk@219063 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 03:58:18 +00:00
mozilla.mano%sent.com
75a1abc5ce Bug 296394 - Firefox should not complain about -console command line argument. patch from Dave Townsend (Mossop) <mossop.bugzilla@blueprintit.co.uk>, r=bsmedberg.
git-svn-id: svn://10.0.0.236/trunk@219062 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-28 00:33:10 +00:00
mats.palmgren%bredband.net
5470e3820a Fix divide by zero crash regression. b=368427 r+sr=pavlov
git-svn-id: svn://10.0.0.236/trunk@219061 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 23:35:07 +00:00
mozilla.mano%sent.com
a48c8f8f29 Bug 368447 - Drag&Drop from the places toolbar is broken. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@219060 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 23:27:50 +00:00
stuart.morgan%alumni.case.edu
6fa8890a65 Bug 368444: Disable Camino's crash-restoration dialog in tinderbox tests. r=rhelmer
git-svn-id: svn://10.0.0.236/trunk@219057 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 23:13:21 +00:00
mats.palmgren%bredband.net
8ae547d9f0 Improve overflow/underflow DOM event handling. b=365477 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@219056 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 22:50:18 +00:00
dbaron%dbaron.org
04bb428ada Remove nsTableFrame::GetBorderPadding and related code. b=367458 r=bernd sr=roc
git-svn-id: svn://10.0.0.236/trunk@219055 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 22:22:24 +00:00
mats.palmgren%bredband.net
be57223232 Implement "Empty Junk" for the Junk folder context menu. b=189911 r+sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@219054 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 21:41:10 +00:00
ajschult%verizon.net
82ed606439 Bug 368401: Installer does not delete myspell directory, r/sr=Neil
git-svn-id: svn://10.0.0.236/trunk@219053 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 20:46:34 +00:00
dbaron%dbaron.org
12c42b4c23 Revert previous change.
git-svn-id: svn://10.0.0.236/trunk@219052 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 19:35:29 +00:00
dbaron%dbaron.org
f641ad27b0 Reorder lines to make comment make a little more sense. b=367247 r=biesi (as was the last patch here, after the fact)
git-svn-id: svn://10.0.0.236/trunk@219051 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 19:03:21 +00:00
dbaron%dbaron.org
692b905d25 Make plugin placeholders inline-block. b=367247 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219050 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 18:46:09 +00:00
dbaron%dbaron.org
c89a4222fe Address review comment on bug 9458 that depends on bug 367247 by making nsFrame::IsContainingBlock not check display type, but making it purely frame-class-based.
git-svn-id: svn://10.0.0.236/trunk@219049 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 18:45:35 +00:00
dbaron%dbaron.org
5615880f12 Make inline-blocks support 'overflow', and add some useful methods to nsStyleDisplay. b=367247 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219048 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 18:44:24 +00:00
dbaron%dbaron.org
0b4631ed27 Make marquee use inline-block. b=163504 r=martijn sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219047 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 18:40:57 +00:00
dbaron%dbaron.org
c380d24c54 Combine the code that tests inlines for dependence on the containing block width in order to disable resize reflow optimizations, and add to that code things that shrink wrap (inline-block, inline-table, buttons, fieldsets). Also move the percentage-height tests out, and into InitResizeFlags. b=163504 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219046 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 18:40:26 +00:00
dbaron%dbaron.org
3052400d5e Implement CSS display types inline-block and inline-table. b=9458, 18217 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@219045 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 18:36:57 +00:00
bienvenu%nventure.com
39ccca8dbc fix problems parsing quota response, patch by engel@physics.harvard.edu 363666 r/sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@219043 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 17:15:27 +00:00
mnyromyr%tprac.de
237a464cfd Bug 367672: CSS 2 InfoBackground doesn't work properly; p=<stefanh@bluebottle.com>, r=joshmoz, sr=mikepinkerton
git-svn-id: svn://10.0.0.236/trunk@219041 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 15:23:33 +00:00
anton.bobrov%sun.com
d930f3fb30 Bug 367289: rev 1 of the patch
git-svn-id: svn://10.0.0.236/trunk@219040 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 08:49:53 +00:00
stridey%gmail.com
a72cdf9f21 Camino only - Backing out Bug 358689 until we can work around the orangeness.
git-svn-id: svn://10.0.0.236/trunk@219039 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 06:22:03 +00:00
philringnalda%gmail.com
c9d444a211 Bug 365574: Help's search sidebar close button (even more) broken, r=mano
git-svn-id: svn://10.0.0.236/trunk@219038 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 05:54:34 +00:00
philringnalda%gmail.com
46ff37b8c0 Bug 349526: BeOS crashes at startup due to mState buffer overrun, p=tqh <thesuckiestemail@yahoo.se>, r+sr=vlad
git-svn-id: svn://10.0.0.236/trunk@219037 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 05:11:35 +00:00
crowder%fiverocks.com
17c34831c3 Bug 355820: fixing a flub from first checkin, patch by crowder@fiverocks.com, r=brendan
git-svn-id: svn://10.0.0.236/trunk@219036 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 04:19:23 +00:00
pavlov%pavlov.net
4169248ca1 Changing mac printing to use print manager instead of cups. bug 367433. r=vlad/cbarrett
git-svn-id: svn://10.0.0.236/trunk@219035 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 04:06:59 +00:00
preed%mozilla.com
45a91c751b Bug 364499: allow the ability to create per-AUS channel URLs, to facilitate snippets pointed at different URLs in each channel, if necessary. r=rhelmer
git-svn-id: svn://10.0.0.236/trunk@219034 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 03:34:46 +00:00
pavlov%pavlov.net
145b2ebae6 fixing build bustage
git-svn-id: svn://10.0.0.236/trunk@219033 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 02:14:19 +00:00
pavlov%pavlov.net
561ccedc78 stop exporting cairo headers from thebes headers. bug 368377. r=vlad
git-svn-id: svn://10.0.0.236/trunk@219032 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 01:59:57 +00:00
preed%mozilla.com
c2218af39b Bug 366650: Make sure we generate updateType for complete snippets. r=rhelmer
git-svn-id: svn://10.0.0.236/trunk@219031 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 01:59:27 +00:00
pavlov%pavlov.net
d997f80a7a temp bustage fix
git-svn-id: svn://10.0.0.236/trunk@219030 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 01:48:33 +00:00
pavlov%pavlov.net
9ce4212383 adding finish method to gfxASurface
git-svn-id: svn://10.0.0.236/trunk@219029 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 01:46:14 +00:00
pavlov%pavlov.net
36083b0632 stop exporting cairo headers from thebes headers. bug 368377. r=vlad
git-svn-id: svn://10.0.0.236/trunk@219028 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 01:26:49 +00:00
ajschult%verizon.net
e872e32692 Bug 367657: Remove old DOM Inspector shared library when upgrading. Patch by Peter Weilbacher <mozilla@Weilbacher.org>, r=me, sr=Neil.
git-svn-id: svn://10.0.0.236/trunk@219022 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 00:35:19 +00:00
dveditz%cruzio.com
bd28f770ee bug 342314: check-in initial effective-tld file. r=bsmedberg.
Effective TLD file itself thanks to Jo Hermans.


git-svn-id: svn://10.0.0.236/trunk@219021 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-27 00:12:57 +00:00
bienvenu%nventure.com
34d937ccd3 fix summary tooltip of new messages on saved searches, sr=mscott 367527
git-svn-id: svn://10.0.0.236/trunk@219020 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 23:54:10 +00:00
jwalden%mit.edu
3129d5bf52 Bug 368211 - Pretty generated directory listings for directories not containing index.html in the JS HTTP server. r=sayrer
git-svn-id: svn://10.0.0.236/trunk@219019 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 23:48:34 +00:00
jwatt%jwatt.org
bd7595ddd7 Fixing bug 267664. SVG <a> element hack is painfully broken - implement it properly. r=tor@acm.org, sr=jonas@sicking.cc
git-svn-id: svn://10.0.0.236/trunk@219018 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 23:45:15 +00:00
scott%scott-macgregor.org
934feb1011 Bug #368233 --> The account wizard should support generic attributes from ISP RDF Files. Make copyObjectToInterface fall back to setting properties as generic attributes on the xpconnect object. sr=neil
git-svn-id: svn://10.0.0.236/trunk@219017 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 22:27:40 +00:00
neil%parkwaycc.co.uk
e1b2bee879 Fix stupid typo in bug 333145 that broke the offline checkbox r+sr=jag
git-svn-id: svn://10.0.0.236/trunk@219014 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 22:17:25 +00:00
brendan%mozilla.org
cfaea67163 Do not strip format control characters from source (274152, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@219013 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 22:13:39 +00:00
ghendricks%novell.com
e3455ff777 Forgot to filter the saved search in the footer.
git-svn-id: svn://10.0.0.236/trunk@219012 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 22:10:43 +00:00
scott%scott-macgregor.org
a1a563ce0e Bug #300670 --> improve the wording of the en-us string for sending login information. sr=bienvenu a=mscott
git-svn-id: svn://10.0.0.236/trunk@219011 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 21:41:18 +00:00
stridey%gmail.com
0c410b36ac Camino only - Bug 358689: Offer user the choice to restore window state after a crash. Patch by Sean Murphy <camino@seanmurph.com>. r=smorgan sr=pink
git-svn-id: svn://10.0.0.236/trunk@219004 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 20:58:27 +00:00
mats.palmgren%bredband.net
ecd4f80e37 Add a "Copy" context menu item that copies pref name and value in about:config list. b=239940 (part 1) r+sr=neil@httl.net
git-svn-id: svn://10.0.0.236/trunk@219003 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 20:51:12 +00:00
scott%scott-macgregor.org
a92c7d003d Bug #355064 --> thunderbird's inline spell checker should use InlineSpellCheckUI instead of the older InlineSpellCheck interface. No one is now using editorInlineSpellCheck.js so remove it from the tree.
sr=neil


git-svn-id: svn://10.0.0.236/trunk@219002 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 20:40:15 +00:00
stridey%gmail.com
c2286eb9a3 Camino only - Bug 344982: Fix and expose 'Enable plug-ins' preference. Patch by Chris Lawson <bugzilla@chrislawson.net> r=kreeger sr=smorgan
git-svn-id: svn://10.0.0.236/trunk@218998 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 20:13:20 +00:00
stridey%gmail.com
f69a558f04 Camino only - Bug 309874: Truncate long titles nicely (middle-truncate, using all of the window's available space). r=smorgan sr=pink
git-svn-id: svn://10.0.0.236/trunk@218994 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 19:46:53 +00:00
nelson%bolyard.com
33f725c53c Re-enable mangle test with offset of EOF - 8. Bug 193386.
git-svn-id: svn://10.0.0.236/trunk@218993 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 19:44:35 +00:00
despotdaemon
944e849275 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@218990 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 19:40:32 +00:00
nelson%bolyard.com
a149fb286f Bug 193386. Add ability to seek to negative offset from EOF.
r=slavo.katuscak,glen.beasley


git-svn-id: svn://10.0.0.236/trunk@218989 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 19:38:05 +00:00
despotdaemon
ed8c651127 Pseudo-automatic update of changes made by mark.finkle@gmail.com.
git-svn-id: svn://10.0.0.236/trunk@218988 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 19:24:40 +00:00
despotdaemon
264188f398 Pseudo-automatic update of changes made by jresig@mozilla.com.
git-svn-id: svn://10.0.0.236/trunk@218987 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 19:21:52 +00:00
sayrer%gmail.com
b9189b7da5 Bug 364043. Remove dependency on Python for HTTP server to serve mochitests. Patch by Jeff Walden <jwalden+bmo@mit.edu> and Robert Sayre <sayrer@gmail.com>. r=rcampbell
git-svn-id: svn://10.0.0.236/trunk@218985 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 18:44:58 +00:00
sayrer%gmail.com
6d5c506cc2 Remove the MochiKit tests since they have moved to the new server
git-svn-id: svn://10.0.0.236/trunk@218984 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 18:43:55 +00:00
despotdaemon
86fbab5556 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@218983 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 18:30:25 +00:00
mats.palmgren%bredband.net
03e5d2c51b Reset 'mAltDC' when we finish Print Preview. b=365578 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@218982 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 18:26:00 +00:00
mats.palmgren%bredband.net
55f98b4f2e Impose the limits on final image size in two more places. b=367740 r+sr=pavlov
git-svn-id: svn://10.0.0.236/trunk@218981 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 18:12:58 +00:00
mozilla.BenB%bucksch.org
9673718d6d Quota display: Lotus Notes sends quota used = nnn, max = 0 for no quota.
Spec that in IDL, and don't show statudbar quota display.
Bug 368043, r=bienvenu, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@218977 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 17:43:59 +00:00
stridey%gmail.com
0376ff0c73 Camino only - Bug 367206: Remove draggingUpdated implementation from BrowserTabViewItem for performance. r=smorgan sr=pink
git-svn-id: svn://10.0.0.236/trunk@218974 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 17:22:02 +00:00
nrthomas%gmail.com
4f17107a3a Bug 367161, Thunderbird version on the 1.8 branch is now 2.0pre, r=rhelmer
git-svn-id: svn://10.0.0.236/trunk@218973 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 17:18:30 +00:00
enndeakin%sympatico.ca
7d27445686 Bug 367418, improve page up and page down behaviour in trees, r=neil
git-svn-id: svn://10.0.0.236/trunk@218970 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 16:02:43 +00:00
neil%parkwaycc.co.uk
18f7fcfc58 Trunk greLocal installer mistakenly deletes *chardet.dll b=368264 r=ajschult
git-svn-id: svn://10.0.0.236/trunk@218969 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 13:37:54 +00:00
Olli.Pettay%helsinki.fi
2bbd66ee46 Bug 363516, inline message regression, p=aaronr, r=me+surkov
git-svn-id: svn://10.0.0.236/trunk@218968 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 13:30:55 +00:00
dbaron%dbaron.org
913564a03b Merge 368101 with changes from bug 367442.
git-svn-id: svn://10.0.0.236/trunk@218967 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 07:18:55 +00:00
dbaron%dbaron.org
70e19ffc30 Make SVG foreignObject frames reflow roots, instead of their child, so that marking the child dirty still keeps the change constrained to the foreignObject. b=368101 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@218966 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 06:58:31 +00:00
dbaron%dbaron.org
5f472ff247 Fix missed renaming in reftest. b=368158 r=rcampbell
git-svn-id: svn://10.0.0.236/trunk@218965 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 06:56:58 +00:00
cltbld
19bd7612a0 Automated update from host egg.build.mozilla.org
git-svn-id: svn://10.0.0.236/trunk@218964 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 06:51:03 +00:00
dbaron%dbaron.org
76a45da39f Revert configure check for bug 364049, r=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@218963 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 06:47:58 +00:00
dbaron%dbaron.org
a2e9f4177e Remove const that doesn't make any sense. b=364049 r=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@218961 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 06:38:58 +00:00
bzbarsky%mit.edu
d688fc540d Remove assert that happens to not be assertable. Bug 368259, r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218959 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 05:02:31 +00:00
bzbarsky%mit.edu
5848c6cf3c Don't crash if AsyncOpen fails and the OnReadyStateChange handler restarts us.
Bug 366467, r+sr=sicking


git-svn-id: svn://10.0.0.236/trunk@218958 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 04:48:14 +00:00
bzbarsky%mit.edu
52ceba246f Adding test for bug 172261 and bug 301510
git-svn-id: svn://10.0.0.236/trunk@218957 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 04:41:46 +00:00
nelson%bolyard.com
39328ee16b Disable mangle test to make Tinderbox go green again. Bug 193386.
git-svn-id: svn://10.0.0.236/trunk@218956 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 04:39:05 +00:00
bzbarsky%mit.edu
c1c504e712 When going back or forward to wyciwyg pages, make sure to correctly restore
their principal from session history.  Bug 172261 and bug 301510, r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@218955 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 04:37:16 +00:00
bzbarsky%mit.edu
05a7c81642 Get the source scheme from the right URI object. Bug 368160, r+sr=dveditz
git-svn-id: svn://10.0.0.236/trunk@218954 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 04:33:02 +00:00
bzbarsky%mit.edu
c8f72fc674 Make JP_FIRST work with JP_RTC_HZ. Bug 367675, r=dbaron
git-svn-id: svn://10.0.0.236/trunk@218953 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 04:31:57 +00:00
ajschult%verizon.net
91630666b9 Bug 366505: Unable to save a saved search when no there is no folder pane selection, r+sr=mscott
git-svn-id: svn://10.0.0.236/trunk@218951 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 04:26:21 +00:00
rob_strong%exchangecode.com
0b3784ccb8 Bug 333491 – FF installer icon looks bad on Windows Vista. ui-r=beltzner
git-svn-id: svn://10.0.0.236/trunk@218950 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 04:08:12 +00:00
dveditz%cruzio.com
32d01db145 coverity-found potential use-after-free in testcases (bug 334541). r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@218949 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 02:50:18 +00:00
dveditz%cruzio.com
34446d6bcc Need to pass 'rv' status out, bug 368123. r/sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218948 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 02:30:23 +00:00
mattwillis%gmail.com
ba0cb37024 bug 364420: Left-align events on month printout. Patch by Martin Schröder <mschroeder@mozilla.x-home.org>, r1=lilmatt, r2=mvl
git-svn-id: svn://10.0.0.236/trunk@218947 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 01:34:00 +00:00
bienvenu%nventure.com
d0f4dd20b1 add new msg+folder notification service geared more to the needs of desktop search indexers, sr=mscott 290057
git-svn-id: svn://10.0.0.236/trunk@218946 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 01:33:55 +00:00
dbaron%dbaron.org
f109b36a81 Fix bustage merging 367442 and 366956.
git-svn-id: svn://10.0.0.236/trunk@218945 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 01:24:56 +00:00
bienvenu%nventure.com
04ededecb0 add new msg+folder notification service geared more to the needs of desktop search indexers, sr=mscott 290057
git-svn-id: svn://10.0.0.236/trunk@218944 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 01:22:48 +00:00
jst%mozilla.org
bc8b21f33b Attempting to fix crasher bug 367006. Reorder some code to make the GC timer book-keeping reliable. r+sr=jonas@sicking.cc
git-svn-id: svn://10.0.0.236/trunk@218943 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 01:19:31 +00:00
nelson%bolyard.com
8c79a6af0a Open output file in binary mode for writing binary PKCS7 message.
Bug 301496. Patch by Alexei.Volkov, r=nelson


git-svn-id: svn://10.0.0.236/trunk@218942 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 01:15:43 +00:00
dbaron%dbaron.org
d17d88f579 Fix bustage merging 367442 and 366956.
git-svn-id: svn://10.0.0.236/trunk@218941 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 01:10:28 +00:00
bienvenu%nventure.com
f5777ffb11 fix navigation issues from stand-alone message window, sr=mscott 368239
git-svn-id: svn://10.0.0.236/trunk@218939 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 00:55:20 +00:00
scott%scott-macgregor.org
f980c41e5e Bug #368074 --> make the isp directory enumerator smart enough to enumerate over the isp dir in the application directory and in the locale based sub directory instead of making callers do that themselves. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@218937 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 00:34:50 +00:00
vladimir%pobox.com
ee7351be9c b=365001 - dotted/dashed border on tall page causes rect leakage, r=stuart
git-svn-id: svn://10.0.0.236/trunk@218935 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 00:20:57 +00:00
ghendricks%novell.com
220875ac7c Changed the location of the suammary on caseruns so that it was more obvious which row it belongs to.
git-svn-id: svn://10.0.0.236/trunk@218934 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 00:08:34 +00:00
bzbarsky%mit.edu
343ced44ba Make mComputedWidth private, with a getter/setter, and make the setter update
the resize flags.  Bug 367442, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@218933 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-26 00:05:12 +00:00
glen.beasley%sun.com
0596f16735 367910 add pk11mode to fips.sh r=neil williams
git-svn-id: svn://10.0.0.236/trunk@218931 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 23:24:56 +00:00
dbaron%dbaron.org
7cb106739c Fix valgrind warning about writing uninitialized memory to disk cache by not allocating extra size for disk cache entries and then writing the extra word. b=368119 r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@218930 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 23:09:01 +00:00
crowder%fiverocks.com
d939edf204 Bug 355820: Remove non-standard Script object, patch by Brian Crowder crowder@fiverocks.com, r=brendan
git-svn-id: svn://10.0.0.236/trunk@218929 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 23:08:52 +00:00
dbaron%dbaron.org
d9dd451d51 Don't close the same file descriptors twice. b=367817 r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@218927 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 23:05:22 +00:00
ghendricks%novell.com
bd7af4817e Trying to speed up exports
git-svn-id: svn://10.0.0.236/trunk@218926 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 23:03:46 +00:00
aaronr%us.ibm.com
afae69f28e [XForms] Controls should not be allowed to bind to complexContent. Bug 356190, patch by msterlin, r=olli+aaronr
git-svn-id: svn://10.0.0.236/trunk@218925 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 21:25:04 +00:00
gijskruitbosch%gmail.com
02e36dba03 Bug 366337 - implement nsIIdleService on Windows (second attempt)
r=emaijala@kolumbus.fi (Ere Maijala)
sr=neil@parkwaycc.co.uk (Neil Rashbrook)


git-svn-id: svn://10.0.0.236/trunk@218924 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 21:13:32 +00:00
cls%seawood.org
ec12d39aa4 Allow builds to be configured for warning scraping via the main admin page.
Bug #367978 r=bear


git-svn-id: svn://10.0.0.236/trunk@218918 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 20:13:09 +00:00
roc+%cs.cmu.edu
84519adb5e Bug 368154. Don't do bidi resolution on strings unless bidi is enabled in the prescontext. r=smontagu,sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218917 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 19:54:38 +00:00
joshmoz%gmail.com
afc207fd6f stop referring to gecko as raptor, clean up formatting of key code tables. no bug. r=smorgan
git-svn-id: svn://10.0.0.236/trunk@218916 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 19:48:04 +00:00
bugzilla%standard8.demon.co.uk
63f4ba7c14 Bug 361326 Address book directories obtained through RDF aren't always initialised properly (mdb part) r=iann_bugzilla,sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@218914 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 19:44:34 +00:00
bugzilla%arlen.demon.co.uk
e34185daaf Bug 351913 Printer paper format always set to letter for TB/mailnews - further addressbook patch
p=me r=neil sr=mscott


git-svn-id: svn://10.0.0.236/trunk@218913 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 19:43:13 +00:00
joshmoz%gmail.com
68974fa506 submenus shouldn't go off the screen. b=367260 r=cbarrett sr=pav
git-svn-id: svn://10.0.0.236/trunk@218912 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 19:19:48 +00:00
glen.beasley%sun.com
e5ec8eff0d 367910 pk11mode added to build and fips.sh r=neil
git-svn-id: svn://10.0.0.236/trunk@218911 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 19:04:57 +00:00
mozilla.mano%sent.com
7b84683c19 Bug 367989 - metadata about node annotations is no longer set for uri nodes. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218910 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 18:52:15 +00:00
ghendricks%novell.com
ba1909d02f Searching for runs by version is broken
git-svn-id: svn://10.0.0.236/trunk@218909 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 18:10:10 +00:00
enndeakin%sympatico.ca
fd6335c608 Bug 326877, close popups when navigating pages, r+sr=bz
git-svn-id: svn://10.0.0.236/trunk@218908 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 17:59:20 +00:00
mattwillis%gmail.com
4a6911fcbf bug 177109 - use resolveURI instead of newURI when processing command line args. Patch by Sebastian Schwieger <sebastian.schwieger@googlemail.com>, r1=ctalbert, r2=mvl
git-svn-id: svn://10.0.0.236/trunk@218906 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 17:41:30 +00:00
mrbkap%gmail.com
910e573c7b Use a better replacement character. bug 315473, r=bzbarsky sr=sicking
git-svn-id: svn://10.0.0.236/trunk@218905 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 17:30:13 +00:00
sspitzer%mozilla.org
b9beb7498d missing semi-colon, no reviewer.
git-svn-id: svn://10.0.0.236/trunk@218903 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 17:14:50 +00:00
sspitzer%mozilla.org
7d4ddd71c5 fix for bug #367084: updater can fail to apply updates if files have the
"read only" attribute set.

r=bsmedberg


git-svn-id: svn://10.0.0.236/trunk@218902 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 17:14:17 +00:00
daniel.boelzle%sun.com
6ff8931df8 Bug 340949: major rework of the whole wcap provider with async request framework, subscription support
git-svn-id: svn://10.0.0.236/trunk@218901 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 16:02:45 +00:00
mkanat%bugzilla.org
2be916ba20 Bug 368147: Upgrade from 2.16 and earlier does not work with DBD::mysql 4.0
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat


git-svn-id: svn://10.0.0.236/trunk@218900 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 15:45:38 +00:00
inonit%inonit.com
bb476f7825 Make sure the files in this directory are not accidentally committed to the tree by misbehaving CVS clients (like the one bundled with NetBeans). Even though the parent directory contains a .cvsignore which ignores this directory, the NetBeans default CVS client refuses to ignore them. (A few tests seem to indicate that NetBeans will not ignore files that are new in directories that actually exist in the repository.)
git-svn-id: svn://10.0.0.236/trunk@218899 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 15:27:48 +00:00
asqueella%gmail.com
319a3d83b4 Bug 356578 - rebranding should affect the name of the executable
patch by O. Atsushi <torisugari@gmail.com>
r=mano, bsmedberg


git-svn-id: svn://10.0.0.236/trunk@218895 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 13:43:52 +00:00
daniel.boelzle%sun.com
dee426960d Bug 357397: adopting to revised wcap API
git-svn-id: svn://10.0.0.236/trunk@218894 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 13:30:20 +00:00
asqueella%gmail.com
e642505be3 The patch for 367275 (previous checkin) was by
Alfred Kayser <alfredkayser@nl.ibm.com>


git-svn-id: svn://10.0.0.236/trunk@218893 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 13:14:24 +00:00
daniel.boelzle%sun.com
0be8779842 Bug 340949: major rework of the whole wcap provider with async request framework, subscription support
git-svn-id: svn://10.0.0.236/trunk@218892 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 13:01:56 +00:00
slavomir.katuscak%sun.com
61edd03fe6 Bug 193386: Patch to fips.sh to use temporary library for mangle test. r=alexei, sr=nelson
git-svn-id: svn://10.0.0.236/trunk@218890 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 12:40:33 +00:00
michael.buettner%sun.com
70a7d75964 bug #360111 dying js context
git-svn-id: svn://10.0.0.236/trunk@218889 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 12:35:43 +00:00
asqueella%gmail.com
839e716f61 fix bug 367275 - download manager file folder icon is black
(regression from 360000)

Only do premultiplication when the 32bit ico really has alpha - move
premultiplication to SetImageData from SetPixel and only premultiply
if mHaveAlpha is true.

The 'premultiplication' function has been copied from libpixman.

r=pavlov


git-svn-id: svn://10.0.0.236/trunk@218888 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 11:39:48 +00:00
asqueella%gmail.com
050a755a27 bug 366113 - mozilla-plugin.pc should not depend on mozilla-xpcom.pc
patch by braden@endoframe.com
r=bsmedberg


git-svn-id: svn://10.0.0.236/trunk@218887 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 11:38:49 +00:00
dbaron%dbaron.org
8eb2065997 Add testcases for visual part of bug 347912.
git-svn-id: svn://10.0.0.236/trunk@218886 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 03:31:14 +00:00
roc+%cs.cmu.edu
dedd4a8dff Bug 361298. Don't allow overlarge custom cursors. r+sr=pavlov
git-svn-id: svn://10.0.0.236/trunk@218882 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 02:17:22 +00:00
dbaron%dbaron.org
f910247453 Make computed style output the a part of rgba/hsla colors, and also implement the 'transparent' keyword from css3-color. b=347912 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@218881 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 02:03:02 +00:00
dbaron%dbaron.org
07b53e788d Reflow reflow roots and the child of SVG foreignObject with an unconstrained height to avoid triggering page/column breaking. b=366956 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@218880 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 02:01:07 +00:00
roc+%cs.cmu.edu
eca770f48f Bug 367930. Introduce an nsIRenderingContext::GetHints flag (temporarily) that tells us whether new-text-runs are being used underneath. When new text runs are in use, never reverse text manually, we can be sure that the platform textrun will do it.
git-svn-id: svn://10.0.0.236/trunk@218879 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 01:58:55 +00:00
vladimir%pobox.com
cf04587984 b=367768, update cairo to 1.3.12 snapshot, clobbering tinderbox to see if it's just not picking up the cairo-rename.h change
git-svn-id: svn://10.0.0.236/trunk@218878 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 01:45:57 +00:00
mrbkap%gmail.com
8ac76f7730 Fix the decompiler's JSOP_GETLOCALPROP to not push an index that's not at the end of the sprint stack. bug 366668, r=brendan
git-svn-id: svn://10.0.0.236/trunk@218877 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 01:32:20 +00:00
mrbkap%gmail.com
e474a95f26 Handle NUL characters in HTML input better. bug 315473, r=jst sr=sicking
git-svn-id: svn://10.0.0.236/trunk@218876 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 01:25:41 +00:00
dbaron%dbaron.org
4bd4c4bb03 Basic instructions.
git-svn-id: svn://10.0.0.236/trunk@218875 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 01:17:28 +00:00
alexei.volkov.bugs%sun.com
23216a4680 Bug 301496: NSS_Shutdown failure in p7sign. r=nelson
git-svn-id: svn://10.0.0.236/trunk@218874 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 00:52:26 +00:00
vladimir%pobox.com
703b7e0cbb b=367768, update cairo to 1.3.12 snapshot, clobbering tinderbox to see if it's just not picking up the cairo-rename.h change
git-svn-id: svn://10.0.0.236/trunk@218873 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 00:44:08 +00:00
vladimir%pobox.com
ad640ecf29 b=367768, update cairo to 1.3.12 snapshot, r=stuart
git-svn-id: svn://10.0.0.236/trunk@218871 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 00:27:34 +00:00
jst%mozilla.org
c1a038763c Landing graydon's fix for bug 366578. Make the cycle collector run at shutdown. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@218870 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 00:24:20 +00:00
jst%mozilla.org
493b3c4f17 Landing graydon's fix for bug 366578. Make the cycle collector run at shutdown.
git-svn-id: svn://10.0.0.236/trunk@218869 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 00:24:08 +00:00
vladimir%pobox.com
a564e3522c b=367768, update cairo to 1.3.12 snapshot, r=stuart
git-svn-id: svn://10.0.0.236/trunk@218868 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-25 00:05:56 +00:00
vladimir%pobox.com
456b16ca0f b=367768, update cairo to 1.3.12 snapshot, r=stuart
git-svn-id: svn://10.0.0.236/trunk@218867 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 23:53:53 +00:00
jst%mozilla.org
39da20afc9 Landing fix for bug 368090. Code cleanup by kevin.heart@gmail.com, r+sr=jst@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@218865 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 23:31:12 +00:00
stridey%gmail.com
e12ac41f2b Camino only - Bug 368096: Landing proper m.o URL string with redirect for improved bookmark backup alert
git-svn-id: svn://10.0.0.236/trunk@218863 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 23:30:31 +00:00
cls%seawood.org
984b110589 Escape the argument being passed to a function via eval.
Bug #359451


git-svn-id: svn://10.0.0.236/trunk@218862 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 23:28:28 +00:00
stridey%gmail.com
2f254f3818 Camino only - Bug 367640: Make Privacy prefpane use 1st person in pref names. r/sr=smorgan
git-svn-id: svn://10.0.0.236/trunk@218860 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 23:19:51 +00:00
joshmoz%gmail.com
5989e3693f Cancelling an onkeydown event doesn't cancel keypress with cocoa widgets. b=367528 r=cbarrett sr=pav
git-svn-id: svn://10.0.0.236/trunk@218859 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 22:49:55 +00:00
ghendricks%novell.com
6d17ad13c1 Synching with rev 2546
git-svn-id: svn://10.0.0.236/trunk@218858 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 22:43:24 +00:00
aaronr%us.ibm.com
ca0b240c25 [XForms] xf:input for xul can't be readonly. Bug 367719, patch by surkov, r=olli+aaronr
git-svn-id: svn://10.0.0.236/trunk@218857 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 22:36:26 +00:00
cls%seawood.org
10f5b5621d Validate the |tree| cgi argument and limit new tree creation to (alphanumeric|.|-) .
Bug #367870 r=bear


git-svn-id: svn://10.0.0.236/trunk@218856 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 22:27:55 +00:00
inonit%inonit.com
16764fecec Fix for #353501: Add Java port of jsDriver.pl; catch some additional failure cases in JUnit test driver
git-svn-id: svn://10.0.0.236/trunk@218855 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 22:15:00 +00:00
richm%stanfordalumni.org
338520afad Resolves: bug 228704
Description: Windows: libldap and the LDAP tools should support SASL/Digest
Fix Description: The biggest change was to hack sasl.m4 to make AC_CHECK_LIB work on Windows.  I
had to override LIBS to be able to pass in /link /LIBPATH:c:/path/to/sasl
libsasl.lib, libsasl2.lib, and sasl32.lib.
Another big change was to implement getlogin() on Windows, required by
ldaptool-sasl.c.  The implementation is pretty simple.
There were several places in the Makefiles that assumed Windows meant no
support for SASL, so I just changed them, and added some support for SASL_LIBS
in some places where it was missing.


git-svn-id: svn://10.0.0.236/trunk@218853 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 20:53:02 +00:00
aaronr%us.ibm.com
9777e3cd46 [XForms] serialization using multipart-post doesn't serialize parts. Bug 353677, patch by msterlin, r=olli+surkov
git-svn-id: svn://10.0.0.236/trunk@218852 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 20:52:50 +00:00
stridey%gmail.com
a6bb204363 Missed string for Bug 364496.
git-svn-id: svn://10.0.0.236/trunk@218851 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 20:46:02 +00:00
stridey%gmail.com
8f42f2c9cc Camino only - Bug 367820 : 'Other' should be 'Select' in the choose download location menu. r=smorgan sr=pink
git-svn-id: svn://10.0.0.236/trunk@218850 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 20:36:08 +00:00
bzbarsky%mit.edu
3c4a12efcd Address review comment I missed. Bug 367749.
git-svn-id: svn://10.0.0.236/trunk@218849 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 20:23:08 +00:00
stridey%gmail.com
9e9cc1b9db Camino only - Bug 364496: Display shinier alert when restoring bookmarks from backup. r=smorgan sr=pink
git-svn-id: svn://10.0.0.236/trunk@218848 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 20:20:07 +00:00
bzbarsky%mit.edu
0ec062328d Fix various bugs in the column iterator's keeping track of the current row.
Bug 367749, r=bernd, sr=roc


git-svn-id: svn://10.0.0.236/trunk@218847 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 20:18:04 +00:00
masayuki%d-toybox.com
ee0b89a844 bug 368081 font-size-adjust broken on windows if the text has non solid color r=pavlov
git-svn-id: svn://10.0.0.236/trunk@218846 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 19:58:47 +00:00
aaronr%us.ibm.com
2ef6350305 [XForms] create spinbutton widget in xforms for use with range controls. Bug 353880, patch by msterlin, r=surkov+aaronr
git-svn-id: svn://10.0.0.236/trunk@218845 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 19:54:42 +00:00
ghendricks%novell.com
86ff891e0d Added printable case view.
git-svn-id: svn://10.0.0.236/trunk@218844 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 19:26:34 +00:00
enndeakin%sympatico.ca
68cf0eb6d5 Bug 367530, textbox.type should just get and set the type attribute, r=neil
git-svn-id: svn://10.0.0.236/trunk@218843 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 18:40:19 +00:00
sayrer%gmail.com
2bb21ff6ea bug 367537. enhancements to httpd.js. add an index handler and respose.write. r=jwalden
git-svn-id: svn://10.0.0.236/trunk@218841 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 16:57:03 +00:00
asqueella%gmail.com
c317a223a6 Bug 367655 - add a null-check of imageRequest.image to fix a regression
patch by Florian Quèze <f.qu@queze.net>
r=mano


git-svn-id: svn://10.0.0.236/trunk@218840 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 16:20:05 +00:00
asqueella%gmail.com
44091f82a4 Bug 361654 - remove unused string configAutoconfigText
patch by Marek A. Stepien <marcoos+bmo@marcoos.org>
r=gavin.sharp, sr=bienvenu, okayed by jminta and mkaply


git-svn-id: svn://10.0.0.236/trunk@218839 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 16:07:30 +00:00
neil%parkwaycc.co.uk
6e84f9369a Reduce mail notification bar's minimum width b=362919 r=IanN (but note that due to bug 367745 the remote image whitelist link underlining doen't currently work)
git-svn-id: svn://10.0.0.236/trunk@218837 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 13:25:30 +00:00
Olli.Pettay%helsinki.fi
6819691424 Adding missing '= 0', Bug 367256, r=neil
git-svn-id: svn://10.0.0.236/trunk@218836 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 11:04:13 +00:00
kieran%eternal.undonet.com
251ade562c Bug 340606 Spell things properly: fix all but file renames.
git-svn-id: svn://10.0.0.236/trunk@218834 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 09:08:35 +00:00
scott%scott-macgregor.org
5faa6f9255 Bug #362919 --> fix wrapping issues with the remote content policy description. Remove unnecessary flex from some of the notification bar elements. sr=neil
git-svn-id: svn://10.0.0.236/trunk@218832 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 02:01:00 +00:00
neil.williams%sun.com
8bd2ddb975 Bug 337519, Certutil/blapitest usage mentions unimplemented curves,r=nelson
git-svn-id: svn://10.0.0.236/trunk@218831 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 01:30:00 +00:00
scott%scott-macgregor.org
5f6909a912 Bug #364123 --> remove references to notifications.js which has gone away.
git-svn-id: svn://10.0.0.236/trunk@218830 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 01:22:04 +00:00
lpsolit%gmail.com
ea660a2700 Bug 363717: Cloning a bug results in HTML-filtered text in initial description (text escaped twice) - Patch by Frédéric Buclin <LpSolit@gmail.com> r=myk a=LpSolit
git-svn-id: svn://10.0.0.236/trunk@218828 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 00:56:31 +00:00
lpsolit%gmail.com
8ff1386a1b Bug 367894: Missing separator after the "Sanity Check" link in the footer when the user has editcomponents privs only - Patch by Frédéric Buclin <LpSolit@gmail.com> r=myk a=LpSolit
git-svn-id: svn://10.0.0.236/trunk@218827 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 00:39:46 +00:00
ghendricks%novell.com
4c2d5adde4 fixed problems in the print report
git-svn-id: svn://10.0.0.236/trunk@218824 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-24 00:01:45 +00:00
igor.bukanov%gmail.com
67e980c0f4 Bug 367481: Patch from Seno.Aiko@gmail.com to rearrange JSContext to reduce code size. r=myself
git-svn-id: svn://10.0.0.236/trunk@218823 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 23:57:36 +00:00
bzbarsky%mit.edu
644d68a116 Make sure we can rely on mDirty being false when the list is not dirty. Bug
367906 , r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@218822 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 23:45:54 +00:00
crowder%fiverocks.com
8127b3f88d Bug 367923: tweak strict warning for variable that redeclares function parameter, patch by Ryan Jones bugs@ryan-jones.com, r=crowder
git-svn-id: svn://10.0.0.236/trunk@218821 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 23:44:39 +00:00
dbaron%dbaron.org
6c36c2815f Remove setTimeout so that we don't call focus on a window that's no longer active once the timeout runs. b=330006 r=gavin
git-svn-id: svn://10.0.0.236/trunk@218820 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 22:56:37 +00:00
dbaron%dbaron.org
5d67fc1ba8 Back out previous fix for bug 330006 due to bug 367927.
git-svn-id: svn://10.0.0.236/trunk@218819 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 22:55:29 +00:00
dbaron%dbaron.org
b0e21aba64 Set time on more events. b=367927 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@218818 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 22:51:38 +00:00
dbaron%dbaron.org
73ebb32115 Correct punctuation in CSS error reports. b=315250 r+sr=bzbarsky.
git-svn-id: svn://10.0.0.236/trunk@218817 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 22:49:49 +00:00
bzbarsky%mit.edu
5791846622 Keep a "last band we touched" cursor so we can avoid seeking through the whole
linked list for multiple appends to the end.  Bug 270392, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@218816 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 21:42:41 +00:00
timeless%mozdev.org
01735de781 Bug 365943 nsIScriptError comment is wrong
r=bz sr=bz


git-svn-id: svn://10.0.0.236/trunk@218815 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 21:18:04 +00:00
bugzilla%arlen.demon.co.uk
074d3a377f Bug 351913 Printer paper format always set to letter on TB/Mailnews
p=me r=neil sr=mscott


git-svn-id: svn://10.0.0.236/trunk@218814 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 19:48:00 +00:00
cls%seawood.org
b2f3f4d7e5 Add option to mail $FailedBuildAdministrator upon initial build failure.
Bug #206665 r=preed


git-svn-id: svn://10.0.0.236/trunk@218813 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 19:38:47 +00:00
reed%reedloden.com
917eb83216 Bug 367679 - "Usability changes to new attachment table" [p=reed r=LpSolit a=LpSolit]
git-svn-id: svn://10.0.0.236/trunk@218812 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 19:04:27 +00:00
ghendricks%novell.com
48cfe8e7e5 fixed a bug where cloning a case copies the components multiple times.
git-svn-id: svn://10.0.0.236/trunk@218811 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 18:55:36 +00:00
cls%seawood.org
cccd4baa03 Add 'use strict;' to expose globals.
Remove uses of global $tree & $form.
Remove tabs from showbuilds.pl
Bug #359451 r=bear


git-svn-id: svn://10.0.0.236/trunk@218810 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 17:49:10 +00:00
ghendricks%novell.com
9846ef3808 Added printable plan report
git-svn-id: svn://10.0.0.236/trunk@218809 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 17:14:44 +00:00
mattwillis%gmail.com
c4f915e4b8 Tinders were building from SUNBIRD_0_3_RELEASE rather than SUNBIRD_0_3_BRANCH
git-svn-id: svn://10.0.0.236/trunk@218808 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 15:15:30 +00:00
mattwillis%gmail.com
de648815d7 Respinning to get useable nightly
git-svn-id: svn://10.0.0.236/trunk@218806 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 14:01:24 +00:00
neil%parkwaycc.co.uk
0bc2022a15 Bug 365362 msgHdrSink's properties is null r=mscott
git-svn-id: svn://10.0.0.236/trunk@218804 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 13:56:00 +00:00
anton.bobrov%sun.com
273855b39c oneliner: use COMPONENT_FTP_SERVER var instead of redundant ftp-rel name.
git-svn-id: svn://10.0.0.236/trunk@218801 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 10:40:07 +00:00
roc+%cs.cmu.edu
ca403c58c1 Bug 333659. (Re)landing gfx changes: new gfxTextRun interfaces, implementation of gfxPangoTextRun, stub implementations for Mac and Windows, nsThebesRenderingContext reimplemented on top of the new interfaces. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@218799 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 08:45:52 +00:00
ginn.chen%sun.com
b3a1d3999c Bug 367434 – Many labels do not have the LABEL_FOR relation set
patch by Evan.Yan at sun.com r=mscott a=mscott


git-svn-id: svn://10.0.0.236/trunk@218798 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 08:31:55 +00:00
ginn.chen%sun.com
afee61e22e Bug 367154 – Thunderbird crashed [@ nsXULTreeAccessibleWrap::GetChildCount] when I mouse clicked on the trash folder in the folders tree table
patch by Evan.Yan at sun.com r=aaronleventhal


git-svn-id: svn://10.0.0.236/trunk@218797 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 08:27:16 +00:00
Olli.Pettay%helsinki.fi
5cf7b7c2d2 Bug 361997, Keyboard navigation problems with date picker, p=surkov, r=aaronr,me
git-svn-id: svn://10.0.0.236/trunk@218796 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 08:27:00 +00:00
Olli.Pettay%helsinki.fi
506d091582 Bug 367256, Expose datatype object attribute, p=surkov, r=aaronr, aaronl, me
git-svn-id: svn://10.0.0.236/trunk@218795 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 07:43:18 +00:00
Olli.Pettay%helsinki.fi
3194bd9145 Bug 329126, Remove nsIEventListenerManager::CreateEvent, r=aaronl, r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@218794 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 07:32:34 +00:00
stridey%gmail.com
f8a6047041 Camino/SeaMonkey only - Bug 353917: Fix MoCo text in xpfe about:license. Patch by Smokey Ardisson <alqahira@ardisson.org> r=CTho sr=neil a=CTho
git-svn-id: svn://10.0.0.236/trunk@218793 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 07:28:46 +00:00
alfred.peng%sun.com
191e606b96 Bug 261468. SpiderMonkey LiveConnect calls free() instead of JS_smprintf_free(), problem with static linking.
r=brendan,sr=jst.


git-svn-id: svn://10.0.0.236/trunk@218791 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 05:28:31 +00:00
bzbarsky%mit.edu
401c0a4274 Shut down the textrun cache on shutdown. Bug 357779, r=vlad, sr=roc
git-svn-id: svn://10.0.0.236/trunk@218790 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 05:24:21 +00:00
dbaron%dbaron.org
103e95ab15 Change the bulk of ascent (baseline) computation to happen on a virtual method on nsIFrame, and remove the redundant descent member from nsHTMLReflowMetrics, primarily to support having both first-line and last-line baselines. b=367332 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@218785 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 04:06:56 +00:00
dbaron%dbaron.org
99df522954 Give inline-blocks NS_BLOCK_SPACE_MGR and NS_BLOCK_MARGIN_ROOT. b=367504 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@218784 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 03:53:46 +00:00
roc+%cs.cmu.edu
1534bcd542 Bug 333659. Land layout changes to pass only single-direction textruns to nsIRenderingContext string methods. r=dbaron
git-svn-id: svn://10.0.0.236/trunk@218782 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 02:58:55 +00:00
szegedia%freemail.hu
ac121313c4 Fix for #367385 and #333168 defineClass's inheritance mapping is broken for abstract class subclasses
git-svn-id: svn://10.0.0.236/trunk@218781 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 02:21:35 +00:00
szegedia%freemail.hu
7582972942 Fix for #366550 Ð increment and decrement operators don't work for global vars with dynamic scopes (patch by Hannes Wallnoefer)
git-svn-id: svn://10.0.0.236/trunk@218780 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 02:14:24 +00:00
szegedia%freemail.hu
dd77731ad6 Fix for #366550 Ð increment and decrement operators don't work for global vars with dynamic scopes
git-svn-id: svn://10.0.0.236/trunk@218779 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 02:10:13 +00:00
despotdaemon
d06f06d64c Pseudo-automatic update of changes made by szegedia@freemail.hu.
git-svn-id: svn://10.0.0.236/trunk@218778 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 01:42:29 +00:00
mattwillis%gmail.com
3bb113dc3a Moving Sunbird trunk tinderboxes to use SUNBIRD_0_3_BRANCH for the upcoming 0.3.1 maintenance release
git-svn-id: svn://10.0.0.236/trunk@218777 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 01:24:09 +00:00
sayrer%gmail.com
c35a6ec1ea Bug 366993. HTML doctype should always be capitalized. r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@218776 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 01:16:27 +00:00
mattwillis%gmail.com
e96136c5cc Moving Sunbird trunk tinderboxes to use SUNBIRD_0_3_BRANCH for the upcoming 0.3.1 maintenance release
git-svn-id: svn://10.0.0.236/trunk@218775 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 01:12:00 +00:00
sayrer%gmail.com
077ad22815 Bug 367548. Add global convenience methods to check the version of Mac OS X at runtime. Patch by Colin Barrett <cbarrett@mozilla.com>. r=josh, sr=stuart
git-svn-id: svn://10.0.0.236/trunk@218774 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 01:06:42 +00:00
mattwillis%gmail.com
986ddd2b07 Moving Sunbird trunk tinderboxes to use SUNBIRD_0_3_BRANCH for the upcoming 0.3.1 maintenance release
git-svn-id: svn://10.0.0.236/trunk@218773 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 00:58:00 +00:00
jst%mozilla.org
b35900c08f Fixing bug 287112. Make atob() report the right exception on invalid characters in the input. r+sr=jonas@sicking.cc
git-svn-id: svn://10.0.0.236/trunk@218772 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 00:48:02 +00:00
mattwillis%gmail.com
5e6536d39d Moving Sunbird trunk tinderboxes to use SUNBIRD_0_3_BRANCH for the upcoming 0.3.1 maintenance release
git-svn-id: svn://10.0.0.236/trunk@218771 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 00:47:45 +00:00
preed%mozilla.com
cc343ff6be Bug 366650: patcher2 should use license and updateType settings; Fixes errors where you don't have a licenseUrl defined (popped the following assertion: ASSERT: SubstitutePath() called with null path at line 353.); always defines $updateType, even if it's not defined. write_patch_info(), which is the consumer of this data, can handle undef, but the rest of the app has troubles w/ that. r=rhelmer.
git-svn-id: svn://10.0.0.236/trunk@218770 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 00:45:01 +00:00
martijn.martijn%gmail.com
3d266983e1 Bug 366119 – Mingw build error in nsCycleCollector.cpp, r=graydon, sr=jst
git-svn-id: svn://10.0.0.236/trunk@218769 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 00:39:25 +00:00
martijn.martijn%gmail.com
0610c629a5 Bug 363934 – keyboard tab bar navigation broken, r=gavin, sr=neil
git-svn-id: svn://10.0.0.236/trunk@218768 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-23 00:32:20 +00:00
jwatt%jwatt.org
6234d3bd9c add missing define. r=roc (no bug)
git-svn-id: svn://10.0.0.236/trunk@218767 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 23:51:15 +00:00
rhelmer%mozilla.com
db3417844c fixes for l10n tagging r=preed b=366850
git-svn-id: svn://10.0.0.236/trunk@218765 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 23:39:27 +00:00
jwatt%jwatt.org
30e523b4a4 fix typo. r=stuart (no bug)
git-svn-id: svn://10.0.0.236/trunk@218764 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 23:25:41 +00:00
tor%cs.brown.edu
cdbb86525a Bug 367557 - correct filter/pattern surface refcount. r=vlad, sr=roc
git-svn-id: svn://10.0.0.236/trunk@218763 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 23:19:54 +00:00
pedemont%us.ibm.com
132c088151 Add missing underscore
git-svn-id: svn://10.0.0.236/trunk@218761 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 21:46:02 +00:00
despotdaemon
df4426771a Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218760 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 21:07:19 +00:00
despotdaemon
af086c9aaf Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218759 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 21:06:13 +00:00
despotdaemon
efa8367f82 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218758 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 20:56:09 +00:00
despotdaemon
8b454448de Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218757 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 20:52:05 +00:00
despotdaemon
89c31e98f4 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218756 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 20:51:19 +00:00
despotdaemon
94bfb8c5a6 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218755 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 20:50:23 +00:00
brendan%mozilla.org
7070e73e05 Oops.
git-svn-id: svn://10.0.0.236/trunk@218754 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 20:30:10 +00:00
brendan%mozilla.org
8902da5988 Fix 367589, a=dveditz.
git-svn-id: svn://10.0.0.236/trunk@218753 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 20:30:09 +00:00
enndeakin%sympatico.ca
4c5395310f Bug 364396, native theming for dropmarker in Cocoa, r=josh
git-svn-id: svn://10.0.0.236/trunk@218752 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 19:54:36 +00:00
scott%scott-macgregor.org
d03b9b8745 icon update from arvid. sr=me
git-svn-id: svn://10.0.0.236/trunk@218751 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 19:25:28 +00:00
pedemont%us.ibm.com
3bf5c11d13 Remove duplicate lines
git-svn-id: svn://10.0.0.236/trunk@218750 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 19:23:05 +00:00
tor%cs.brown.edu
afe6ec6f03 Bug 367416 - thebes API additions needed for nsSVGPathGeometryFrame
conversion.  r=vlad


git-svn-id: svn://10.0.0.236/trunk@218749 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 18:14:47 +00:00
crowder%fiverocks.com
537c977aac Bug 367743: memory leak in AddCharsToURI (jsstr.c) - patch by Gavin Reaney gavin@picsel.com, r=crowder
git-svn-id: svn://10.0.0.236/trunk@218748 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 17:13:23 +00:00
ccooper%deadsquid.com
5a5d3289ca - fix faulty timestamp instructions
git-svn-id: svn://10.0.0.236/trunk@218747 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 16:01:10 +00:00
ccooper%deadsquid.com
a07b441cd9 - fix faulty tiemstamp instructions
git-svn-id: svn://10.0.0.236/trunk@218746 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 15:56:28 +00:00
edburns%acm.org
6c952371fa M webclient/build-tests.xml
- re-enable all tests, but CurrentPageTest is currently hanging.

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/EventRegistrationImpl.java

- Use new "runUntilEventOfType" method to prevent deadlock when creating a new 
  window.

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/NativeEventThread.java

- extract doEventLoopOnce() method from run()

- create new method runUntilEventOfType().

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/WindowControlImpl.java

- convert anonymous inner class for WCRunnable.nativeRealize into
  non-anonymous inner class of WindowControlImpl

M webclient/test/automated/src/classes/org/mozilla/webclient/WindowCreatorTest.java

- Make sure to realize the new window on the main thread.


git-svn-id: svn://10.0.0.236/trunk@218745 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 12:35:14 +00:00
longsonr%gmail.com
ffd76c83a3 Bug 367209 - getBBox() returns ((0,0), (0,0)) on two point polyline. r+sr=tor
git-svn-id: svn://10.0.0.236/trunk@218744 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 10:04:29 +00:00
bugreport%peshkin.net
aea02f35f8 Bug 366243: Permit boolean searches of creation date and last changed date to use relative dates
Patch by Joel Peshkin <bugreport@peshkin.net>
r,a=justdave


git-svn-id: svn://10.0.0.236/trunk@218743 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 04:49:35 +00:00
bzbarsky%mit.edu
eb4e268436 Fix build bustage. Bug 367587
git-svn-id: svn://10.0.0.236/trunk@218742 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 04:41:06 +00:00
bzbarsky%mit.edu
3de9b82869 Make it possible for callers who want to iterate all the row groups and
GetMapFor() for all of them do so in about O(N) time instead of O(N^2) (in
number of row groups).  Bug 366892, r=bernd, sr=roc


git-svn-id: svn://10.0.0.236/trunk@218741 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 04:35:25 +00:00
rhelmer%mozilla.com
a8623beaf1 remove undeclared var errors introduced by previous patch
git-svn-id: svn://10.0.0.236/trunk@218740 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 04:34:43 +00:00
bzbarsky%mit.edu
0b6146e808 Have a faster way of iterating down the columns of a table. Bug 352461,
r=bernd, sr=roc


git-svn-id: svn://10.0.0.236/trunk@218739 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 04:32:33 +00:00
bzbarsky%mit.edu
ba27ed1b22 Remove some redundant (but not quite identical, hence asserting) logic. Bug
367587, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@218738 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 04:29:35 +00:00
bzbarsky%mit.edu
d9d0d2a935 Don't do XUL collapsing stuff with HTML text inputs or HTML scrollframes. Bug
335628, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@218737 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 04:27:31 +00:00
bzbarsky%mit.edu
07c77ee36e Filter out entries for files in subdirectories even at the root. Bug 367459,
patch by Alfred Kayser <alfredkayser@nl.ibm.com>, r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@218736 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 01:47:50 +00:00
timeless%mozdev.org
ceb7f4876c Bug 333172 minVersion should be a fixed number, don't link against layout for DOM Inspector
patch by comrade693+bmo@gmail.com r=jminta, r=neil, r=gavin, sr=neil


git-svn-id: svn://10.0.0.236/trunk@218735 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 01:02:49 +00:00
mozilla.mano%sent.com
ee5665e3e2 Bug 367293 - Change 'Open in Tabs' to 'Open All in Tabs' (places-bookmarks builds). r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218734 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-22 00:16:57 +00:00
mozilla.mano%sent.com
243ca798e3 Bug 367025 - 'Bookmark All Tabs' command is always enabled in places-bookmarks builds. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218733 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 23:31:39 +00:00
mozilla.mano%sent.com
7c0426bca4 Bug 367187 - Places context menu fx2-parity. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218732 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 23:22:52 +00:00
reed%reedloden.com
16ae70796b Bug 367283 - "weekly query in reporter fails" [p=reed r=justdave]
git-svn-id: svn://10.0.0.236/trunk@218731 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 23:04:18 +00:00
neil%parkwaycc.co.uk
37730cc871 Bug 366887 Stylesheet switcher should use DOM style set methods r=bz,IanN sr=bz
git-svn-id: svn://10.0.0.236/trunk@218729 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 21:08:33 +00:00
cst%yecc.com
941dbe1f6a Bug 367461 Tab Preview Should Be Disabled for Current Tab
r+sr=neil


git-svn-id: svn://10.0.0.236/trunk@218726 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 20:36:58 +00:00
bzbarsky%mit.edu
79e5cd32d2 Documenting bug.
git-svn-id: svn://10.0.0.236/trunk@218725 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 20:12:28 +00:00
bugzilla%standard8.demon.co.uk
fa386391fe Bug 361326 Address book directories obtained through RDF aren't always initialised properly (ldap part) r=iann_bugzilla,sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@218724 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 18:49:58 +00:00
stuart.morgan%alumni.case.edu
f049d42f80 Camino only - Bug 366996: Select word on right click only when there is no selection. r=murph sr=pink
git-svn-id: svn://10.0.0.236/trunk@218723 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 18:14:21 +00:00
stuart.morgan%alumni.case.edu
4ac415a421 Camino only - Bug 365323: Punycode non-ASCII domains for RSS handoff. r=kreeger sr=pink
git-svn-id: svn://10.0.0.236/trunk@218722 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 18:04:17 +00:00
bmlk%gmx.de
66cba9f983 Stronger band-aid to prevent table splitting inside columns bug 362275 r/sr=roc
git-svn-id: svn://10.0.0.236/trunk@218721 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 17:51:33 +00:00
ajschult%verizon.net
1bdee19f15 Bug 367607: URL bar autocomplete stops working sometimes after hovering over a search engine. r+sr=Neil
git-svn-id: svn://10.0.0.236/trunk@218720 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 17:16:13 +00:00
lpsolit%gmail.com
177b105102 Bug 367654: Param('upgrade_notification') eq 'development_snapshot' should catch release candidates too if no development snapshot is available - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
git-svn-id: svn://10.0.0.236/trunk@218719 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 16:04:56 +00:00
inonit%inonit.com
4c51191cc4 Partial fix for bug #224334: implements __defineGetter__ and __defineSetter__.
git-svn-id: svn://10.0.0.236/trunk@218718 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 15:28:18 +00:00
olav%bkor.dhs.org
1271606ad2 Bug 367649: Deleting an attachment should set isobsolete to 1
Patch by Olav Vitters <olav@bkor.dhs.org> r=LpSolit a=LpSolit


git-svn-id: svn://10.0.0.236/trunk@218717 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 15:11:52 +00:00
lpsolit%gmail.com
faf77a2be7 Bug 365247: New UI for the attachment table (ported from b.m.o) - Patch by Frédéric Buclin <LpSolit@gmail.com> (UI proposed by Mike Connor <mconnor@mozilla.com>) r=bkor a=LpSolit
git-svn-id: svn://10.0.0.236/trunk@218716 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 14:11:14 +00:00
neil%parkwaycc.co.uk
31658f42c2 Javascript -> JavaScript b=367638 p=sdwilsh r+sr=me
git-svn-id: svn://10.0.0.236/trunk@218715 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 10:58:53 +00:00
mozilla.mano%sent.com
0dbba04852 Bug 367622 - No scrollbar in source selection when the findbar is open. r=gavin
git-svn-id: svn://10.0.0.236/trunk@218714 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-21 03:34:59 +00:00
brendan%mozilla.org
8ad05a04be Handle slot-and-setter-less read-write nonsense state; compatibility requires it (367589, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@218712 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 22:56:50 +00:00
mnyromyr%tprac.de
262681fa30 Bug 366367: SeaMonkey link on mailnews start page incorrect in suiterunner; p=Bruno 'Aqualon' Escherl <aqualon@aquachan.de>, r=KaiRo, sr=neil
git-svn-id: svn://10.0.0.236/trunk@218711 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 20:45:38 +00:00
wtchang%redhat.com
ed53ac652d Bug 362768: implemented NSPR shared library finalization function for AIX.
r=nelsonb
Modified files: pr/src/Makefile.in ptthread.c


git-svn-id: svn://10.0.0.236/trunk@218709 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 20:27:53 +00:00
sharparrow1%yahoo.com
3c3ce02c7e Bug 325070: Allow accessibility to build without ATL/MFC (i.e. with VC8 Express). r=surkov.alexander, sr=neil
git-svn-id: svn://10.0.0.236/trunk@218707 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 12:43:08 +00:00
gijskruitbosch%gmail.com
96906ed369 Bug 362478 - Thunderbird win32 tinderbox shouldn't build with winver 0x400
r=rhelmer@mozilla.com (Robert Helmer)
sr=mscott@mozilla.com (Scott MacGregor)


git-svn-id: svn://10.0.0.236/trunk@218706 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 12:23:42 +00:00
bugzilla%standard8.demon.co.uk
1890fe141a Bug 363491 Stop suiterunner builds needing to build in xpfe/global (patch v6a - move inclusion of some chrome files from xpfe/global to suite) r=KaiRo,sr=Neil
git-svn-id: svn://10.0.0.236/trunk@218705 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 09:27:45 +00:00
bzbarsky%mit.edu
c7c9ba171d Add utility methods for dispatching key events. Bug 367569, r=sayrer.
git-svn-id: svn://10.0.0.236/trunk@218704 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 05:45:10 +00:00
bzbarsky%mit.edu
a5a1302409 Fix --enable-tests builds -- need to link to zlib. r=vlad
git-svn-id: svn://10.0.0.236/trunk@218703 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 05:37:50 +00:00
ajschult%verizon.net
17c2991305 Bug 234710: Part II: build config change and remove embedding/components/jsconsole entirely. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@218702 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 05:33:09 +00:00
ajschult%verizon.net
7c7a63391c Bug 234710: Part II: build config change and remove embedding/components/jsconsole entirely. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@218701 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 04:59:01 +00:00
ajschult%verizon.net
0757b27304 Bug 234710: Part II: build config change and remove embedding/components/jsconsole entirely. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@218700 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 04:52:14 +00:00
ajschult%verizon.net
f12e30d5b2 Bug 234710: Part II: build config change and remove embedding/components/jsconsole entirely. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@218699 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 04:49:33 +00:00
ajschult%verizon.net
4ca864f47a Bug 243170: Remove javascript: url functionality to open JS(error) console. r=brendan, sr=bzbarsky. r=gavin to drop functionality from firefox and r=neil to drop functionality from seamonkey.
git-svn-id: svn://10.0.0.236/trunk@218698 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 04:42:12 +00:00
bzbarsky%mit.edu
68ac484b75 Adding some more tests.
git-svn-id: svn://10.0.0.236/trunk@218697 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 04:29:02 +00:00
despotdaemon
e902e78ce3 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@218695 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 02:47:07 +00:00
brendan%mozilla.org
4e8eacd57b Remove unused NATIVE_SET.
git-svn-id: svn://10.0.0.236/trunk@218693 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 02:38:10 +00:00
sspitzer%mozilla.org
00ca127988 supplimental fix for bug #364599: some newly created profile files are write protected, for example bookmarks.html
in addtion to fixing the permissions of bookmarks.html, we need to fix the permissions of the bookmark.html.moztmp file, otherwise we'll still fail to modify bookmarks.

r=dveditz


git-svn-id: svn://10.0.0.236/trunk@218692 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 01:28:33 +00:00
bzbarsky%mit.edu
c9bbb1f3ee Don't calculate stuff with dirty lists. Bug 367243, r=mats, sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218691 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-20 01:18:57 +00:00
ghendricks%novell.com
7273b38be1 Fixed some incompatablities with IE and moved some of the search forms around to clean them up.
git-svn-id: svn://10.0.0.236/trunk@218689 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 23:59:09 +00:00
scott%scott-macgregor.org
f6f0951fbd Bug #360814 --> remote content in custom start pages is getting blocked by the content policy manager. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@218688 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 23:32:29 +00:00
vladimir%pobox.com
4867d913ed b=366870 additional build fix for linux/--enable-tests
git-svn-id: svn://10.0.0.236/trunk@218687 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 23:26:19 +00:00
scott%scott-macgregor.org
d83d57d16c Bug 367183 --> preview text contains mail.app message boundary ID because the boundary isn't quoted. Handle unquoted boundaries. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@218686 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 23:25:03 +00:00
aaronr%us.ibm.com
6358cf1f65 [XForms] Some controls should not be allowed to bind to complexContent. Bug 356190, patch by msterlin, r=olli+aaronr
git-svn-id: svn://10.0.0.236/trunk@218683 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 22:22:07 +00:00
despotdaemon
ee6c4eb37a Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218682 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 21:58:32 +00:00
scott%scott-macgregor.org
8af3abf668 Bug #367529 --> unable to load remote images in news, the remote content UI never shows up. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@218681 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 21:46:22 +00:00
inonit%inonit.com
632de6f4e1 Partial fix for bug #224334: implements __defineGetter__ and __defineSetter__.
git-svn-id: svn://10.0.0.236/trunk@218680 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 21:43:49 +00:00
vladimir%pobox.com
35fb7a09e9 b=366870, add font/glyph selection test framework, this time with all the files, r=stuart
git-svn-id: svn://10.0.0.236/trunk@218679 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 21:23:38 +00:00
vladimir%pobox.com
954514305e b=366870, add font/glyph selection test framework, r=stuart
git-svn-id: svn://10.0.0.236/trunk@218678 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 21:15:49 +00:00
joshmoz%gmail.com
ba539dee9a stop apps from hanging for a while on shutdown. allow automated testing tools to work again. b=343033 r=mento
git-svn-id: svn://10.0.0.236/trunk@218677 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 19:21:00 +00:00
igor.bukanov%gmail.com
d88c59522f Bug 367226: JS_THREADED_INTERP can be set through command line. r=brendan
git-svn-id: svn://10.0.0.236/trunk@218676 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 18:33:13 +00:00
despotdaemon
ffcb2213fb Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218675 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 18:19:00 +00:00
despotdaemon
84014d046c Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218674 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 18:18:38 +00:00
bzbarsky%mit.edu
4882ecb439 Make sure to do scrollbar layout if we suppressed it previously, even if we
don't obviously need to do it.  Bug 364762, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@218673 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 18:01:10 +00:00
longsonr%gmail.com
f0f6a5c238 Bug 367102 - put maps in alphabetical order r+sr=tor
git-svn-id: svn://10.0.0.236/trunk@218672 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 15:20:11 +00:00
caillon%redhat.com
aaad529ea4 Bug 367203
Starting with gtk 2.10.7, drags are canceled when the toolkit-private drag
widget is grab-shadowed by another gtk_grab_add call in the application. This is a
necessary fix to avoid "stuck drag" situations when a modal dialog pops up
while a drag is in progress.

Unfortunately, the mozilla dnd implementation does just that - it calls
gtk_grab_add in the nsDragService::GetTargetDragData method. This causes
drags of mesages from the message list to the folder tree in thunderbird
to fail with gtk 2.10.7.

Fortunately, the gtk_grab_add in nsDragService::GetTargetDragData doesn't
seem to have any real purpose - at least the nsDragService code doesn't
make any use of the grabbing, and just removing the grab_add/grab_remove
calls in that function makes dnd work again in thunderbird.

Patch by Matthias Clasen <mclasen@redhat.com>
r=caillon@redhat.com
sr=roc@ocallahan.org


git-svn-id: svn://10.0.0.236/trunk@218671 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 14:59:46 +00:00
longsonr%gmail.com
2b177d0df5 Bug 367103 - speed up feCompositeElement, feComponentTransfer and feTurbulence calculations r=tor,sr=roc
git-svn-id: svn://10.0.0.236/trunk@218670 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 10:03:48 +00:00
rflint%ryanflint.com
840490b0a9 Don't allow users to post blank comments.
git-svn-id: svn://10.0.0.236/trunk@218668 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 09:16:52 +00:00
longsonr%gmail.com
870833659a Bug 367111 - Fix another crash with unrendered foreignObject. r+sr=tor
git-svn-id: svn://10.0.0.236/trunk@218667 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 09:06:13 +00:00
igor.bukanov%gmail.com
cae329a112 Bug 36680: new function to report error using decompiled jsval text. r=brendan
git-svn-id: svn://10.0.0.236/trunk@218666 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 08:37:55 +00:00
despotdaemon
d6df457a7d Pseudo-automatic update of changes made by reed@reedloden.com.
git-svn-id: svn://10.0.0.236/trunk@218665 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 07:08:25 +00:00
despotdaemon
1499ba059a Pseudo-automatic update of changes made by justdave@bugzilla.org.
git-svn-id: svn://10.0.0.236/trunk@218664 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 07:05:32 +00:00
joshmoz%gmail.com
11978a5e40 use small scrollbars in HTML select controls. b=365243 r=smorgan sr=roc
git-svn-id: svn://10.0.0.236/trunk@218663 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 07:03:20 +00:00
stridey%gmail.com
489e13f3ac Camino only - Backing out bug 284554 to fix applescript bustage.
git-svn-id: svn://10.0.0.236/trunk@218662 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 06:31:52 +00:00
justdave%bugzilla.org
7e2783180a Bug 367333: Allow rebuildcvshistory.cgi to rebuild history on a single file from the command line.
r=bear


git-svn-id: svn://10.0.0.236/trunk@218660 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 05:05:35 +00:00
gavin%gavinsharp.com
aef742e8bd Bug 359107: suspected forgery Google TOS refusal renders other choices un-reachable (can't change anti-phishing providers without agreeing to a EULA), patch by Ryan Flint <ryan@ryanflint.com>, r=me, ui-r=beltzner
git-svn-id: svn://10.0.0.236/trunk@218659 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 04:32:31 +00:00
gavin%gavinsharp.com
b94099f90c Bug 366084: Don't let numeric accesskeys conflict with tab switching, patch by Simon Bünzli <zeniko@gmail.com>, r=mats.palmgren, ui-r=beltzner
git-svn-id: svn://10.0.0.236/trunk@218658 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 04:29:19 +00:00
sspitzer%mozilla.org
c9cf6824cd supplimental fix for bug #364599:
Some new created profile files are write protected, for example bookmarks.html and localstore.rdf

OR existing perms with 0600 instead of 0644 and fix some line endings from my first patch.

r=dveditz


git-svn-id: svn://10.0.0.236/trunk@218657 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 03:21:40 +00:00
ginn.chen%sun.com
ef9cde08ee Bug 366500 Crash hitting OK in dialog [@ nsQueryInterface::operator] called from [@ nsAccessible::Shutdown]
patch by Evan.yan at sun.com r=aaronleventhal


git-svn-id: svn://10.0.0.236/trunk@218656 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 03:02:59 +00:00
ginn.chen%sun.com
a5ffc3c60d Bug 366813 [atk]nsDocAccessibleWrap::FireToolkitEvent doesn't deal with EVENT_SHOW/HIDE
r=aaronleventhal


git-svn-id: svn://10.0.0.236/trunk@218655 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 02:57:26 +00:00
bzbarsky%mit.edu
ea0e36c15f Adding regression test.
git-svn-id: svn://10.0.0.236/trunk@218654 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 02:48:44 +00:00
despotdaemon
19a28dc580 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218653 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 02:22:07 +00:00
despotdaemon
dbfa478e70 Pseudo-automatic update of changes made by mike.morgan@oregonstate.edu.
git-svn-id: svn://10.0.0.236/trunk@218652 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 02:16:56 +00:00
despotdaemon
42b62263be Pseudo-automatic update of changes made by mike.morgan@oregonstate.edu.
git-svn-id: svn://10.0.0.236/trunk@218651 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 02:08:02 +00:00
despotdaemon
1d3fbda334 Pseudo-automatic update of changes made by mike.morgan@oregonstate.edu.
git-svn-id: svn://10.0.0.236/trunk@218650 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 02:05:08 +00:00
pavlov%pavlov.net
58f2cac9dd removing old gfx2 code from the tree
git-svn-id: svn://10.0.0.236/trunk@218648 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 01:18:22 +00:00
despotdaemon
43201df5bf Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218647 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 01:05:10 +00:00
ajschult%verizon.net
068cc6e960 Bug 366245: SeaMonkey doesn't write dde server keys to the Windows Registry. Patch by Carlos Une <une.crl@gmail.com>, r=emaijala, sr=neil.
git-svn-id: svn://10.0.0.236/trunk@218646 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 00:15:58 +00:00
jst%mozilla.org
460b970763 Fixing regression bug 364474. Make wrapping of plugin DOM node work even if the underlying plugin wrapping fails. r=josh@mozilla.com, sr=bugmail@sicking.cc
git-svn-id: svn://10.0.0.236/trunk@218645 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-19 00:08:06 +00:00
igor.bukanov%gmail.com
6997abb908 Bug 366975: Allow to allocate new GC things from JSGC_END callback. r=brendan
git-svn-id: svn://10.0.0.236/trunk@218642 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 23:36:41 +00:00
wtchang%redhat.com
4c1b604c75 Bug 363070 : upgraded to NSS 3.11.5 final.
git-svn-id: svn://10.0.0.236/trunk@218638 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 23:25:52 +00:00
neil%parkwaycc.co.uk
4b3507485d Make message compose use toolkit spellcheck UI b=355064 r=IanN,Mnyromyr
git-svn-id: svn://10.0.0.236/trunk@218637 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 23:20:34 +00:00
despotdaemon
8daa56a6fe Pseudo-automatic update of changes made by rflint@ryanflint.com.
git-svn-id: svn://10.0.0.236/trunk@218636 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 23:12:07 +00:00
despotdaemon
19e70aa8eb Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@218635 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 23:09:55 +00:00
despotdaemon
f9bd39e59f Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@218634 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 23:06:06 +00:00
despotdaemon
5e1c6d8b79 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@218630 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 22:53:19 +00:00
gijskruitbosch%gmail.com
2377be57bf Backing out patch for bug 36637, too much red. Sorry.
git-svn-id: svn://10.0.0.236/trunk@218629 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 22:24:26 +00:00
gijskruitbosch%gmail.com
70e1cd19b7 Backing out patch for bug 36637, too much red. Sorry.
git-svn-id: svn://10.0.0.236/trunk@218628 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 22:23:00 +00:00
despotdaemon
fad37cb3c7 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218619 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 21:39:23 +00:00
ghendricks%novell.com
13914e2dce Added large query support to adding a new run.
Added a page size selector to tables.


git-svn-id: svn://10.0.0.236/trunk@218618 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 21:37:24 +00:00
despotdaemon
9ec4911355 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218617 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 21:36:35 +00:00
despotdaemon
10152ef65b Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218616 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 21:34:20 +00:00
despotdaemon
9436de66f6 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218615 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 21:33:28 +00:00
despotdaemon
7a77a57c22 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218614 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 21:32:11 +00:00
pavlov%pavlov.net
f3c7a755c7 removing missed files
git-svn-id: svn://10.0.0.236/trunk@218613 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 21:27:04 +00:00
despotdaemon
cad02ec8c1 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218612 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 21:16:55 +00:00
pavlov%pavlov.net
2163991bfe removing ef. bug 367403.
git-svn-id: svn://10.0.0.236/trunk@218611 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 21:15:37 +00:00
gijskruitbosch%gmail.com
74af600cdb Followup, Bug 366337 - forgot to remove XXX comment. Sorry.
r=emaijala@kolumbus.fi (Ere Maijala)
sr=neil@parkwaycc.co.uk (Neil Rashbrook)


git-svn-id: svn://10.0.0.236/trunk@218610 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 21:13:00 +00:00
gijskruitbosch%gmail.com
f38a76440a Bug 366337 - implement nsIIdleService on Windows
r=emaijala@kolumbus.fi (Ere Maijala)
sr=neil@parkwaycc.co.uk (Neil Rashbrook)


git-svn-id: svn://10.0.0.236/trunk@218609 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 21:08:54 +00:00
pavlov%pavlov.net
cf8cb6ae8f removing perlconnect. bug 366355.
git-svn-id: svn://10.0.0.236/trunk@218608 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 21:04:13 +00:00
despotdaemon
bbbdcc7569 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218607 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 20:59:12 +00:00
bzbarsky%mit.edu
6cc1dd39d7 Adding regression tests.
git-svn-id: svn://10.0.0.236/trunk@218606 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 20:56:03 +00:00
pavlov%pavlov.net
42c6043943 Removing mstone. Bug 367398. Project has moved to http://sourceforge.net/projects/mstone
git-svn-id: svn://10.0.0.236/trunk@218605 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 20:47:47 +00:00
tor%cs.brown.edu
95c0891792 Bug 367357 - fix classinfo for SVGPathSegList. r=jwatt, sr=roc
git-svn-id: svn://10.0.0.236/trunk@218604 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 20:40:36 +00:00
bzbarsky%mit.edu
b73b92dc70 If an exception is thrown, make sure finish() still gets called as needed. r=sayrer
git-svn-id: svn://10.0.0.236/trunk@218601 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 19:30:38 +00:00
bienvenu%nventure.com
35fc1a56c9 fix 350967, sr=mscott, problem adding smtp server if you already have a lot of smtp servers
git-svn-id: svn://10.0.0.236/trunk@218599 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 18:12:53 +00:00
tor%cs.brown.edu
481be7d5f9 Bug 366451 - nsSVGImageFrame not updated when container changes.
r=pavlov, sr=roc


git-svn-id: svn://10.0.0.236/trunk@218597 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 17:46:36 +00:00
tor%cs.brown.edu
dc64171c0a Backout of 367031 due to regressions.
git-svn-id: svn://10.0.0.236/trunk@218596 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 16:52:08 +00:00
despotdaemon
d7c726ba56 Pseudo-automatic update of changes made by diegohcg@gmail.com.
git-svn-id: svn://10.0.0.236/trunk@218594 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 16:03:11 +00:00
bclary%bclary.com
b64271f9e9 JavaScript Test - regression test for bug 355497, by Jesse Ruderman, Seno Aiko
git-svn-id: svn://10.0.0.236/trunk@218591 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 11:31:49 +00:00
bclary%bclary.com
62a291417c JavaScript Test - regression test for bug 363988, by Hein Roehrig, Daniel Veditz, Erik Fabert
git-svn-id: svn://10.0.0.236/trunk@218590 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 11:05:24 +00:00
bclary%bclary.com
c33f1adf5b JavaScript Test - regression test for bug 364017, by Jeff Walden
git-svn-id: svn://10.0.0.236/trunk@218589 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 10:41:55 +00:00
joshmoz%gmail.com
d6701d9321 make sure all headers have an include guard, standardize include guards, remove some unnecessary includes, remove some unnecessary non-cairo code, standardize usage of #import vs. #includes, the rule is now to use #import for Apple frameworks and #include for everything else. b=367273 r=kreeger
git-svn-id: svn://10.0.0.236/trunk@218587 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 06:34:07 +00:00
tony%ponderer.org
1c4e83a4b2 Bug 366645 – Reference to undefined property FIND_TRAILING_DOTS_GLOBAL
patch: remove unused regexes
r=mmchew


git-svn-id: svn://10.0.0.236/trunk@218586 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 05:55:09 +00:00
scott%scott-macgregor.org
c1532889ac Bug #367318 --> qute artwork update from arvid. sr=mscott
git-svn-id: svn://10.0.0.236/trunk@218585 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 05:12:13 +00:00
ccooper%deadsquid.com
4e74b7feda - moving nightly builds to Intel macs
git-svn-id: svn://10.0.0.236/trunk@218583 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 03:17:05 +00:00
preed%mozilla.com
3f4b85b4d4 Bug 366607: MozBuild::Util::RunShellCommand needs some work; some minor cleanup from the last checkin; quell warnings about an undef value in an eq, and chdir() support, and remove the gymnastics we go through to check for and repair old calling conventions; just assert().
git-svn-id: svn://10.0.0.236/trunk@218582 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 03:04:55 +00:00
ccooper%deadsquid.com
d823471401 - moving nightly builds to Intel mac
git-svn-id: svn://10.0.0.236/trunk@218581 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 03:02:51 +00:00
preed%mozilla.com
63c6bbc7c0 Bug 366607: MozBuild::Util::RunShellCommand needs some work; add some documentation, flesh out handling of stdout/stderr, add "bg" support, and clean up the return semantics. r=bsmedberg,rhelmer
git-svn-id: svn://10.0.0.236/trunk@218579 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 01:53:56 +00:00
jst%mozilla.org
80798784a7 Landing Dave Camp's fix for bug 362446. Add quotas to DOM storage. r=enndeakin@sympatico.ca, sr=jst@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@218578 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 01:52:15 +00:00
bryner%brianryner.com
fdc98ba74a Revert to the old behavior of logging the command target's id/anonid. If the command came from a key event, log the key element id separately. Bug 366088, r=marria
git-svn-id: svn://10.0.0.236/trunk@218577 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 01:25:49 +00:00
roc+%cs.cmu.edu
29067fe44b Bug 333659. Relanding nsLineLayout API changes for new text code. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218576 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 01:20:09 +00:00
vladimir%pobox.com
26d9bc6c85 test bustage fix
git-svn-id: svn://10.0.0.236/trunk@218574 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 00:55:53 +00:00
bzbarsky%mit.edu
8674fe9292 Adding regression test.
git-svn-id: svn://10.0.0.236/trunk@218572 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 00:39:02 +00:00
brendan%mozilla.org
f2de9df513 Fix for 362872, r=mrbkap.
git-svn-id: svn://10.0.0.236/trunk@218570 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 00:28:38 +00:00
bzbarsky%mit.edu
4fad01862c Adding regression test.
git-svn-id: svn://10.0.0.236/trunk@218569 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 00:26:29 +00:00
jwatt%jwatt.org
13905dc40f Fixing bug 367031. Implement nsSVGOuterSVGFrame::Get[Pref|Min]Width (at least well enough to get inline SVG in XUL working again). r=dbaron@mozilla.com, sr=tor@acm.org
git-svn-id: svn://10.0.0.236/trunk@218568 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 00:17:35 +00:00
jwalden%mit.edu
79129dd9d2 Add bug 360220 testcase to list of tests (forgotten in initial checkin)
git-svn-id: svn://10.0.0.236/trunk@218567 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-18 00:06:43 +00:00
dbaron%dbaron.org
927d56bf63 Make PushStackMemory never fail to simplify callers, and deCOMtaminate the stack memory API. b=366866 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@218565 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 23:53:47 +00:00
ghendricks%novell.com
24202c46b2 jump to page on show plan was not differentiating between the two tables (case and run).
git-svn-id: svn://10.0.0.236/trunk@218564 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 23:44:17 +00:00
bzbarsky%mit.edu
1c2a9ec997 Fix painting of focus outline for empty <select>s. Bug 362995, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@218561 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 23:17:30 +00:00
alexei.volkov.bugs%sun.com
b5633697ae wrong place for assertions committed in previous revision. fixed now.
git-svn-id: svn://10.0.0.236/trunk@218560 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 23:15:46 +00:00
jwatt%jwatt.org
b094ba4257 Fixing bug 363839. Implement all of SVGPathSegList. Patched by Jeff Schiller <codedread@gmail.com>. r=jwatt@jwatt.org, sr=tor@acm.org
git-svn-id: svn://10.0.0.236/trunk@218559 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 23:14:23 +00:00
mozilla.mano%sent.com
0e2a294e37 Bug 367286 - FAYT is broken. r=gavin.
git-svn-id: svn://10.0.0.236/trunk@218558 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 23:11:35 +00:00
roc+%cs.cmu.edu
633e4df4a0 Bug 363813. When inserting frames into a list of out-of-flow frames, finding the correct position by comparing positions in the content tree doesn't always work, in particular when the frames are for anonymous content. So compare the positions of placeholders in the frame tree, which should always work (if we're careful). r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218557 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 22:48:24 +00:00
vladimir%pobox.com
932b22ba20 bustage fix
git-svn-id: svn://10.0.0.236/trunk@218556 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 22:37:43 +00:00
dbaron%dbaron.org
7d1d28c9e8 Make non-box frames use nsITheme methods concerning size, border, and padding, so that non-boxes with appearance set will obey the platform-specific theme. b=366722 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@218555 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 22:31:07 +00:00
roc+%cs.cmu.edu
d641d76b28 Bug 366001. Remove old reflow batching API, it's not effective or needed. r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@218554 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 22:28:33 +00:00
lpsolit%gmail.com
d32bac5af2 Bug 299405: Attachments don't work if you need to log in again [ Undefined subroutine @ Fh::slice ] - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=justdave
git-svn-id: svn://10.0.0.236/trunk@218553 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 22:27:10 +00:00
vladimir%pobox.com
1ed31ce06e b=361592, fix cairo surface wrapper refcount issues, r=stuart
git-svn-id: svn://10.0.0.236/trunk@218552 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 22:20:16 +00:00
roc+%cs.cmu.edu
08d8b2fc0c Fixing luna bustage, hopefully
git-svn-id: svn://10.0.0.236/trunk@218551 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 22:11:01 +00:00
joe%retrovirus.com
aadca4eec5 Bug 359880
Adds an "aq=t" parameter to Google searches performed from the searchbar
so that Google knows that the search terms may have come from a
suggestion-enabled searchbox.
R=gavin
approval1.8.1.2=dveditz


git-svn-id: svn://10.0.0.236/trunk@218549 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 21:59:30 +00:00
ghendricks%novell.com
5ba63a8893 Added combobox widgets to other environment fields in runs and show_caserun
git-svn-id: svn://10.0.0.236/trunk@218548 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 21:58:12 +00:00
rhelmer%mozilla.com
df519dcc26 better logging, handle key copy, handle contrib-localized b=366850 r=preed
git-svn-id: svn://10.0.0.236/trunk@218547 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 21:56:32 +00:00
Olli.Pettay%helsinki.fi
58b1066809 Bug 358714, fix bad css selector, p=surkov, r=me+aaronr
git-svn-id: svn://10.0.0.236/trunk@218546 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 21:50:04 +00:00
jwalden%mit.edu
e66b9aba90 Fix two bug number typos
git-svn-id: svn://10.0.0.236/trunk@218545 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 21:45:16 +00:00
sayrer%gmail.com
c0e152e2f6 Attempt to fix Camino bustage.
git-svn-id: svn://10.0.0.236/trunk@218544 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 21:40:12 +00:00
roc+%cs.cmu.edu
ae08389d4d Bug 363813. Ensure that floating first-letter frames get inserted in the right place in the list of new floated items. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218543 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 21:20:33 +00:00
bent.mozilla%gmail.com
4ea952927c Bug 366592 - "Add comparison operators to external string API". r=bsmedberg.
git-svn-id: svn://10.0.0.236/trunk@218542 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 21:10:02 +00:00
bent.mozilla%gmail.com
17ce909e89 Bug 367059 - 'Reversed assertion test in PopException ("Uh, no NPP exception to pop!")'. r=josh, sr=roc.
git-svn-id: svn://10.0.0.236/trunk@218541 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 21:06:38 +00:00
anton.bobrov%sun.com
97cf77a912 Removal of suncsdk module as requested by Gervase Markham <gerv@mozilla.org>
git-svn-id: svn://10.0.0.236/trunk@218540 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 20:58:54 +00:00
myk%mozilla.org
7daf209fc3 bug 354449: remove file that is no longer necessary now that it's been copied to nsMicrosummaryService.js on the CVS server; r=gavin on IRC
git-svn-id: svn://10.0.0.236/trunk@218537 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 20:52:51 +00:00
cltbld
5c5c5ef186 Automated update from host egg.build.mozilla.org
git-svn-id: svn://10.0.0.236/trunk@218536 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 20:41:03 +00:00
sayrer%gmail.com
e2b7dea384 Bug 359999. Add an enable-mochitest option. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@218535 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 20:38:57 +00:00
kairo%kairo.at
0dae1978a2 bug 360109 - make suiterunner help use SeaMonkey theme icons, r+sr=Neil
git-svn-id: svn://10.0.0.236/trunk@218534 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 20:36:43 +00:00
roc+%cs.cmu.edu
30f5e5c949 Reland conversion of HaveForcedBreakPosition check to assertion. See if this busts luna. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218533 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 20:31:13 +00:00
benjamin%smedbergs.us
fb293bb854 Bug 354307 - newInterface not freed if nsProxyObject::LockedFind fails, r=timeless
git-svn-id: svn://10.0.0.236/trunk@218532 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 20:18:44 +00:00
benjamin%smedbergs.us
d0bcd8ba71 Bug 367127 - Make mozconfig-find space-safe (e.g. spaces in C:\Documents and Settings\bsmedberg), r=dbaron
git-svn-id: svn://10.0.0.236/trunk@218531 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 20:17:19 +00:00
roc+%cs.cmu.edu
799d1e0d46 Fix subtraction of unsigned values to happen in signed space. NPOB
git-svn-id: svn://10.0.0.236/trunk@218529 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 19:39:05 +00:00
dbaron%dbaron.org
794867888d When possible, distribute min width of colspanning cells so it fits within the pref width of the spanned columns. b=363144 r=bernd sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@218528 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 19:19:50 +00:00
bzbarsky%mit.edu
b9bb9fb2a4 Use the right URI when restoring a page from history. Bug 360511, r=jst, sr=sicking
git-svn-id: svn://10.0.0.236/trunk@218524 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 18:55:35 +00:00
bzbarsky%mit.edu
c709bbabd8 Fix GetLastChildFrame to deal with bidi splitting of inlines. Bug 366967,
r=uri, sr=roc


git-svn-id: svn://10.0.0.236/trunk@218523 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 18:53:11 +00:00
bzbarsky%mit.edu
5c6bc301e6 Fix check for DOMNodeInserted/DOMNodeRemoved event handlers. Bug 367164,
r+sr=sicking


git-svn-id: svn://10.0.0.236/trunk@218522 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 18:47:18 +00:00
wtchang%redhat.com
d84e6b8b15 Bug 329807: define struct _md_sockaddr_in6 because HP-UX's struct
sockaddr_in6 is only 32-bit aligned.  r=nelsonb


git-svn-id: svn://10.0.0.236/trunk@218520 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 18:11:06 +00:00
edburns%acm.org
96654f7479 M logging.properties
- use log level INFO

M webclient/build-tests.xml

- comment out broken tests.  Currently: WindowCreatorTest, CurrentPageTest

M webclient/test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java

- Log INFO for tearDown()


git-svn-id: svn://10.0.0.236/trunk@218519 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 16:20:54 +00:00
kairo%kairo.at
a6c41e062e bug 367239 - use the same ID for SeaMonkey and thunderbird menubar (improves extension compat, including lightning), r+sr=Neil
git-svn-id: svn://10.0.0.236/trunk@218518 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 15:24:41 +00:00
nrthomas%gmail.com
add39b36a9 Bug 367161, Update nagios monitoring config for Thunderbird nightly version change, r pending
git-svn-id: svn://10.0.0.236/trunk@218517 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 15:07:16 +00:00
edburns%acm.org
9f8e8c584b Append is false
git-svn-id: svn://10.0.0.236/trunk@218516 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 13:47:31 +00:00
edburns%acm.org
a3121edc15 M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/NativeEventThread.java
- Use JDK 1.5 ConcurrentLinkedQueue to enable moving the enqueue and
  dequeue operations out of the synchronized block.

- Use a the new "result" property on WCRunnable to convey the result
  from the run() back to the caller.

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/WCRunnable.java

- Make this an abstract class and add a read/write property called
  "result".


git-svn-id: svn://10.0.0.236/trunk@218515 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 13:45:22 +00:00
edburns%acm.org
f80fed1778 add logging
git-svn-id: svn://10.0.0.236/trunk@218514 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 12:59:40 +00:00
bclary%bclary.com
3074d739d5 JavaScript Test - regression test for bug 364104
git-svn-id: svn://10.0.0.236/trunk@218513 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 12:53:44 +00:00
bclary%bclary.com
2f30b76c59 JavaScript Test - regression test for bug 366288, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@218512 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 12:38:42 +00:00
bclary%bclary.com
b7c044789c JavaScript Test - regression test for bug 366292, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@218511 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 12:33:53 +00:00
igor.bukanov%gmail.com
0416c78eac Bug 351739: Patch from Ryan Jones, bugs@ryan-jones.com, to fix memory leak. a=myself
git-svn-id: svn://10.0.0.236/trunk@218510 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 12:27:47 +00:00
bclary%bclary.com
13a70f5ff5 JavaScript Test - regression test for bug 366396, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@218509 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 12:25:43 +00:00
bclary%bclary.com
02f16d9585 JavaScript Test - regression test for bug 366468, by Alex Vincent, Gavin Sharp
git-svn-id: svn://10.0.0.236/trunk@218508 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 12:18:46 +00:00
edburns%acm.org
d0b3db034a M build.properties.sample
- declare compile.source=1.5

M dom/build.xml
M plugins/build.xml
M plugins/examples/MediaPlayer/build.xml
M plugins/test/build.xml
M util/build.xml

- remove compile.source property, take it from top level build.properties

M plugins/mozilla/Makefile.in

- remove hard coded MS_SDK_HOME reference

M util/classes/org/mozilla/util/Log.java

- This class is the home to the LogStrings property for java supplement

M webclient/build-tests.xml

- copy properties file

- turn on logging

M webclient/build.xml

- remove compile.source property, take it from top level build.properties

- set a FILE_PATH_SEP property

- make run.test depend on prepare

- make run.test.browser depend on prepare

M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/BookmarksImpl.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/CocoaBrowserControlCanvas.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/CurrentPageImpl.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/EventRegistrationImpl.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/HistoryImpl.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/NavigationImpl.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/PreferencesImpl.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/RDFEnumeration.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/Win32BrowserControlCanvas.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/WindowControlImpl.java
M webclient/classes_spec/org/mozilla/webclient/impl/wrapper_native/WrapperFactoryImpl.java

- Define toString() for all the WCRunnable and Runnable impls.

M webclient/test/automated/src/classes/org/mozilla/webclient/WebclientTestCase.java

- Some logging.

A util/classes/org/mozilla/LogStrings.properties
A webclient/test/automated/src/classes/org/mozilla/webclient/TestLogStrings.properties

- LogStrings.properties files for tests and core impl

A logging.properties

- Logging settings for java supplement


git-svn-id: svn://10.0.0.236/trunk@218507 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 11:43:43 +00:00
bclary%bclary.com
d3fcdf173a JavaScript Test - regression test for bug 354246, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@218506 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 11:12:49 +00:00
igor.bukanov%gmail.com
144435fa29 Bug 364809: Patch from Seno.Aiko@gmail.com to remove no longer used JSContext.jsop_*. r=myself
git-svn-id: svn://10.0.0.236/trunk@218505 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 11:02:11 +00:00
asqueella%gmail.com
56ffbcca88 Bug 360000 - make 32-bit favicons with transparency work correctly in cairo
p=Alfred Kayser <alfredkayser@nl.ibm.com>, r=pavlov, sr=tor


git-svn-id: svn://10.0.0.236/trunk@218504 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 10:39:10 +00:00
bclary%bclary.com
b9d827acb5 JavaScript Test - regression test for bug 347155, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@218503 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 10:24:24 +00:00
dbaron%dbaron.org
09ccc1e701 Fix error tracking size of circularly linked list of counters, causing mis-sorting. b=367220 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@218502 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 09:24:19 +00:00
asqueella%gmail.com
705a1db410 Bug 342750 NativeUConvService::GetNativeConverter leaks on failure
p=Ryan Jones <bugs@ryan-jones.com>, r=bsmedberg, sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@218501 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 09:18:21 +00:00
ginn.chen%sun.com
9b2517ed7f Bug 363924 atk_bridge_init should not be called twice
r=aaronleventhal


git-svn-id: svn://10.0.0.236/trunk@218500 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 08:39:05 +00:00
roc+%cs.cmu.edu
9490c03f81 Relanding changes to replace local helpers with new nsLayoutUtils versions. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218498 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 08:11:32 +00:00
roc+%cs.cmu.edu
09049cfebe Backout of nsLineLayout changes; trying to fix luna orange
git-svn-id: svn://10.0.0.236/trunk@218497 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 06:27:01 +00:00
dbaron%dbaron.org
b203eeeaa4 Handle padding and border correctly for reflow states constructed without a parent (reflow roots, things inside nsIBoxes). b=366952 r+sr=roc, r=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@218495 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 05:19:35 +00:00
dbaron%dbaron.org
2880d07c87 Fake scrollbar allocation more effectively to trick ClearLooks into drawing correctly rounded buttons. b=336270 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@218494 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 05:17:46 +00:00
dbaron%dbaron.org
5e37eb9b0f Fix potentially uninitialized nsresult return value, regression from deCOMtamination patch. b=330305 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@218493 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 05:16:13 +00:00
roc+%cs.cmu.edu
64d5193436 Bug 333659. Relanding layout/generic/Makefile.in changes that don't affect anything since new textframe is disabled. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218492 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 04:17:14 +00:00
roc+%cs.cmu.edu
75d52f8575 Bug 333659. Relanding new nsLineLayout API to make in-first-line-frame and current-nsLineBox available; should not affect anything. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218491 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 03:59:32 +00:00
roc+%cs.cmu.edu
7bc222b695 Bug 366880. -moz-column-gap should support 'normal', which should be the initial value. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218489 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 03:25:38 +00:00
roc+%cs.cmu.edu
fb4df44272 Fixing bustage
git-svn-id: svn://10.0.0.236/trunk@218488 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 03:03:48 +00:00
roc+%cs.cmu.edu
fc3a408bdb Bug 333659. Relanding new nsTextTransformer::GetCaseConv, should not affect anything. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218487 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 02:58:49 +00:00
jwalden%mit.edu
e680196d3f Bug 366616 - Canvas in XUL is not rendered. Patch by Andrew Miller <ak.miller@auckland.ac.nz>, r=vlad, sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218486 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 02:41:47 +00:00
roc+%cs.cmu.edu
164c104354 Bug 333659. Relanding new nsLayoutUtils APIs --- shouldn't affect current code. r=dbaron
git-svn-id: svn://10.0.0.236/trunk@218485 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 02:37:19 +00:00
roc+%cs.cmu.edu
670f1eb1ce Bug 333659. Relanding new nsLineBreaker class --- shouldn't affect current code. Technically it's part of the build, but it's not used by anyone.
git-svn-id: svn://10.0.0.236/trunk@218484 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 02:35:28 +00:00
roc+%cs.cmu.edu
43955de6af Bug 333659. Relanding minor gfx/thebes changes --- new gfxRect APIs, new gfxSkipChars class, remove gfxContext::DrawTextRun unused method, shouldn't affect current code. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@218483 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 02:31:14 +00:00
roc+%cs.cmu.edu
01eedd14d9 Bug 333659. Relanding nsFont changes --- new BaseEquals API, shouldn't affect current code. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@218482 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 02:16:22 +00:00
roc+%cs.cmu.edu
d64f8b5463 Bug 333659. Relanding intl changes --- new nsILineBreaker API, shouldn't affect current code. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@218481 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 02:14:10 +00:00
brendan%mozilla.org
be1decd240 Tweak comment per wtchang.
git-svn-id: svn://10.0.0.236/trunk@218477 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 00:56:35 +00:00
crowder%fiverocks.com
541fdd7e74 Bug 314874: Function.call/apply pass thisArg.valueOf() as this value when thisArg is not a primitive, r=brendan
git-svn-id: svn://10.0.0.236/trunk@218472 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-17 00:27:36 +00:00
stuart.morgan%alumni.case.edu
6b545712f7 Bug 301152: Don't corrupt Cocoa scrollbars that change during redraw. r=josh r=cl sr=smfr a=jay
git-svn-id: svn://10.0.0.236/trunk@218471 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 23:51:10 +00:00
lpsolit%gmail.com
c2c975c0ea Bug 367077: Big attachments which should be stored locally are not - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wurblzap a=LpSolit
git-svn-id: svn://10.0.0.236/trunk@218466 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 22:50:02 +00:00
joshmoz%gmail.com
944a58b9de clean up comments and includes, part of general effort to clean up native look/feel code. no bug. r=bent
git-svn-id: svn://10.0.0.236/trunk@218462 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 22:43:05 +00:00
roc+%cs.cmu.edu
4f42d74394 Backing out text landing.
git-svn-id: svn://10.0.0.236/trunk@218456 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 22:25:20 +00:00
bienvenu%nventure.com
099eb6f661 fix 347665 opening an imap folder with a very large number of new messages is very slow, patch by samuel@sieb.net, sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@218453 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 21:48:39 +00:00
fligtar%gmail.com
5af1767f0f Escape add-on name for quotes in JavaScript - bug 366868 r=morgamic
git-svn-id: svn://10.0.0.236/trunk@218449 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 21:44:10 +00:00
stuart.morgan%alumni.case.edu
ca7c818ef7 Camino only - Fixes compiler warnings from using 10.4+ API in bug 337750. r/sr=josh
git-svn-id: svn://10.0.0.236/trunk@218448 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 21:39:10 +00:00
roc+%cs.cmu.edu
e2373f9a14 Bug 333659. Landing new text interfaces, new gfxPangoTextRun (enabled), new textframe code (disabled). r+sr=dbaron for the part-of-the-build layout parts,r=stuart for the part-of-the-build gfx parts
git-svn-id: svn://10.0.0.236/trunk@218447 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 20:51:52 +00:00
sayrer%gmail.com
f00789ad0d Space patrol. Partially extra whitespace from my last patch.
git-svn-id: svn://10.0.0.236/trunk@218446 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 20:18:20 +00:00
aaronleventhal%moonset.net
26cf973f76 Bug 367145. Remove suspect code from nsAccessible::GetLabelContent. Patch by Alexander Surkov. r=aaronlev
git-svn-id: svn://10.0.0.236/trunk@218445 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 19:59:50 +00:00
mike.morgan%oregonstate.edu
f1e8f90e47 Checked in patch for lilmatt from bug 365342. It added a version for sunbird in the AUS config.
git-svn-id: svn://10.0.0.236/trunk@218440 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 19:43:47 +00:00
stridey%gmail.com
95dce4c491 Camino only - Bug 355323: Updated popup blocked icon. Icon by Jon Hicks <jon@hicksdesign.co.uk>.
git-svn-id: svn://10.0.0.236/trunk@218439 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 19:33:01 +00:00
stridey%gmail.com
fbcd4e6293 Camino only - Removing old popup blocked image for bug 355323.
git-svn-id: svn://10.0.0.236/trunk@218437 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 19:13:09 +00:00
aaronleventhal%moonset.net
1fe1b8fd09 Bug 366443. Fix AtkComponent::GetExtents(ATK_XY_WINDOW). r=ginn.chen
git-svn-id: svn://10.0.0.236/trunk@218436 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 18:37:21 +00:00
rhelmer%mozilla.com
b0ca65bdbe patcher2 should use license and updateType settings b=366650 r=preed
git-svn-id: svn://10.0.0.236/trunk@218434 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 17:47:02 +00:00
Olli.Pettay%helsinki.fi
d5799c731f Bug 298371, make richlistbox multi-selectable p=surkov, r=mano+enndeakin
git-svn-id: svn://10.0.0.236/trunk@218433 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 17:09:58 +00:00
Olli.Pettay%helsinki.fi
b4141f77ed Bug 358415, Crash [@ nsHTMLCSSUtils::GetCSSInlinePropertyBase] when inputing title of new blog entry on blogger.com before page is entirely loaded up, r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@218432 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 17:04:16 +00:00
mozilla.mano%sent.com
4dc565aaf7 Bug 367070 - new browser window is broken if it is opened from a window in which the findbar is open ('Error: this._browser has no properties'). r=gavin.
git-svn-id: svn://10.0.0.236/trunk@218431 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 16:02:06 +00:00
longsonr%gmail.com
bb403d0859 Bug 363611 - Fix crash with unrendered foreignObject. r+sr=tor
git-svn-id: svn://10.0.0.236/trunk@218428 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 11:12:08 +00:00
mhammond%skippinet.com.au
3e221fcba3 Get Python DOM extension building again.
Not part of the default build


git-svn-id: svn://10.0.0.236/trunk@218427 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 08:52:14 +00:00
uriber%gmail.com
f45d42ada7 Abort early from ReorderFrames in case of an empty line frame, to avoid crashing later. bug=367015, r+sr=bzbarsky.
git-svn-id: svn://10.0.0.236/trunk@218426 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 07:09:49 +00:00
mhammond%skippinet.com.au
943fd850bc Get pyxpcom working with the recent nsXPTCStubBase changes.
Not part of the default build.


git-svn-id: svn://10.0.0.236/trunk@218425 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 06:44:38 +00:00
scott%scott-macgregor.org
36c361bd03 Bug #366439 --> add ability to apend the default domain to the user name in ISP configuration files. initial r pass by neil, more review changes possibly coming.
git-svn-id: svn://10.0.0.236/trunk@218424 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 06:12:55 +00:00
kaie%kuix.de
e7554c3b9f bug 302803, Changes to enabled SSL versions do not take immediate effect
r=nelson


git-svn-id: svn://10.0.0.236/trunk@218423 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 06:10:51 +00:00
scott%scott-macgregor.org
b6c36471e5 Bug #362919 --> remote content warning text is not wrapping properly in the remote image notification bar.
git-svn-id: svn://10.0.0.236/trunk@218422 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 06:03:05 +00:00
tony%ponderer.org
2be53f1227 bug 362400: "Report Web Forgery" in the help menu stops working after opening
customize palette
patch: v2: move onpopupshowing into existing function buildHelpMenu
r=gavin


git-svn-id: svn://10.0.0.236/trunk@218421 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 03:07:54 +00:00
wtchang%redhat.com
fd791c2710 Bugzilla bug 362768: improved comments.
git-svn-id: svn://10.0.0.236/trunk@218420 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 01:39:41 +00:00
bienvenu%nventure.com
86be5e241c delete auto-saved drafts if the user chooses not to save the message, sr=mscott 307046
git-svn-id: svn://10.0.0.236/trunk@218418 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 00:42:01 +00:00
mozilla.BenB%bucksch.org
bbbd450660 Quota in statusbar: Text shadow caused statusbar height to change, so remove.
Bug 360591, patch=tuukka.tolvanen + me, r=bienvenu, sr+a=mscott


git-svn-id: svn://10.0.0.236/trunk@218416 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 00:30:39 +00:00
wtchang%redhat.com
65700607ad Bug 365997: declared the variable 'dst' as pointer to const.
git-svn-id: svn://10.0.0.236/trunk@218413 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 00:24:09 +00:00
wtchang%redhat.com
d79a228558 Bug 365997: changed timetest to test the years 2005-2008 rather than the
years 1993-1996.  This tests its ability to use both the old and new DST
rules.  Patch by Nelson Bolyard of Sun Microsystems. r=alexei.volkov


git-svn-id: svn://10.0.0.236/trunk@218409 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 00:13:59 +00:00
wtchang%redhat.com
03d61041e2 Bug 365997: updated PR_USPacificTimeParameters with the new US Daylight
Saving Time rule.  By Nelson Bolyard of Sun Microsystems.  r=wtc.


git-svn-id: svn://10.0.0.236/trunk@218407 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-16 00:06:21 +00:00
despotdaemon
8a731efc85 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@218403 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 23:27:53 +00:00
mozilla.mano%sent.com
f3877bd426 Bug 240363 - autoscroll should stop completely when window loses focus. r=gavin.
git-svn-id: svn://10.0.0.236/trunk@218402 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 23:27:25 +00:00
mozilla.mano%sent.com
bac33b4774 Bug 366594 - Places Organizer: View->Unsorted is broken. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218400 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 23:22:24 +00:00
mozilla.mano%sent.com
4e9bd1bee3 Bug 365729 - for bookmarking groups of tabs, we have 'undefined' as the text. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218399 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 23:19:49 +00:00
mozilla.mano%sent.com
339e05d699 Bug 330206 - the Places window should remember the position of the splitter. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218398 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 23:11:52 +00:00
timeless%mozdev.org
6dd178e45c Adding a package statement for testing purposes
git-svn-id: svn://10.0.0.236/trunk@218396 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 22:54:53 +00:00
scott%scott-macgregor.org
26c8443a36 Bug #361702 --> .manageOfflineStatus throws an exception on platforms that don't support the offline state manager code. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@218395 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 22:51:51 +00:00
bienvenu%nventure.com
468baa898d fix 366687 forward filter stopped working, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@218394 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 21:57:09 +00:00
richm%stanfordalumni.org
501325e04b Resolves: bug 366335
Description: Make libldif public - windows specific fixes
Fix Description: Windows needed a nsldif32.tdf file in order to generate
the nsldif32.def file using the libldif.ex file (committed in the previous
commit).
Also, it has been a while since the .def files were generated.  The libX.ex
files have had quite a few changes, and we needed to regenerate all of the
.def files.
Finally, this will be version 6.0.2 of the mozilla ldap c sdk.


git-svn-id: svn://10.0.0.236/trunk@218392 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 21:21:50 +00:00
stridey%gmail.com
f8113c0928 Camino only - Bug 365428: Rename 'Keyword' feature as 'Shortcut' to more accurately reflect its function. r=ardissone sr=smorgan
git-svn-id: svn://10.0.0.236/trunk@218391 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 21:17:03 +00:00
despotdaemon
52b0b16e73 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@218388 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 18:22:47 +00:00
despotdaemon
30aafe5818 Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@218387 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 18:06:21 +00:00
kaie%kuix.de
ae84024831 bug 356117, Incorrect spelling in Delete E-Mail Certificates
Patch contributed by Magnus Melin.
r=kengert


git-svn-id: svn://10.0.0.236/trunk@218386 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 17:43:20 +00:00
bugzilla%arlen.demon.co.uk
a2edce8f4f Bug 366901 Edit->Copy doesn't work in the SuiteRunner Error Console
p=philip.chee@gmail.com r/sr=neil


git-svn-id: svn://10.0.0.236/trunk@218382 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 15:16:57 +00:00
brendan%mozilla.org
c69ac01ef4 Fix O(n^2) complexity in {Get,Inset}PropertyTreeChild (335700, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@218379 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 05:40:45 +00:00
stridey%gmail.com
8bfeddf98a Camino only - Bug 364262: white rect appears behind the 'gear' action pop-up menu when it is clicked. r=ardissone sr=smorgan
git-svn-id: svn://10.0.0.236/trunk@218378 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 04:05:52 +00:00
richm%stanfordalumni.org
4d238ec77d Resolves: bug 366335
Description: Make libldif public - fix Solaris build
Fix Description: libldif
   needs to specify the exports.  I added a libldif.ex and fixed
   libldif/Makefile.in to correctly generate and use the exports listed in the
   file.


git-svn-id: svn://10.0.0.236/trunk@218377 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-15 03:38:38 +00:00
timeless%mozdev.org
2cbff7fd50 Bug 366927 DOMi does not remember preference for showing whitespace nodes or not at first startup
patch by comrade693+bmo@gmail.com r=db48x sr=neil


git-svn-id: svn://10.0.0.236/trunk@218374 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 23:20:31 +00:00
timeless%mozdev.org
9a55b25821 Bug 344545 DOM Inspector 1.8.1b1 Leak (dom.js)
patch by comrade693+bmo@gmail.com r=db48x sr=neil


git-svn-id: svn://10.0.0.236/trunk@218373 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 23:18:58 +00:00
timeless%mozdev.org
cee452d5ee Bug 363323 DOM View is really inefficient with setting what is to be shown
patch by comrade693+bmo@gmail.com r=timeless sr=neil


git-svn-id: svn://10.0.0.236/trunk@218372 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 23:17:41 +00:00
ajschult%verizon.net
145e143b75 Bug 365751: Fix for O(N^2) perf handling attachments with '\n' and other clean up for nsMsgLocalMailFolder::CopyData, r+sr=bienvenu.
git-svn-id: svn://10.0.0.236/trunk@218371 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 21:20:40 +00:00
lpsolit%gmail.com
a66f49714f Bug 366666: Cannot clear inactive flags anymore - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=LpSolit
git-svn-id: svn://10.0.0.236/trunk@218370 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 20:37:57 +00:00
philringnalda%gmail.com
a975f642cd Bug 363459 followup: put sayrer in his place, hold the end of the credits for ten seconds, r+a=mscott
git-svn-id: svn://10.0.0.236/trunk@218369 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 20:02:58 +00:00
neil%parkwaycc.co.uk
0f2f234c0c Typo'd my own name, of course I blame the reviewers for not spotting it ;-)
git-svn-id: svn://10.0.0.236/trunk@218367 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 12:33:27 +00:00
jwatt%jwatt.org
4ac3f018ca Make gfxRect methods const. r=stuart
git-svn-id: svn://10.0.0.236/trunk@218366 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 11:39:39 +00:00
justdave%bugzilla.org
30ece887a6 Bug 354449 needs a tinderbox clobber because of a CVS conflict
git-svn-id: svn://10.0.0.236/trunk@218365 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 06:21:18 +00:00
sayrer%gmail.com
fb5a8aadc5 bug 354449. Fix some bustage. nsMicrosummaryService.js not regenerated when enabling/disabling Places. Patch by Daniel Brooks <db48x@yahoo.com>. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@218364 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 06:17:51 +00:00
sspitzer%mozilla.org
fcd05eb981 fix for bug #356487
make MOZ_PLACES (if enabled) only build the places based history UI, use MOZ_PLACES_BOOKMARKS to turn off the places based bookmarks UI.

also addresses bugs:

bug #330923:  "View -> Sidebar menu" is empty if you build with places
bug #355738:  implement history sidebar on top of places backend
bug #356175:  hook up the history menu to the places backend
bug #356453:  add back "Clear Private Data" menu item
bug #356630:  add back "History | Show in Sidebar" menu item
bug #356631:  remove "search in history" and "view all history" menu items
bug #357301:  add back history and bookmark sidebar toolbar button items, remove places toolbar button
bug #358831:  history sidebar, right mouse button click should not expand / collapse item

r=dietrich, r=gavin


git-svn-id: svn://10.0.0.236/trunk@218363 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:35 +00:00
myk%mozilla.org
77e29b5b42 bug 348928: a better workaround for this bug that doesn't make all bookmark UI rebuild from scratch each time a microsummary gets updated; they still rebuild from scratch when microsummaries are added or removed; besides the performance win, this is a usability win, as rebuilds cause users in the middle of selecting bookmarks from bookmark trees to lose their selections;
r=mconnor
a=schrep


git-svn-id: svn://10.0.0.236/trunk@218362 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:34 +00:00
myk%mozilla.org
61392019ab bug 345016: correctly generate microsummary for page with non-UTF-8 charset specified via meta tags or other mechanisms not detectable by XMLHttpRequest
r=bzbarsky
sr=mconnor


git-svn-id: svn://10.0.0.236/trunk@218361 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:33 +00:00
myk%mozilla.org
359f7c2edd bug 347481: find link tags in XHTML documents (where the link tag is in the default namespace) in addition to HTML documents
namespace)
Patch by Justin Dolske.
r=myk


git-svn-id: svn://10.0.0.236/trunk@218360 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:32 +00:00
myk%mozilla.org
ad7e8f4eef bug 349440: trim whitespace from the beginning of microsummaries generated by microsummary generators in addition to those provided as plain text.
Patch by Justin Dolske.
r=myk


git-svn-id: svn://10.0.0.236/trunk@218359 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:31 +00:00
cbiesinger%web.de
070ba216a6 Bug 265780 part I: Implement nsIAuthPrompt2 and related interfaces per the design at
http://wiki.mozilla.org/Necko:nsIAuthPrompt2
r=darin


git-svn-id: svn://10.0.0.236/trunk@218358 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:30 +00:00
myk%mozilla.org
9265a676b3 bug 346818: make sure microsummary bookmark records in the bookmarks datastore really exist (i.e. they aren't for cut or deleted bookmarks, which don't get completely removed from the datastore until restart) so we don't hit an error when trying to update them; also, trap errors when updating microsummary bookmarks, so an exception for one update doesn't hork the rest of them; finally, add microsummary properties to the bookmark transaction manager, so they get saved and restored the way they are supposed to be saved and restored when bookmarks are cut and pasted
r=mconnor


git-svn-id: svn://10.0.0.236/trunk@218357 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:29 +00:00
myk%mozilla.org
47eee49ea3 make the microsummary service stop loading about:blank in new hidden iframes to work around a crash when about:blank and another URI are both loading in a doc shell
bug=344305
r=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@218356 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:28 +00:00
myk%mozilla.org
aa5e431108 better workaround for problem that Live Title bookmark not listed in the main bookmark menu until Firefox is restarted
bug=348248
r=mconnor


git-svn-id: svn://10.0.0.236/trunk@218355 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:27 +00:00
myk%mozilla.org
c160e89768 changes microsummary load timeout from 10 seconds to 300 seconds (five minutes), which is long enough to handle almost every page load while still being short enough to cancel loads before they start to pile up
bug=347097
r=mconnor


git-svn-id: svn://10.0.0.236/trunk@218354 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:26 +00:00
myk%mozilla.org
e2bf3c07d4 make the microsummary update interval use a preference
bug=342044
Patch by Simon Bünzli.
r=myk


git-svn-id: svn://10.0.0.236/trunk@218353 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:25 +00:00
myk%mozilla.org
3a204e1b94 don't treat microsummary generator that goes missing as if it were a remote generator
bug=346822
r=mconnor


git-svn-id: svn://10.0.0.236/trunk@218352 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:24 +00:00
myk%mozilla.org
6592008c4e correctly detect when a microsummary page isn't HTML or XML, and explicitly don't handle multipart content (multipart/x-mixed-replace), since there's no good way to determine which part of it is the last part when downloading it via XMLHttpRequest
bug=346624
r=mconnor


git-svn-id: svn://10.0.0.236/trunk@218351 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:23 +00:00
myk%mozilla.org
c3b49e9495 after selecting microsummary for bookmark, ensure bookmark label displays something even if microsummary hasn't finished loading
Patch by Simon Bünzli.
bug=342225
r=myk


git-svn-id: svn://10.0.0.236/trunk@218350 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:22 +00:00
myk%mozilla.org
3eb1d4f3c4 cancel timeout when loading a microsummary resource on error in addition to on load
bug=346824
r=mconnor


git-svn-id: svn://10.0.0.236/trunk@218349 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:21 +00:00
myk%mozilla.org
8f161ba373 stop installed microsummary generators from being leaked at shutdown by destroying the timer property of MicrosummaryResource objects
bug=346913
r=mconnor


git-svn-id: svn://10.0.0.236/trunk@218348 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:20 +00:00
jminta%gmail.com
f2776d971b Bug 341842 microsummary service should be stricter about parsing generators, r=myk
git-svn-id: svn://10.0.0.236/trunk@218347 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:19 +00:00
myk%mozilla.org
0f4ad1df60 hide domain mismatch error dialog and HTTP authentication dialog (aborting the load instead of continuing if we reach either dialog) when updating microsummaries
bug=344277
r=mconnor


git-svn-id: svn://10.0.0.236/trunk@218346 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:18 +00:00
jminta%gmail.com
66e2173d5e backing out Bug 341842
git-svn-id: svn://10.0.0.236/trunk@218345 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:17 +00:00
jminta%gmail.com
2e3349fe47 Bug 341842 microsummary service should be stricter about parsing generators, r=myk
git-svn-id: svn://10.0.0.236/trunk@218344 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:16 +00:00
myk%mozilla.org
3cc7bc3cd8 cancel microsummary connections after a timeout
Patch by Dietrich Ayala.
bug=341840
r=myk


git-svn-id: svn://10.0.0.236/trunk@218343 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:15 +00:00
jminta%gmail.com
3ac9b00974 Bug 341837 microsummary service should impose limit on length of microsummary, r=myk
git-svn-id: svn://10.0.0.236/trunk@218342 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:14 +00:00
myk%mozilla.org
24397a3641 display link tag's title attribute on microsummary menu item while downloading generator
Patch by Justin Dolske.
bug=342231
r=myk


git-svn-id: svn://10.0.0.236/trunk@218341 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:13 +00:00
myk%mozilla.org
1c6142a78e make the microsummary service support <link> tags with rel=space-separated list of words and ignore case of "microsummary" rel value
Patch by Justin Dolske.
bug=342228
r=myk


git-svn-id: svn://10.0.0.236/trunk@218340 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:12 +00:00
myk%mozilla.org
a99e0033b8 make the microsummary service update installed generators when the user reinstalls them instead of installing a second copy
bug=342036
r=mconnor


git-svn-id: svn://10.0.0.236/trunk@218339 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:11 +00:00
myk%mozilla.org
ff0cf03c30 truncate microsummary file names to 60 characters to prevent nsIFile.createUnique from failing due to too-long names
Patch by Joey Minta.
bug=342212
r=myk


git-svn-id: svn://10.0.0.236/trunk@218338 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:10 +00:00
gavin%gavinsharp.com
10582bfc10 Bug 341340: microsummary service should identify itself when downloading pages, patch by Simon Bünzli <zeniko@gmail.com>, r=myk, sr=darin
git-svn-id: svn://10.0.0.236/trunk@218337 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:09 +00:00
martijn.martijn%gmail.com
8cabc25252 Bug 337940 - Microsummary service should allow authors to dictate update frequency, patch by Simon Bünzli, r=myk
git-svn-id: svn://10.0.0.236/trunk@218336 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:08 +00:00
myk%mozilla.org
6c8dcbe603 make the microsummary service handle text/html microsummaries by extracting their plaintext content
Patch by Simon Bünzli.
bug=344178
r=myk


git-svn-id: svn://10.0.0.236/trunk@218335 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:07 +00:00
myk%mozilla.org
8df286dfbb ignore whitespace around pages regexps
Patch by Simon Bünzli.
bug=343979
r=myk


git-svn-id: svn://10.0.0.236/trunk@218334 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:06 +00:00
myk%mozilla.org
8fb2bb3a71 make the microsummary service not dump anything to the console unless specifically directed to do so by the browser.microsummary.log preference. Patch by Adam Guthrie (ispiked). bug=343080; r=myk; sr=mconnor
git-svn-id: svn://10.0.0.236/trunk@218333 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:05 +00:00
myk%mozilla.org
8f31e8876a don't let XSLT in microsummary generators load documents
bug=342274
r=sicking


git-svn-id: svn://10.0.0.236/trunk@218332 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:04 +00:00
myk%mozilla.org
fcd7ae1886 don't recheck microsummaries when previous update failed until normal expiration
bug=342908
r=ben


git-svn-id: svn://10.0.0.236/trunk@218331 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:03 +00:00
myk%mozilla.org
272d0740fd make sure resource exists before attempting to destroy it
bug=343385
r=ben


git-svn-id: svn://10.0.0.236/trunk@218330 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:02 +00:00
myk%mozilla.org
e2369f6252 make the microsummary service parse HTML using a string input stream rather than a data URI so that huge messages don't get written to the error console when the CSS loader includes the URL in an error message
bug=342508
r=biesi
sr=mconnor


git-svn-id: svn://10.0.0.236/trunk@218329 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:01 +00:00
myk%mozilla.org
ccf0ed4302 make sure the bookmarks sidebar is open before rebuilding it
bug=342739
r=mconnor


git-svn-id: svn://10.0.0.236/trunk@218328 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:38:00 +00:00
myk%mozilla.org
6a09ff5151 prevent the microsummary service from triggering bookmarked files to be downloaded
bug=339543
r=biesi
r/sr=mconnor


git-svn-id: svn://10.0.0.236/trunk@218327 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:59 +00:00
myk%mozilla.org
997d30a4e2 factor out code for updating and refreshing microsummaries when the user selects a new one from the bookmark dialogs
bug=339296
r=mconnor


git-svn-id: svn://10.0.0.236/trunk@218326 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:58 +00:00
myk%mozilla.org
0db6068d27 make bookmarks stop disappearing when a user unselects a microsummary (i.e. goes back to the static page title)
patch by Simon Bünzli
bug=342463
r=myk


git-svn-id: svn://10.0.0.236/trunk@218325 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:57 +00:00
myk%mozilla.org
d04f9e5933 make sure we have a bookmarks toolbar before we try to rebuild it
bug 342245
patch by Simon Bünzli
r=myk


git-svn-id: svn://10.0.0.236/trunk@218324 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:56 +00:00
myk%mozilla.org
4249028971 fall back on the local URI if a generator has no source URI; a convenience for generator developers so they don't have to make up a fake source URI while developing their generators;
patch by Simon Bünzli
bug=342226
r=myk


git-svn-id: svn://10.0.0.236/trunk@218323 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:55 +00:00
myk%mozilla.org
7ebb11f3c7 display microsummaries in the bookmarks sidebar and bookmarks manager; bug=338429; r=myk; a=mconnor for 1.8.1 branch
git-svn-id: svn://10.0.0.236/trunk@218322 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:54 +00:00
myk%mozilla.org
0f89d5f5fe add a bookmarks context menu item for refreshing a microsummary; bug=341555; r=mconnor; a=mconnor for 1.8 branch
git-svn-id: svn://10.0.0.236/trunk@218321 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:53 +00:00
myk%mozilla.org
ee4e35da90 moves Firefox-specific microsummary directory definitions to nsBrowserDirectoryProvider
bug=337324
r=bsmedberg
a=mconnor for the 1.8 branch


git-svn-id: svn://10.0.0.236/trunk@218320 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:52 +00:00
myk%mozilla.org
7e6f5c68b2 prevent the mouse pointer from getting stuck in a busy state over chrome after updating a microsummary
bug=337038
r=mconnor
a=mconnor for 1.8 branch


git-svn-id: svn://10.0.0.236/trunk@218319 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:51 +00:00
myk%mozilla.org
ef26fa7a43 make sure the microsummary service doesn't attempt to load javascript: or data: URLs
bug=339377
r=mconnor
a=mconnor for 1.8 branch


git-svn-id: svn://10.0.0.236/trunk@218318 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:50 +00:00
myk%mozilla.org
8879047c95 Work around XUL template builder regression on trunk and possibly marginally improve performance.
bug=336857
r=enndeakin
sr=ben
a=mconnor for checkin to 1.8 branch


git-svn-id: svn://10.0.0.236/trunk@218317 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:49 +00:00
myk%mozilla.org
55b0358fe4 make the microsummary service prefer cached generators to downloading generators over the network
bug=337113
r=brettw
sr=ben


git-svn-id: svn://10.0.0.236/trunk@218316 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:48 +00:00
myk%mozilla.org
443622677b possible fix for microsummaries Ts regression
bug=336833
r=mconnor


git-svn-id: svn://10.0.0.236/trunk@218315 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:47 +00:00
bzbarsky%mit.edu
a88bea81fc Observe shutdown too. Bug 336922 followup, r=mconnor, sr=darin, branch181=mconnor
git-svn-id: svn://10.0.0.236/trunk@218314 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:46 +00:00
myk%mozilla.org
9d29a3fbd5 stop leaking the annotation service in the microsummary service; possible fix for balsa leak regression
bug=336922
r=bz


git-svn-id: svn://10.0.0.236/trunk@218313 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:45 +00:00
myk%mozilla.org
7792270e9d Initial support for microsummaries via a service and integration into the bookmarks UI.
bug=334471
r=brettw
a=ben for the branch


git-svn-id: svn://10.0.0.236/trunk@218312 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:37:44 +00:00
caillon%returnzero.com
7b059e5df9 about:about
Bug 56061
r=bryner@brianryner.com
sr=darin@meer.net


git-svn-id: svn://10.0.0.236/trunk@218311 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:47 +00:00
ajschult%verizon.net
26829da83d Bug 25287: Inappropriate menu items show as enabled when no windows are open. Patch by Stefan Hermes <stefanh@bluebottle.com>, r=mnyromyr, sr=neil.
git-svn-id: svn://10.0.0.236/trunk@218310 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:46 +00:00
bsmedberg%covad.net
f184a25508 From bug 282057 - brand.dtd now lives in chrome://branding/locale/brand.dtd
git-svn-id: svn://10.0.0.236/trunk@218309 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:45 +00:00
neil%parkwaycc.co.uk
f4f3842a3f Bug 83313 "Open File" doesn't work on Mac when no windows are open p=bugs.mano@mail-central.com r=pedemonte sr=me
git-svn-id: svn://10.0.0.236/trunk@218308 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:44 +00:00
gerv%gerv.net
c67d52c7d6 Bug 236613: change to MPL/LGPL/GPL tri-license.
git-svn-id: svn://10.0.0.236/trunk@218307 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:43 +00:00
varga%netscape.com
cd480b5c90 Putting toolbar grippies back in. Bug 175091.
Original bug for removing them was 112534.
Please see the discussion in those 2 bugs before complaining or filling new bug reports!
r=caillon,a=UE team


git-svn-id: svn://10.0.0.236/trunk@218306 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:42 +00:00
varga%netscape.com
1824daca15 Fix for bug 112534. Remove collapse grippies.
r=caillon, sr=jag


git-svn-id: svn://10.0.0.236/trunk@218305 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:41 +00:00
hewitt%netscape.com
e3a0790c2f 68136 - Mozilla should have a Full-screen mode, r=ben, sr=jst/jag
git-svn-id: svn://10.0.0.236/trunk@218304 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:40 +00:00
varga%netscape.com
746a87f8c7 Fix for bug 192014. Bookmarks menu shows no bookmarks when no unminimized windows are open.
r=pch, sr=jag, a=sspitzer


git-svn-id: svn://10.0.0.236/trunk@218303 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:39 +00:00
blakeross%telocity.com
2e288104de 132027 - no menus work when download manager window has focus. patches by bryner and I. r=bryner/blake sr=ben/dveditz
git-svn-id: svn://10.0.0.236/trunk@218302 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:38 +00:00
hwaara%chello.se
27006ef831 #84910, split up navigator.js.
Checking in for Doron Rosenberg <doronr@naboonline.com>.
r=jag, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@218301 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:37 +00:00
jaggernaut%netscape.com
ddb02a7c61 Bug 99501: JS error in viewZoomOverlay.js at startup. r=sfraser, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@218300 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:36 +00:00
pinkerton%netscape.com
8b557b9b9a removed tasksOverlay.xul because it's already included from navigatorOverlay.xul. r=saari/brade, rs=hyatt. bug# 78322.
git-svn-id: svn://10.0.0.236/trunk@218299 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:35 +00:00
pinkerton%netscape.com
d3df899aeb added commandset binding point so navigator commands will get overlayed into document. must have gotten lost in the shuffle somewhere. all menus now work when no window is open on mac. r=saari,brade/rs=brendan. bug# 78807.
git-svn-id: svn://10.0.0.236/trunk@218298 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:34 +00:00
blakeross%telocity.com
5e66474525 Use more efficient command structure, refactor commands, broadcasters and keys, remove unused attributes, do some other optimization (72923). Landing navigator part only; this should help new window opening and some other areas. r=ben sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@218297 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:33 +00:00
timeless%mac.com
64e46d99f7 fix Bug 65428 language="javascript" should be type="application/x-javascript"
r=kerz a=ben


git-svn-id: svn://10.0.0.236/trunk@218296 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:32 +00:00
cls%seawood.org
09706510df Must include build.dtd anyplace that uses navigator.dtd for the BuildId. Bug #26798 r=jag
git-svn-id: svn://10.0.0.236/trunk@218295 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:31 +00:00
ben%netscape.com
11055f1c53 partial fixes for 32347, 30536, 41120
git-svn-id: svn://10.0.0.236/trunk@218294 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:30 +00:00
ben%netscape.com
c7a0aac4ec fix XML error
git-svn-id: svn://10.0.0.236/trunk@218293 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:29 +00:00
alecf%netscape.com
2dc771e176 do ben a favor and make a bunch of shared stuff skinnable!
git-svn-id: svn://10.0.0.236/trunk@218292 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:28 +00:00
sfraser%netscape.com
6cb2fdaf77 Fix for bug 29811 -- srGetStrBundle error on Mac. r=ben
git-svn-id: svn://10.0.0.236/trunk@218291 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 05:31:27 +00:00
mattwillis%gmail.com
04460c1a95 bug 361195 - Remove obsolete strings from calendar.properties. Patch by Cédric Corazza <cedric.corazza@wanadoo.fr> r1=lilmatt, r2=dmose
git-svn-id: svn://10.0.0.236/trunk@218290 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 04:25:13 +00:00
mattwillis%gmail.com
7272fa3db5 bug 365342 - Bump trunk version to 0.6a1. r=mvl
git-svn-id: svn://10.0.0.236/trunk@218289 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 04:13:28 +00:00
mattwillis%gmail.com
407ae1302c bug 365616 - Make CalDAV use passwords stored in the passwordmanager if they exist. Patch by Bruno Browning <browning@uwalumni.com>, r1=lilmatt, r2=jminta
git-svn-id: svn://10.0.0.236/trunk@218288 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 04:10:58 +00:00
mattwillis%gmail.com
14281cf278 bug 327602 - Move VTIMEZONEs to the beginning of a VCALENDAR to make CGPro happier. r1=ctalbert, r2=mvl
git-svn-id: svn://10.0.0.236/trunk@218287 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 03:47:20 +00:00
wtchang%redhat.com
32b51a97c6 Bug 363070: upgraded to (the new) NSS 3.11.5 Beta 2. The cause of the
Windows Tinderbox failure has been fixed (bug 232600 comment 19).


git-svn-id: svn://10.0.0.236/trunk@218286 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 03:22:17 +00:00
wtchang%redhat.com
84b798c461 Bug 232600: use the same linker flags for programs as for DLLs when doing
optimized builds with MOZ_DEBUG_SYMBOLS=1. r=nelsonb


git-svn-id: svn://10.0.0.236/trunk@218285 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 02:54:49 +00:00
timeless%mozdev.org
f820a3cbb7 Bug 366529 sniff vista
r=lpsolit a=lpsolit


git-svn-id: svn://10.0.0.236/trunk@218282 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 01:42:40 +00:00
nelson%bolyard.com
0f063ff8ea Bug 335019. When importing certs from PKCS12 files, and the cert and the
private key both have different nicknames, import the cert with the
nickname from the file's cert, not from the file's private key.
Also, fix an infinite loop and certain other bugs.  r=neil.williams.


git-svn-id: svn://10.0.0.236/trunk@218281 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-14 00:02:36 +00:00
nelson%bolyard.com
1d5fdadabc Bug 366405. Fix PK11_DeleteTokenPrivateKey to not leak the cert when
force is true.  r=alexei.volkov,wtchang


git-svn-id: svn://10.0.0.236/trunk@218280 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 23:41:21 +00:00
wtchang%redhat.com
c85199b3cf Bug 363070: backed out the previous checkin. It broke a Windows Tinderbox.
git-svn-id: svn://10.0.0.236/trunk@218279 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 22:22:31 +00:00
wtchang%redhat.com
ef14f17d5b Bug 363070: upgraded to NSS 3.11.5 Beta 2.
git-svn-id: svn://10.0.0.236/trunk@218278 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 21:12:30 +00:00
uriber%gmail.com
2147de52fc Don't bidi-split line frames. bug=364839, r+sr=bzbarsky.
git-svn-id: svn://10.0.0.236/trunk@218277 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 18:20:28 +00:00
dbaron%dbaron.org
c2cad16942 Fix bustage, since we're using 3.2.3 rather than 3.3.
git-svn-id: svn://10.0.0.236/trunk@218276 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 17:24:53 +00:00
dbaron%dbaron.org
39bfe3daa4 Restore the optimization options that we've been using for the 1.8 branch to the trunk, rather than just using -O. b=365974 r=preed
git-svn-id: svn://10.0.0.236/trunk@218273 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 16:58:43 +00:00
gijskruitbosch%gmail.com
8d5d7bf5d6 Bug 364611 - toggleOfflineStatus in browser.js shouldn't ask if it can go offline if it's going online.
r=gavin.sharp@gmail.com (Gavin Sharp)


git-svn-id: svn://10.0.0.236/trunk@218271 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 10:29:16 +00:00
mozilla.mano%sent.com
0148fb2b69 Bug 329147 - no tooltips in places toolbar. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218270 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 10:18:30 +00:00
sayrer%gmail.com
0e81fd56a8 Attempt at bustage fix for bug 354973. r=froodian/ardissone
git-svn-id: svn://10.0.0.236/trunk@218269 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 06:43:55 +00:00
bzbarsky%mit.edu
dda20a2b0f ConstructDocElementFrame can return null if the XBL hasn't loaded yet. Handle
that XBL loading later by changing how XBL triggers the frame construction and
making it possible to recreate the doc element hierarchy even if there is no
doc element frame.  Bug 366207, r=sicking, sr=roc


git-svn-id: svn://10.0.0.236/trunk@218268 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 03:32:31 +00:00
bzbarsky%mit.edu
c663dd69d7 Don't inherit the charset from the parent document if it comes from a different
origin.  Bug 356280, r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@218267 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 03:28:00 +00:00
cst%yecc.com
8eb72d468a Bug 352465 port jst's fix for bug 354973 to SeaMonkey
r+sr=neil


git-svn-id: svn://10.0.0.236/trunk@218264 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 01:46:43 +00:00
wtchang%redhat.com
12ebcb03ec Bugzilla bug 362768: restored the _pt_thread_death call in _PR_Fini because
the cause of the hang on Mozilla shutdown (JavaScript bug 366869) has been
fixed.


git-svn-id: svn://10.0.0.236/trunk@218263 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 01:20:41 +00:00
jst%mozilla.org
79032612b9 Fixing popup blocker bug 354973. r=mano@mozilla.com, sr=peterv@propagandism.org
git-svn-id: svn://10.0.0.236/trunk@218261 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 01:08:43 +00:00
dbaron%dbaron.org
bdfaaa60a4 Fix incorrectly placed PR_MAX(), since the span* values are additions to the base values. b=365173 r=bernd sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@218260 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 01:08:18 +00:00
dbaron%dbaron.org
b348f16679 Accumulate column-spanning cells into column intrinsic widths separately for each number of columns spanned, in increasing order. b=363329 r=bernd sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@218259 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 01:04:56 +00:00
brendan%mozilla.org
a82820e824 Fix from wtc/kai for unsafe macro parameter (366869, r=me).
git-svn-id: svn://10.0.0.236/trunk@218257 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 00:41:19 +00:00
wtchang%redhat.com
f978dd74f5 Bug 329807: set USE_IPV6=1 (define _PR_INET6) on HP-UX B.11.23 or later,
based on information from HP.  r=nelsonb,darin
Modified files: configure configure.in _hpux.h


git-svn-id: svn://10.0.0.236/trunk@218255 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 00:32:39 +00:00
neil.williams%sun.com
62339b0bfb Bug 353745, r=nelson, Patch to fix 7 Klocwork bugs, submitted by Ryan Jones
git-svn-id: svn://10.0.0.236/trunk@218254 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 00:24:34 +00:00
jminta%gmail.com
1b73653b55 Remove useless bits of code. no bug. rs=dmose
git-svn-id: svn://10.0.0.236/trunk@218253 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-13 00:03:12 +00:00
benjamin%smedbergs.us
0ecfd07ac2 Bug 366823 - MozillaBuild installer, r=robstrong
git-svn-id: svn://10.0.0.236/trunk@218251 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 21:55:26 +00:00
bienvenu%nventure.com
2845ffffd1 add support for configurable default views for mail and news folders, patch by mozbugzilla@velox.ch, sr=bienvenu 86845
git-svn-id: svn://10.0.0.236/trunk@218250 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 21:32:29 +00:00
bent.mozilla%gmail.com
6f800a615a Bug 366619 - "Move nsAutoLock and nsAutoMonitor to the glue". nsAutoLock.cpp and nsAutoLock.h were moved from xpcom/threads, see there for CVS history. r=bsmedberg.
git-svn-id: svn://10.0.0.236/trunk@218249 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 20:55:53 +00:00
crowder%fiverocks.com
5c2ade60b2 Bug 354246. Fix allows throwing exceptions and reporting errors while constructing an exception object, as long as an error is not already being reported, or an exception already being thrown. Previously yielded silent failure. r=igor
git-svn-id: svn://10.0.0.236/trunk@218248 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 20:41:11 +00:00
wtchang%redhat.com
f46ba9a6a4 Bugzilla bug 362768: commented out the _pt_thread_death call in _PR_Fini
that was causing a hang on Mozilla shutdown.  It may not be safe to call
NSPR thread private data destructors in _PR_Fini.


git-svn-id: svn://10.0.0.236/trunk@218247 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 18:59:31 +00:00
ccooper%deadsquid.com
6516d0f96c - fix DISTINCT sql that doesn't work on production db
git-svn-id: svn://10.0.0.236/trunk@218245 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 18:23:22 +00:00
ccooper%deadsquid.com
6be1142c18 - avoid duplicate testcases in subgroup listing when running tests for the case where the subgroup is shared by more than one testgroup
- remve duplicate 'edit testcase' link from view testcases page


git-svn-id: svn://10.0.0.236/trunk@218244 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 18:18:26 +00:00
despotdaemon
7e4a5dba2b Pseudo-automatic update of changes made by wtchang@redhat.com.
git-svn-id: svn://10.0.0.236/trunk@218243 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 17:58:48 +00:00
despotdaemon
33615d223d Pseudo-automatic update of changes made by wtchang@redhat.com.
git-svn-id: svn://10.0.0.236/trunk@218242 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 17:55:23 +00:00
aaronleventhal%moonset.net
3e3cd89d6f Fixed comment from alexander.surkov. r=aaronlev
git-svn-id: svn://10.0.0.236/trunk@218241 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 15:06:36 +00:00
despotdaemon
d2b1201107 Pseudo-automatic update of changes made by mcs@pearlcrescent.com.
git-svn-id: svn://10.0.0.236/trunk@218240 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 14:04:18 +00:00
aaronleventhal%moonset.net
b78de51085 Bug 366716. Fix accessible tooltip event and name. r=ginn.chen
git-svn-id: svn://10.0.0.236/trunk@218239 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 14:04:17 +00:00
igor.bukanov%gmail.com
2f1623948d Bug 366236: cleanup and debug checks for atom indexes. r=brendan
git-svn-id: svn://10.0.0.236/trunk@218238 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 12:10:36 +00:00
slavomir.katuscak%sun.com
553368e2a6 Bug 335752. Fix for previous patch. r=alexei,sr=nelson
git-svn-id: svn://10.0.0.236/trunk@218237 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 10:51:54 +00:00
michael.buettner%sun.com
969eadbae8 bug #364571 error while opening 'invite attendees' dialog
git-svn-id: svn://10.0.0.236/trunk@218236 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 08:24:38 +00:00
timeless%mozdev.org
3f2779e12c Bug 366617 Crash when running JavaXPCOM in IBM JVM
attempting to fix windows build bustage


git-svn-id: svn://10.0.0.236/trunk@218235 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-12 07:41:02 +00:00
preed%mozilla.com
d9410fefa3 Kicking the CLOBBER file from Josh's last checkin; might not have worked 'cause it's a new CLOBBER file.
git-svn-id: svn://10.0.0.236/trunk@218232 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 23:56:02 +00:00
ted.mielczarek%gmail.com
38d888a5c7 bug 362970, Tinderbox changes to upload airbag symbols. r=preed
git-svn-id: svn://10.0.0.236/trunk@218231 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 23:42:21 +00:00
lpsolit%gmail.com
4a3c615a85 Bug 366738: Use of uninitialized value in numeric eq (==) in ./importxml.pl if the bug is not visible to the reporter and the CC list - Patch by Frédéric Buclin <LpSolit@gmail.com> r=myk r=ghendricks a=LpSolit
git-svn-id: svn://10.0.0.236/trunk@218230 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 22:51:32 +00:00
wtchang%redhat.com
f92a4f7139 Bug 362768: implemented NSPR shared library finalization function for major
Unix platforms.  r=nelsonb
Modified files: pr/src/Makefile.in ptthread.c


git-svn-id: svn://10.0.0.236/trunk@218226 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 22:27:44 +00:00
joshmoz%gmail.com
0b527b4876 clobbering for bug 366732.
git-svn-id: svn://10.0.0.236/trunk@218223 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 22:03:51 +00:00
joshmoz%gmail.com
82401a0184 copy printing impl to cocoa widgets. change files to obj-c++. remove unnecessary header reference so we can build. remove all dependencies on carbon widget source dir. b=366732 r=cbarrett r=mano
git-svn-id: svn://10.0.0.236/trunk@218222 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 21:54:29 +00:00
despotdaemon
d9e162664b Pseudo-automatic update of changes made by mcs@pearlcrescent.com.
git-svn-id: svn://10.0.0.236/trunk@218221 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 21:45:09 +00:00
despotdaemon
50fc20c319 Pseudo-automatic update of changes made by mcs@pearlcrescent.com.
git-svn-id: svn://10.0.0.236/trunk@218220 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 21:36:49 +00:00
lpsolit%gmail.com
997d7f521e Bug 366624: testserver.pl fails to find the GID for the httpd process - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
git-svn-id: svn://10.0.0.236/trunk@218219 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 21:26:48 +00:00
cls%seawood.org
1298eda55a Make sure to use a unique filename for the logfile.
Bug #360727 r=bear


git-svn-id: svn://10.0.0.236/trunk@218218 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 20:49:23 +00:00
ghendricks%novell.com
e17a3ad33f Cloning plans with cases linked to other products does not include categories from those products.
git-svn-id: svn://10.0.0.236/trunk@218217 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 20:16:34 +00:00
aaronleventhal%moonset.net
0ae9a0830d Bug 278034. Reconstruct both HTML and XUL combobox accessibles
git-svn-id: svn://10.0.0.236/trunk@218216 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 20:07:36 +00:00
bzbarsky%mit.edu
8c351facb0 Implement the proposed Web Apps 1.0 API for changing the selected style sheet
set, querying the available sets, etc.  Bug 200930, r=sicking, sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@218215 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 19:32:31 +00:00
despotdaemon
8c9c385d6d Pseudo-automatic update of changes made by jst@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@218214 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 19:25:40 +00:00
pedemont%us.ibm.com
d2cc1925a4 Bug 366617 - Crash when running JavaXPCOM app in IBM JVM. Missing JNICALL in some method declarations. XULRunner only.
git-svn-id: svn://10.0.0.236/trunk@218213 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 19:24:27 +00:00
mvl%exedo.nl
86c8414264 missed a review comment for bug 343721
git-svn-id: svn://10.0.0.236/trunk@218212 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 18:49:13 +00:00
bzbarsky%mit.edu
21d3879fe1 Compare maxY to the right thing when deciding whether to clamp it to the
baselineY.  Bug 366667, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@218210 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 18:10:47 +00:00
bclary%bclary.com
b6c02ce986 JavaScript Test - regression test for bug 313967, by Julien Lecomte, Igor Bukanov
git-svn-id: svn://10.0.0.236/trunk@218209 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 18:04:27 +00:00
bzbarsky%mit.edu
271b9a66d3 Fix the width computations for the dropdown to actually account for the border
and padding.  Bug 365837, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@218208 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 17:59:41 +00:00
bzbarsky%mit.edu
7580bc5680 Back out part of the change for bug 351633 -- javascript: channels are wacky
enough that we still need special handling of them in form submission.  In
particular, they background themselves even when they're the document
channel, so forms don't get the notifications they expect.  Bug 364436, r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@218207 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 17:58:36 +00:00
bzbarsky%mit.edu
ad3d5b6079 Notify correctly about legend frames being added -- need to mark all our
ancestors as having a dirty child, not just the immediate ancestor.  Bug
366537, r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@218206 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 17:56:25 +00:00
nrthomas%gmail.com
8f7d139483 Bug 366674, improvements to tinderbox watching. Pt2: set curl timeout
shorter than nagios, assorted cleanup. r=rhelmer

Previous checkin to this file also documented on 366674.


git-svn-id: svn://10.0.0.236/trunk@218205 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 16:56:13 +00:00
benjamin%smedbergs.us
2d178c460c Bug 366603 - Integrate atlthunk_compat with MozillaBuild, r=luser
git-svn-id: svn://10.0.0.236/trunk@218201 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 16:04:18 +00:00
bienvenu%nventure.com
819d85cd4c fix one part of problem playing back offline moves from imap to local folders, 364082, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@218200 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 15:03:52 +00:00
jwatt%jwatt.org
e2cea3cbc2 previous checkin was for bug 363086
git-svn-id: svn://10.0.0.236/trunk@218199 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 15:02:58 +00:00
bienvenu%nventure.com
64a429d417 fix 365710 newly created folders should be added to recent folders list, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@218198 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 14:44:45 +00:00
peterv%propagandism.org
539c6ed3e3 Part of fix for bug 340674 (Clean up some editor transactions code). r=glazman, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@218197 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 14:38:02 +00:00
peterv%propagandism.org
a501b993d3 Part 2 of the fix for bug 306539 (Error during XSLT transformation: (null)). r/sr=sicking.
git-svn-id: svn://10.0.0.236/trunk@218196 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 13:48:57 +00:00
longsonr%gmail.com
0602806987 Bug 366421 - flood filter colours incorrect r=tor,sr=roc
git-svn-id: svn://10.0.0.236/trunk@218195 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 11:21:32 +00:00
igor.bukanov%gmail.com
10ad87c0a9 bug 366601, r=brendan
git-svn-id: svn://10.0.0.236/trunk@218194 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 10:45:03 +00:00
wr%rosenauer.org
9101960dd0 Bug 366410 - ff/tb crashes when gtk settings are changed [@nsLookAndFeel::InitColors()], s+sr=roc
git-svn-id: svn://10.0.0.236/trunk@218193 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 09:26:47 +00:00
mozilla.mano%sent.com
fc496be6bc Bug 366589 - Avoid places URIs parsing in the history sidebar. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218192 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 09:00:47 +00:00
jwatt%jwatt.org
4d93ea01df Fixing bug 250470. Manipulating SVGPathSegList through DOM causes seg fault in trunk. Patched by Jeff Schiller <codedread@gmail.com>. r=jwatt@jwatt.org, sr=tor@acm.org
git-svn-id: svn://10.0.0.236/trunk@218191 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 08:54:22 +00:00
Olli.Pettay%helsinki.fi
c125a79f0c Bug 364720, Allow creating proper xul command events using scripts, r+sr=sicking
git-svn-id: svn://10.0.0.236/trunk@218190 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 08:47:01 +00:00
ginn.chen%sun.com
ea66b15755 Bug 364275 some texts in Account Setting->Security dialog need LABEL_FOR set
patch by Evan.Yan @ sun.com r=mscott a=mscoot


git-svn-id: svn://10.0.0.236/trunk@218188 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 06:47:36 +00:00
nelson%bolyard.com
6785167326 Convert from calling PR_GetIPNodeByName to calling PR_GetAddrInfoByName.
Bug 324305. Patch by wtchang.  r=nelson


git-svn-id: svn://10.0.0.236/trunk@218187 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 04:29:11 +00:00
wtchang%redhat.com
9b59ea464e Bug 254983: implemented PR_DetachThread for Unix. r=nelsonb
git-svn-id: svn://10.0.0.236/trunk@218185 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 02:06:17 +00:00
brendan%mozilla.org
312daad921 Fix js_IsScopeLocked assertion (366606, r=sayrer).
git-svn-id: svn://10.0.0.236/trunk@218181 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 00:47:24 +00:00
jst%mozilla.org
0530ef12c6 Fixing bug 366393. Attempt to schedule GC between pageloads when possible rather than slowing down page load with GC calls while loading. r+sr=bugmail@sicking.cc
git-svn-id: svn://10.0.0.236/trunk@218180 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-11 00:02:58 +00:00
dmose%mozilla.org
ef3a12f11d Fix import-export bustage caused by wrong method call; patch by Stefan Sitter, r=dmose, no bug
git-svn-id: svn://10.0.0.236/trunk@218178 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 23:41:35 +00:00
martijn.martijn%gmail.com
2bdb1ce8b1 Bug 363960 – Crash when clicking on the image inside a designMode-enabled IFRAME [@ nsHTMLEditor::SetShadowPosition], r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@218171 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 22:44:29 +00:00
nrthomas%gmail.com
16c751a230 Handle an uncontactable tinderbox server more gracefully (don't overwrite state with null info), r=rhelmer
git-svn-id: svn://10.0.0.236/trunk@218170 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 22:42:05 +00:00
despotdaemon
970ad378db Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218169 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 22:33:21 +00:00
despotdaemon
7c5e16cb6e Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218168 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 22:33:05 +00:00
despotdaemon
4269e424a2 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218167 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 22:30:59 +00:00
despotdaemon
e25a7f7054 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218166 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 22:30:37 +00:00
despotdaemon
e43d5ccae2 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218165 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 22:21:54 +00:00
brendan%mozilla.org
3630262087 Add macrology for presetting double hashtable capacity to avoid growth given a known initial population (356116, r=dbaron).
git-svn-id: svn://10.0.0.236/trunk@218164 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 22:11:34 +00:00
scott%scott-macgregor.org
940d4a8b58 Bug #363459 --> update credits list.
git-svn-id: svn://10.0.0.236/trunk@218163 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 21:58:59 +00:00
mvl%exedo.nl
2c602ad5e7 bustage fix for bug 364841
git-svn-id: svn://10.0.0.236/trunk@218162 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 21:55:41 +00:00
sspitzer%mozilla.org
6adfed8bfd fix for bug #364599: some newly created profile files are write protected.
For Firefox 2.0.0.1-de, the default bookmarks.html, localstore.rdf, and mimeTypes.rdf (as well as search.rdf, but that is unused) files had the wrong permissions, which caused several problems.

Going forward, bsmedberg has made it so the build system will fix this problem if it happens again.  But for those 2.0.0.1-de users who were affected, this change will fix the permissions on these files.

r=bsmedberg


git-svn-id: svn://10.0.0.236/trunk@218161 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 21:48:07 +00:00
scott%scott-macgregor.org
b13812731e Bug #333607 --> download manager: unable to save link target or save images.
Patch by bisi
sr=mscott


git-svn-id: svn://10.0.0.236/trunk@218159 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 21:32:23 +00:00
despotdaemon
2b0a110b03 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218158 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 21:31:22 +00:00
despotdaemon
0f69669a02 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218157 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 21:29:40 +00:00
despotdaemon
a4ea3b034c Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218156 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 21:28:42 +00:00
despotdaemon
10f57eb845 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218155 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 21:26:01 +00:00
despotdaemon
b36ab1e499 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218154 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 21:25:35 +00:00
despotdaemon
28d32f2514 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218153 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 21:24:55 +00:00
despotdaemon
f118a80b21 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218152 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 21:18:26 +00:00
mattwillis%gmail.com
4228ca2436 No bug. Fixes typo in CAL_ATTENDEE_CID's contract ID.
git-svn-id: svn://10.0.0.236/trunk@218150 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 21:01:52 +00:00
mvl%exedo.nl
36e856da87 Bug 364841: Unify ics provider serialization and parsing with the ics import/export code. r=lilmatt/jminta
git-svn-id: svn://10.0.0.236/trunk@218149 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 20:52:20 +00:00
mvl%exedo.nl
404c69b2fe Bug 364841: Unify ics provider serialization and parsing with the ics import/export code. r=lilmatt/jminta
git-svn-id: svn://10.0.0.236/trunk@218147 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 20:51:23 +00:00
aaronleventhal%moonset.net
3ad1ba042c Bug 366520. Extra unnecessary a11y cache invalidations and events as XUL doc loadsExtra unnecessary cache invalidations and events as XUL doc loads. r=ginn.chen
git-svn-id: svn://10.0.0.236/trunk@218146 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 20:25:20 +00:00
cls%seawood.org
6475f72697 Use consistent time source for builds by having client send the build end timestamp. Fallback to using mail processing time as end timestamp if client doesn't send one.
Bug #363102 r=bear


git-svn-id: svn://10.0.0.236/trunk@218142 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 19:36:19 +00:00
lpsolit%gmail.com
cea5c02e51 Bug 348281: importxml.pl dies if there is no target milestone or the target milestone is empty - Patch by Guzmán Brasó <gbn@hqso.net> r/a=LpSolit
git-svn-id: svn://10.0.0.236/trunk@218139 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 19:19:00 +00:00
lpsolit%gmail.com
14a1e8e092 Bug 366593: everconfirmed is no longer passed to XML bug files - Patch by Frédéric Buclin <LpSolit@gmail.com> r=ghendricks a=LpSolit
git-svn-id: svn://10.0.0.236/trunk@218138 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 19:12:26 +00:00
mike.morgan%oregonstate.edu
9da7654a11 Checking in PFS modifications for Java from bug 366129.
git-svn-id: svn://10.0.0.236/trunk@218136 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 18:55:33 +00:00
ghendricks%novell.com
5e333dccdf caserun->switch should always set_as_current the switched to caserun
git-svn-id: svn://10.0.0.236/trunk@218129 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 17:14:34 +00:00
crowder%fiverocks.com
1b4d056253 Bug 355497: infinite recursion with Array.slice/getter for 0. Patch by Seno.Aiko@gmail.com, r=crowder
git-svn-id: svn://10.0.0.236/trunk@218128 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 17:04:35 +00:00
tor%cs.brown.edu
ee748ce09c Bug 362540 - Switch nsSVGGeometryFrame from cairo to thebes. r=jwatt, sr=roc
git-svn-id: svn://10.0.0.236/trunk@218127 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 17:01:20 +00:00
scott%scott-macgregor.org
907b0f3c0e Bug #364090 --> remove accidental \n when appending the preview text.
git-svn-id: svn://10.0.0.236/trunk@218126 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 16:30:57 +00:00
reed%reedloden.com
7a4e1c1232 Bug 365443 - "Bugmail for new bugs without flags contains two unneeded lines" [p=reed r=LpSolit a=LpSolit]
git-svn-id: svn://10.0.0.236/trunk@218125 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 16:21:00 +00:00
bienvenu%nventure.com
561a297e66 tags and junk status sometimes lost when using drag drop to move a message from imap to local, sr=mscott 365858
git-svn-id: svn://10.0.0.236/trunk@218124 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 16:19:52 +00:00
enndeakin%sympatico.ca
1757a3ca7e Bug 366473, scroll when editing a cell so that it is visible, r=neil
git-svn-id: svn://10.0.0.236/trunk@218123 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 16:01:10 +00:00
anton.bobrov%sun.com
f196e0bdb8 Bug 364812 merging Sun and Mozilla ldap tools
git-svn-id: svn://10.0.0.236/trunk@218121 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 15:54:50 +00:00
jminta%gmail.com
743f1f7a2a Bug 362507 - Give an event the default length, if switching from all-day. r=lilmatt, mvl
git-svn-id: svn://10.0.0.236/trunk@218120 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 15:15:47 +00:00
jminta%gmail.com
3f149b5bb6 Bug 361211 – Unselect items if the user clicks elsewhere in the view. r=lilmatt, mvl
git-svn-id: svn://10.0.0.236/trunk@218119 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 15:13:42 +00:00
jminta%gmail.com
eb35b097f5 Bug 353698 - Make sure to announce the fact that a selected event was deleted. r=lilmatt, mvl
git-svn-id: svn://10.0.0.236/trunk@218118 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 15:11:16 +00:00
jminta%gmail.com
ff57b5e4d8 Forgot review comment for bug 366145, r=lilmatt, mvl
git-svn-id: svn://10.0.0.236/trunk@218117 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 15:06:46 +00:00
jminta%gmail.com
b31e5b25c0 Make printed font color dependent on background color for the calendar, r=lilmatt, mvl
git-svn-id: svn://10.0.0.236/trunk@218116 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 15:03:32 +00:00
jminta%gmail.com
8a2322b810 Add migrated calendars to the composite, r=lilmatt, mvl
git-svn-id: svn://10.0.0.236/trunk@218115 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 15:00:59 +00:00
jminta%gmail.com
a4e2826e62 Error 'ArrayOfEvents[0] has no properties' in unifinder.js, r=lilmatt, mvl
git-svn-id: svn://10.0.0.236/trunk@218114 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 14:59:19 +00:00
Olli.Pettay%helsinki.fi
198d0768d1 Bug 358714 – implement accessible object for xforms minimal select in xhtml context, r=aaronr,aaronl, sr=neil
git-svn-id: svn://10.0.0.236/trunk@218113 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 14:39:44 +00:00
anton.bobrov%sun.com
6c5bc836d2 Bug 362619 merging Sun and Mozilla libldap: merging common srcs.
git-svn-id: svn://10.0.0.236/trunk@218112 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 12:52:33 +00:00
peterv%propagandism.org
76d5d4ba9f Fix for bug 366029 (xsl:copy doesn't instantiate its content as a template for children). r/sr=sicking.
git-svn-id: svn://10.0.0.236/trunk@218111 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 12:41:55 +00:00
sspitzer%mozilla.org
83c938c266 improve comments, per asaf. no bug #.
r=mano


git-svn-id: svn://10.0.0.236/trunk@218110 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 09:49:20 +00:00
sspitzer%mozilla.org
a212c3a6cd fix for bug #366481
blank menu item under the "File" menu in the places (organize bookmarks) dialog.

It is supposed to be a "Properties..." menu item, but that has been
moved back to under the "Edit" menu item (see bug #365538).

r=mano


git-svn-id: svn://10.0.0.236/trunk@218109 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 09:33:11 +00:00
mozilla%weilbacher.org
a2b9df40b8 [OS/2] Bug 355077: fix xulrunner-stub to work on OS/2, p=abwillis1+me, r=mkaply
git-svn-id: svn://10.0.0.236/trunk@218108 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 08:43:08 +00:00
stuart.morgan%alumni.case.edu
e602ea4c0b Camino only - Re-checking in stomped changes from bug 358686
git-svn-id: svn://10.0.0.236/trunk@218107 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 06:41:42 +00:00
ginn.chen%sun.com
d77e3cd468 Bug 363896 wizard dialogs do not fire events after hitting next button
patch by Evan.Yan at sun.com r=aaronleventhal


git-svn-id: svn://10.0.0.236/trunk@218106 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 06:34:39 +00:00
ginn.chen%sun.com
b0e2bb3dee Bug 363214 grabFocus to document frame doesn't remove focus from text entry
patch by Nian.Liu at sun.com r=aaronleventhal


git-svn-id: svn://10.0.0.236/trunk@218105 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 06:32:15 +00:00
scott%scott-macgregor.org
5ce946188f Bug #366516 --> dotmac accounts should use imap over ssl and smtp with tls. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@218104 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 06:00:20 +00:00
joshmoz%gmail.com
6fa1c3ca62 remove some duplicate assignments. b=366519 r=kreeger
git-svn-id: svn://10.0.0.236/trunk@218103 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 05:43:13 +00:00
nelson%bolyard.com
afd3149000 Bug 364684. Fix session object handle counter overflows. r=rrelyea,wtchang
git-svn-id: svn://10.0.0.236/trunk@218100 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 04:47:57 +00:00
nelson%bolyard.com
fbdab43d95 Bug 366390. correct misleading function names in fipstest. r=glen.beasley
git-svn-id: svn://10.0.0.236/trunk@218099 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 04:14:30 +00:00
scott%scott-macgregor.org
f28c15b770 Bug #302470 --> saved search folders containing non-ascii characters aren't displayed correctly in the folder pane. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@218098 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 04:04:40 +00:00
scott%scott-macgregor.org
154fd43330 Bug #364090 --> experiment on the trunk with showing message preview text appended to the subject in the message list pane.
sr=bievenu


git-svn-id: svn://10.0.0.236/trunk@218097 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 04:03:04 +00:00
stridey%gmail.com
fb74e33a14 Camino only - Bug 366295: Add 'space', 'separator', and 'customize' items to download window toolbar. r=hwaara sr=smorgan
git-svn-id: svn://10.0.0.236/trunk@218096 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 02:21:34 +00:00
brendan%mozilla.org
7c11ff927b Fix bogus assertion and improve comment per mrbkap's suggestion (366468).
git-svn-id: svn://10.0.0.236/trunk@218095 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-10 01:47:58 +00:00
alexei.volkov.bugs%sun.com
a3ba9072c1 This patch incorporates additional suggestions to 342461 fix from Wan-Teh review.
git-svn-id: svn://10.0.0.236/trunk@218093 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 23:39:08 +00:00
mozilla.mano%sent.com
b3083a3b14 Bug 365538 - 'Move Bookmark(s)' UI in Places Organizer. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218092 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 23:00:23 +00:00
mozilla.mano%sent.com
319864e7f8 Bug 331856 - Middle-clicking Bookmarks Toolbar / non-bookmark items in Bookmarks menu opens all bookmarks in tabs. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218091 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 22:57:03 +00:00
mozilla.mano%sent.com
4a73f4368c Bug 366474 - rootNodeIsSelected is not reliable for the menu view. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218090 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 22:48:50 +00:00
bienvenu%nventure.com
ab78a0c391 fix 362241, currently selected message not reselected after automatic compactions, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@218089 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 22:44:11 +00:00
ghendricks%novell.com
291dfd335c Allow change of case in category and build names
git-svn-id: svn://10.0.0.236/trunk@218088 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 22:11:58 +00:00
ccooper%deadsquid.com
bbab6b93ec - some edit users interface improvements i've had sitting in my tree for a while
git-svn-id: svn://10.0.0.236/trunk@218087 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 21:44:45 +00:00
ghendricks%novell.com
b07c908d35 Copy compoenets field when you copy test cases.
git-svn-id: svn://10.0.0.236/trunk@218086 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 21:42:41 +00:00
richm%stanfordalumni.org
a403a63bac Bump rev to 2
- Remove buildroot = "/" checking
- Remove buildroot removal from %%build section


git-svn-id: svn://10.0.0.236/trunk@218083 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 21:32:25 +00:00
tor%cs.brown.edu
ea0e16f461 Bug 326143 - floodColor and floodOpacity should be non-inherited
properties.  r=dbaron


git-svn-id: svn://10.0.0.236/trunk@218080 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 20:40:09 +00:00
gavin%gavinsharp.com
f00a54d77b Bug 365313: Adjust tabbrowser tabs' border-radius to slightly improve appearance, patch by Dão Gottwald <bugzilla@design-noir.de>, r=me
git-svn-id: svn://10.0.0.236/trunk@218078 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 20:33:51 +00:00
gavin%gavinsharp.com
7fde49dff0 Bug 365996: Take advantage of old yes/no constant in nsIPromptService, patch by Ryan Jones <bugs@ryan-jones.com>, r=mscott for /mail, r=neil for /xpfe and /mailnews, r=ctho for /suite, r=me for the rest
git-svn-id: svn://10.0.0.236/trunk@218077 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 20:29:09 +00:00
reed%reedloden.com
4d21e78c14 Bug 366164 - "[BUGZILLA] Mozbot does not decode quoted-printable messages correctly" [p=reed r=wicked]
git-svn-id: svn://10.0.0.236/trunk@218076 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 20:25:52 +00:00
gavin%gavinsharp.com
dff7100f66 Bustage fix
git-svn-id: svn://10.0.0.236/trunk@218075 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 20:18:24 +00:00
gavin%gavinsharp.com
d3c4010df7 Bug 365867: remove helperapplications.js, since it's unused, r=mano
git-svn-id: svn://10.0.0.236/trunk@218074 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 20:04:44 +00:00
gavin%gavinsharp.com
d7d1bd6a5e Bug 365611: fix crash [@ nsSVGDocument::GetRootElement] due to null mRootContent, patch by Nickolay Ponomarev <asqueella@gmail.com>, r+sr=tor
git-svn-id: svn://10.0.0.236/trunk@218073 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 20:03:26 +00:00
gavin%gavinsharp.com
fcba70756a Bug 365151: fix crash [@ nsStyleContext::GetRuleNode] or [@ nsTreeColumn::GetContent] due to stale nsTreeColumn::mFrame, patch by Nickolay Ponomarev <asqueella@gmail.com>, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@218072 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 19:59:38 +00:00
gavin%gavinsharp.com
9429291d29 Bug 361154 followup: make sure not to return an unitialized isFlatMenus, patch by Ryan Jones <bugs@ryan-jones.com>, r=ere, sr=roc
git-svn-id: svn://10.0.0.236/trunk@218071 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 19:57:32 +00:00
gavin%gavinsharp.com
a2e237be77 Bug 273496: pressing 'get new messages' shouldn't ask to send unsent messages when going online, patch by Magnus Melin <mkmelin+mozilla@iki.fi>, r=mscott
git-svn-id: svn://10.0.0.236/trunk@218070 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 19:53:35 +00:00
gavin%gavinsharp.com
9fa3f2425a Bug 231403: fix reference to nonexistent xpcom.properties, patch by Ryan Jones <bugs@ryan-jones.com>, r=smontagu
git-svn-id: svn://10.0.0.236/trunk@218069 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 19:46:16 +00:00
gavin%gavinsharp.com
bff28a3f1b Bug 298960: improve -remote openURL() support for URLs that contain commas, r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@218068 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 19:41:10 +00:00
scott%scott-macgregor.org
e031a00bfb Bug #333607 --> download manager: unable to save link target. Try out bisi's patch on the trunk.
sr=mscott


git-svn-id: svn://10.0.0.236/trunk@218067 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 19:38:58 +00:00
scott%scott-macgregor.org
b8ac89f0cc Remove some debugging code introduced by Bug #366016
git-svn-id: svn://10.0.0.236/trunk@218066 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 19:30:48 +00:00
bienvenu%nventure.com
1ac0e314aa fix 364815 js errors closing/opening compose window after opening contacts panel, patch by mcow, r=mscott, sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@218064 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 18:52:24 +00:00
richm%stanfordalumni.org
3ef8d02b46 Resolves: bug 366335
Description: Make libldif public
Fix Description: Copy/paste the makefile code to build the shared library in addition to the static library from libldap/Makefile.in.  The build will now build both libldif60.so and libldif60.a, and package/distribute both of them.  I changed include/Makefile.in to export ldif.h with the other public header files, and changed ldif.h to add a blurb explaining that these interfaces were formerly private and use with caution.
Since this is a non trivial change, I bumped the version number to 6.0.1.


git-svn-id: svn://10.0.0.236/trunk@218063 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 18:43:03 +00:00
enndeakin%sympatico.ca
0e03434cfd Bug 366339, check range when setting the value property of a scale, r=mano
git-svn-id: svn://10.0.0.236/trunk@218061 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 16:38:54 +00:00
lpsolit%gmail.com
e8d360a0df Bug 365444: Obsolete custom fields are shown in e-mail notifications for new bugs, despite they shouldn't - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
git-svn-id: svn://10.0.0.236/trunk@218060 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 16:16:54 +00:00
alex%croczilla.com
a81d322c9d Switch jssh to frozen linkage. Not part of default builds.
git-svn-id: svn://10.0.0.236/trunk@218057 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 14:21:51 +00:00
kairo%kairo.at
1fcbc8a920 Bug 366318 - wrong references to products/seamonkey, r=Standard8 sr=Neil
git-svn-id: svn://10.0.0.236/trunk@218056 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 14:17:48 +00:00
longsonr%gmail.com
e20fd15388 Bug 264132 û Implement fallback for SVG paint servers r=dbaron,sr=tor
git-svn-id: svn://10.0.0.236/trunk@218053 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 11:02:17 +00:00
timeless%mozdev.org
7e9b34c84d Bug 344547 [Version 2.20+] bugzilla.mozilla.org thinks I'm using Mac OS X 10.3, when I am using Mac OS X 10.4
r=justdave a=justdave

This is a meme change. enter_bug has supported lists for a while, but the code for the most part didn't take advantage of it.
This is round one of the change, where each match is added to the list of possibles starting with the best match.

enter_bug will already pick the first available match and use it.


git-svn-id: svn://10.0.0.236/trunk@218052 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 08:39:51 +00:00
Olli.Pettay%helsinki.fi
94c47da595 Bug 363702, Merge nsXBLWindowHandler to nsXBLWindowKeyHandler, r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@218051 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 07:33:18 +00:00
brendan%mozilla.org
560879dc09 Fix LOCKED_OBJ_CHECK_SLOT misnomers; tweak comment.
git-svn-id: svn://10.0.0.236/trunk@218050 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 06:27:48 +00:00
gavin%gavinsharp.com
95b6b2248f Bug 341872: Break the cyclic reference between the HelperApps object and the RDF datasource to avoid leaks when downloading a file and choosing 'open with', patch by Regis Caspar <regis.caspar+bz@gmail.com>, r=me
git-svn-id: svn://10.0.0.236/trunk@218049 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 06:20:52 +00:00
brendan%mozilla.org
bff43f9cdc Fix 366396, r=mrbkap.
git-svn-id: svn://10.0.0.236/trunk@218048 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 05:59:48 +00:00
mattwillis%gmail.com
3ac141ff59 cvs conflict on mozilla/LICENSE is causing burnination.
git-svn-id: svn://10.0.0.236/trunk@218047 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 05:58:20 +00:00
cvshook%sicking.cc
2ea52e9b57 fix redness
git-svn-id: svn://10.0.0.236/trunk@218046 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 02:02:39 +00:00
graydon%mozilla.com
53b8d83255 Bug 366166: fix for critical crasher caused by XPCOM cycle collector.
r/sr=sicking


git-svn-id: svn://10.0.0.236/trunk@218045 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 01:44:16 +00:00
reed%reedloden.com
74ecb7f290 Bug 364858 - "Add hook in user-error.html.tmpl for text after "auth_failure" message" [p=reed r=gerv a=justdave]
git-svn-id: svn://10.0.0.236/trunk@218044 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 01:42:34 +00:00
graydon%mozilla.com
84186f595b Bug 366063: better fix to critical crasher, replacing band-aid submitted in 333078.
r=dbaron


git-svn-id: svn://10.0.0.236/trunk@218043 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 01:33:02 +00:00
ted.mielczarek%gmail.com
13e3a1ae50 bug 366287, Undoing the insertion of a new attribute doesn't work. patch by ajvincent@gmail.com, r+sr=neil
git-svn-id: svn://10.0.0.236/trunk@218042 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 01:26:23 +00:00
ted.mielczarek%gmail.com
7cefe94536 bug 365356, crashreporter.exe/ini not installed by NSIS installer. r=Rob Strong
git-svn-id: svn://10.0.0.236/trunk@218041 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 01:24:24 +00:00
cvshook%sicking.cc
b7959518a4 Bug 364692: Process pending script requests asynchronously when the last blocker is removed. r/sr=jst
git-svn-id: svn://10.0.0.236/trunk@218040 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 01:07:29 +00:00
alexei.volkov.bugs%sun.com
11990ac0ef 279085: NSS tools display public exponent as negative number. r=nelson
git-svn-id: svn://10.0.0.236/trunk@218039 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 00:56:28 +00:00
ghendricks%novell.com
91cfe2e35d Added rudimentary saved search support. NEEDS TESTING!
git-svn-id: svn://10.0.0.236/trunk@218038 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 00:41:23 +00:00
alexei.volkov.bugs%sun.com
35d51963b5 365966: infinite recursive call in VFY_VerifyDigestDirect. r=nelson
git-svn-id: svn://10.0.0.236/trunk@218037 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 00:37:20 +00:00
jwalden%mit.edu
14eca0a632 Bug 342662 - JS strings aren't properly escaped before being evaluated in the error console. r=gavin
git-svn-id: svn://10.0.0.236/trunk@218034 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 00:20:14 +00:00
gijskruitbosch%gmail.com
5b47611476 Bug 363965 - Fix regression in text selection
r=samuel@sieb.net (Samuel Sieb)
ChatZilla Only.


git-svn-id: svn://10.0.0.236/trunk@218033 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 00:13:42 +00:00
bzbarsky%mit.edu
30df0ca086 We might not have a scrollbar frame; deal with that. Bug 366112, r+sr=roc, a=jay for 1.8.0 and 1.8.1 branches
git-svn-id: svn://10.0.0.236/trunk@218032 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-09 00:13:16 +00:00
dbaron%dbaron.org
4ee1d7a1b0 Use a different internal icon format ifdef MOZ_CAIRO_GFX that is easier to convert to the image frame format we use, and make the relevant icon channel implementations produce it. b=333253 r=pavlov
git-svn-id: svn://10.0.0.236/trunk@218030 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 23:58:12 +00:00
mozilla.mano%sent.com
999a4370c1 Bug 366372 - 'Get Info' (properteis) should be disabled for items under a live-bookmark folder. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218029 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 23:54:05 +00:00
dietrich%mozilla.com
1e1c61058b Bug 366302 [SessionStore] only one text element/text area is saved (for zeniko, r=dietrich)
git-svn-id: svn://10.0.0.236/trunk@218028 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 23:36:51 +00:00
scott%scott-macgregor.org
8a478e37fb Bug #366368 --> error when looking for dictionaries for Thunderbird on a.m.o. Update the dictionary url. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@218027 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 23:19:23 +00:00
crowder%fiverocks.com
0c197efd33 Bug 374155: fix for too much recursion in E4X literal. Patch by Seno.Aiko@gmail.com. r=crowder
git-svn-id: svn://10.0.0.236/trunk@218026 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 23:04:28 +00:00
mozilla.mano%sent.com
4383542683 Bug 366174 - Open in Tabs context menu item is enabled for empty folders. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@218025 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 23:03:20 +00:00
despotdaemon
5cc802dbdb Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218024 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 22:57:55 +00:00
mozilla%weilbacher.org
ed30781944 [OS/2] Bug 352860: do not include pure.h on OS/2 to get xulrunner building, p=abwillis1, r=mkaply
git-svn-id: svn://10.0.0.236/trunk@218023 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 22:38:40 +00:00
scott%scott-macgregor.org
f85e792028 Bug #366016 --> reduce quoted text in our message preview string to "..."
Bug #346873 --> decode quoted printable and base64 when extracting the message preview text (patch by bienvenu)
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@218022 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 22:38:36 +00:00
scott%scott-macgregor.org
a6757c31d5 Bug #365879 --> clobber the mac builds to pick up the movemail config change
git-svn-id: svn://10.0.0.236/trunk@218021 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 22:27:33 +00:00
despotdaemon
e9a3b0ad12 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218020 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 22:19:39 +00:00
ccooper%deadsquid.com
3c0a1ed584 - fix status toggle
git-svn-id: svn://10.0.0.236/trunk@218019 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 22:12:08 +00:00
ghendricks%novell.com
ba20e8ede9 Add combobox to tags field in filter
git-svn-id: svn://10.0.0.236/trunk@218018 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 21:48:18 +00:00
brendan%mozilla.org
a228a2064e Fix regression from bug 365851 (366292, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@218016 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 20:36:22 +00:00
lpsolit%gmail.com
ab80207287 Bug 365470: The "Locate Attachment" page still has an Edit button - Patch by bmo2007@rsz.jp r=LpSolit a=myk
git-svn-id: svn://10.0.0.236/trunk@218015 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 20:33:35 +00:00
igor.bukanov%gmail.com
51498061ef Bug 366312: fixing document.all detecting regression from bug 365608. r=brendan
git-svn-id: svn://10.0.0.236/trunk@218014 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 20:29:14 +00:00
despotdaemon
82aad2794f Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218013 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 20:01:30 +00:00
brendan%mozilla.org
924e816d0d Followup warning fix for 128150.
git-svn-id: svn://10.0.0.236/trunk@218012 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 19:37:09 +00:00
brendan%mozilla.org
21badae49f Remove property cache (128150, r=igor).
git-svn-id: svn://10.0.0.236/trunk@218011 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 19:34:43 +00:00
cltbld
5c22f67ee9 Automated update from host egg.build.mozilla.org
git-svn-id: svn://10.0.0.236/trunk@218009 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 19:11:02 +00:00
despotdaemon
a65e563930 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218008 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 19:05:31 +00:00
despotdaemon
fdb7d618d6 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218007 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 19:04:09 +00:00
pavlov%pavlov.net
543c522ea8 removing xmlterm from the tree. bug 366341. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@218006 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 19:03:00 +00:00
gijskruitbosch%gmail.com
4158cec2bf Revert License to previous version to make the SeaMonkey installer suck less.
r=gerv@gerv.net (Gervase Markham)
p=bugzilla@mcsmurf.de (Frank Wein)
No code changes.


git-svn-id: svn://10.0.0.236/trunk@218005 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 18:59:04 +00:00
despotdaemon
f934178e60 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218004 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 18:51:20 +00:00
despotdaemon
dfdd66ef06 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218003 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 18:48:26 +00:00
despotdaemon
8160613c72 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218002 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 18:47:41 +00:00
despotdaemon
1a436a1717 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@218001 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 18:47:21 +00:00
bienvenu%nventure.com
f2310c218f back out fix for 365751 because it caused a regression saving drafts, copying to local sent folder, and send later, 366151
git-svn-id: svn://10.0.0.236/trunk@218000 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 18:46:42 +00:00
despotdaemon
71c2025e28 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@217999 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 18:45:49 +00:00
dbaron%dbaron.org
349fc739a8 Add code so that reftest quits properly on Mac OS X. Patch by Rob Campbell <rcampbell@mozilla.com>. r=dbaron b=363985
git-svn-id: svn://10.0.0.236/trunk@217998 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 18:22:48 +00:00
gijskruitbosch%gmail.com
8722e0e321 Bug 343416 - implement nsIIdleService - API to get the last time user activity occurred on the system
r=roc@ocallahan.org (Robert O'Callahan)
sr=neil@parkwaycc.co.uk (Neil Rashbrook)


git-svn-id: svn://10.0.0.236/trunk@217997 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 18:13:16 +00:00
tor%cs.brown.edu
6dff24dcdc Bug 326143 - Implement feFlood and feTurbulence filter elements.
Patch by tor and malex@cs.utexas.edu, r=tor, sr=roc


git-svn-id: svn://10.0.0.236/trunk@217993 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 16:48:56 +00:00
enndeakin%sympatico.ca
057a845ec2 Bug 365742, crash with drawing empty images in trees, r+sr=neil
git-svn-id: svn://10.0.0.236/trunk@217992 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 16:31:21 +00:00
mattwillis%gmail.com
b8e8e2fcfb bug 360532 - Add missing license block. r=mickey,jminta
git-svn-id: svn://10.0.0.236/trunk@217990 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 15:53:23 +00:00
mozilla.mano%sent.com
75085c4466 Follow up to bug 366272, also make sure not to break macBrowserOverlay in --disable-places builds
git-svn-id: svn://10.0.0.236/trunk@217988 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 10:47:07 +00:00
mozilla.mano%sent.com
a88ea621ee Bug 366272 - --disable-places broken due to missing overlay. patch from Mook <mook.moz+mozbz@gmail.com>, r=me.
git-svn-id: svn://10.0.0.236/trunk@217987 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 10:44:55 +00:00
longsonr%gmail.com
ef1ef07b88 Bug 358032 - SVG text too big when minimum font size set. r=tor, sr=roc
git-svn-id: svn://10.0.0.236/trunk@217986 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 10:10:13 +00:00
neil%parkwaycc.co.uk
9d24b7f995 Rewrite code to avoid using maxLevel b=366183 r=enndeakin sr=roc
git-svn-id: svn://10.0.0.236/trunk@217985 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 09:15:19 +00:00
brendan%mozilla.org
b47fd8b391 Fix copy/paste error in assertion (366288, r=me).
git-svn-id: svn://10.0.0.236/trunk@217984 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 09:01:41 +00:00
jruderman%hmc.edu
34040481f6 Bug 321073 - "ASSERTION: Should not be called: 'Error' (nsGridLayout2::GetRowCount should not be called)". Patch by Andreas Lange, r=enndeakin, sr=neil rashbrrok.
git-svn-id: svn://10.0.0.236/trunk@217983 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 05:58:43 +00:00
joshmoz%gmail.com
c4f058f047 remove duplicate assignment. no bug, r=cl
git-svn-id: svn://10.0.0.236/trunk@217982 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 05:50:49 +00:00
cltbld
3e32bc7591 Automated update from host egg.build.mozilla.org
git-svn-id: svn://10.0.0.236/trunk@217981 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 05:42:15 +00:00
scott%scott-macgregor.org
44527e8a03 Bug #365879 --> don't ship movemail.rdf on the mac for thunderbird, this can be installed as an extension now. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@217980 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 05:33:12 +00:00
despotdaemon
5dd17b675d Pseudo-automatic update of changes made by justdave@bugzilla.org.
git-svn-id: svn://10.0.0.236/trunk@217979 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 05:28:17 +00:00
bzbarsky%mit.edu
59510f3817 Fix more bustage. Bug 243370
git-svn-id: svn://10.0.0.236/trunk@217978 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 03:56:06 +00:00
bzbarsky%mit.edu
0a27b5c5d4 Fixing more bustage, bug 243370.
git-svn-id: svn://10.0.0.236/trunk@217977 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 03:49:59 +00:00
bzbarsky%mit.edu
b285f04433 Fix build bustage. Bug 243370.
git-svn-id: svn://10.0.0.236/trunk@217976 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 03:27:19 +00:00
stridey%gmail.com
90319b71df Camino only - Bug 366223: Localized string for 'Reveal in Bookmark Manager'
git-svn-id: svn://10.0.0.236/trunk@217975 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 03:06:44 +00:00
bzbarsky%mit.edu
c11f0d4c10 Make mochitest fail if an uncaught exception is thrown during one of the
tests.  Bug 365929, r=sayrer


git-svn-id: svn://10.0.0.236/trunk@217974 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 02:59:17 +00:00
bzbarsky%mit.edu
9e56e89a01 deCOMtaminate nsIFrame::GetMinSize/GetPrefSize/GetMaxSize. Bug 243370, patch
by Andreas Lange <anlan@lange.cx>, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@217973 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 02:57:59 +00:00
bzbarsky%mit.edu
c51580e755 Return an already-addrefed nsTreeColumn instead of making assumptions about
object lifetimes.  Bug 309429 followup, patch by Nickolay Ponomarev
<asqueella@gmail.com>, r+sr=neil


git-svn-id: svn://10.0.0.236/trunk@217972 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 02:41:05 +00:00
mats.palmgren%bredband.net
5493e695b4 Make Backspace do nothing by default for SeaMonkey on Linux (sync w. Firefox). b=358764 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@217970 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 01:55:06 +00:00
timeless%mozdev.org
c19c0a7e6d Bug 365496 admin/milestones/list has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217969 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 01:31:23 +00:00
timeless%mozdev.org
138426ebff Bug 365520 attachment/edit has unescaped &
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217968 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 01:29:15 +00:00
timeless%mozdev.org
358c77f464 Bug 365554 global/user-error uses p as br
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217967 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:57:08 +00:00
timeless%mozdev.org
92c5475e6d Bug 365522 reports/create-chart has unescaped &
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217966 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:56:45 +00:00
timeless%mozdev.org
aaf602e855 Bug 365518 bug/process/verify-new-product uses strange mark up
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217965 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:56:00 +00:00
timeless%mozdev.org
3c20a4139f Bug 365516 attachment/confirm-delete uses p as br
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217964 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:55:46 +00:00
timeless%mozdev.org
daa47c6109 Bug 365515 admin/versions/updated has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217963 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:55:28 +00:00
timeless%mozdev.org
7135e88b68 Bug 365514 admin/versions/select-product has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217962 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:55:10 +00:00
timeless%mozdev.org
f59fc75d48 Bug 365513 admin/versions/list has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217961 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:54:55 +00:00
timeless%mozdev.org
7ca0b4d903 Bug 365512 admin/versions/footer produces invalid markup
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217960 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:54:38 +00:00
timeless%mozdev.org
f74b4e2980 Bug 365511 admin/versions/edit has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217959 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:54:19 +00:00
timeless%mozdev.org
edfab4ddc6 Bug 365510 admin/versions/deleted has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217958 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:53:59 +00:00
timeless%mozdev.org
da97f1afa6 Bug 365509 admin/versions/created has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217957 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:53:32 +00:00
timeless%mozdev.org
075189cf53 Bug 365508 admin/versions/create useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217956 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:53:14 +00:00
timeless%mozdev.org
21f8c185ef Bug 365507 admin/versions/confirm-delete uses strange mark up
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217955 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:52:53 +00:00
timeless%mozdev.org
7e68664044 Bug 365506 admin/products/updated uses strange mark up
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217954 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:52:36 +00:00
timeless%mozdev.org
6f1156805b Bug 365505 admin/products/list-classifications has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217953 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:52:17 +00:00
timeless%mozdev.org
d126cc5aef Bug 365504 admin/products/list has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217952 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:51:52 +00:00
timeless%mozdev.org
4432a5d253 Bug 365503 admin/products/footer produces invalid markup
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217951 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:51:28 +00:00
timeless%mozdev.org
1a79799cbc Bug 365502 admin/products/confirm-delete uses strange mark up
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217950 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:51:01 +00:00
timeless%mozdev.org
0cbf2fb0ed Bug 365500 admin/products/groupcontrol/edit uses p as br
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217949 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:50:39 +00:00
timeless%mozdev.org
468c7f5e44 Bug 365498 admin/milestones/updated has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217948 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:50:12 +00:00
timeless%mozdev.org
9f8c1e922b Bug 365497 admin/milestones/select-product has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217947 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:49:53 +00:00
timeless%mozdev.org
7011a31aa0 Bug 365484 admin/fieldvalues/deleted has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217946 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:01:04 +00:00
timeless%mozdev.org
0cb1b6a650 Bug 365483 admin/fieldvalues/created has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217945 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:00:45 +00:00
timeless%mozdev.org
07ad4b64e1 Bug 365482 admin/fieldvalues/create has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217944 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-08 00:00:23 +00:00
timeless%mozdev.org
22f030239c Bug 365480 admin/components/select-product has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217943 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:59:50 +00:00
timeless%mozdev.org
b9a882b13f Bug 365456 bug/summarize-time uses p as br
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217942 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:59:20 +00:00
timeless%mozdev.org
21b3d695bc Bug 365256 Period is on the wrong side of a bunch of other parentheses
r=lpsolit a=justdave


git-svn-id: svn://10.0.0.236/trunk@217941 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:58:22 +00:00
timeless%mozdev.org
0f8dc25589 Bug 365221 period is on the wrong side of parentheses in priority description
r=lpsolit a=justdave


git-svn-id: svn://10.0.0.236/trunk@217940 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:56:10 +00:00
timeless%mozdev.org
dd032957ff Bug 365568 admin/group/edit has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217939 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:54:59 +00:00
timeless%mozdev.org
086032d031 Bug 365567 admin/fieldvalues/updated has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217938 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:54:33 +00:00
timeless%mozdev.org
b7fd4471f0 Bug 365566 . admin/fieldvalues/select-field has useless <p>
patch by bmo2007@rsz.jp r=wicked a=justdave


git-svn-id: svn://10.0.0.236/trunk@217937 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:54:10 +00:00
timeless%mozdev.org
34b4d9b411 Bug 365565 admin/fieldvalues/list has useless <p>
patch by bmo2007@rsz.jp r=wicked a=justdave


git-svn-id: svn://10.0.0.236/trunk@217936 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:53:50 +00:00
timeless%mozdev.org
58b75d4d23 Bug 365564 admin/components/updated uses strange mark up
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217935 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:53:03 +00:00
timeless%mozdev.org
2f344a49ac Bug 365563 admin/components/footer uses invalid mark up
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217934 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:52:36 +00:00
timeless%mozdev.org
4a2025bdf6 Bug 365562 admin/components/confirm-delete uses strange mark up
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217933 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:52:12 +00:00
timeless%mozdev.org
0b0339b425 Bug 365561 admin/classifications/del uses strange mark up
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217932 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:51:53 +00:00
timeless%mozdev.org
8689f22dd4 Bug 365560 account/prefs/permissions uses invalid usage for p
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217931 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:51:30 +00:00
timeless%mozdev.org
56aa1b3a09 Bug 365557 account/profile-activity has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217930 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:51:09 +00:00
timeless%mozdev.org
3a6c53b627 Bug 365556 global/confirm-user-match uses strange mark up/uses p as br
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217929 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:50:44 +00:00
timeless%mozdev.org
b99e293136 Bug 365555 . global/code-error uses strange mark up
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217928 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:50:04 +00:00
timeless%mozdev.org
55ceb89199 Bug 365495 . admin/milestones/footer produces invalid markup
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217927 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:49:40 +00:00
timeless%mozdev.org
3170c3fbbc Bug 365494 admin/milestones/edit has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217926 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:49:19 +00:00
timeless%mozdev.org
c609353c85 Bug 365493 admin/milestones/deleted has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217925 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:48:54 +00:00
timeless%mozdev.org
45f10f6760 Bug 365492 admin/milestones/created has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217924 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:48:25 +00:00
timeless%mozdev.org
3b278c0caf Bug 365491 admin/milestones/create has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217923 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:47:47 +00:00
timeless%mozdev.org
604b251e54 Bug 365487 admin/fieldvalues/footer produces invalid markup
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217922 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:47:13 +00:00
timeless%mozdev.org
01b3276b19 Bug 365486 admin/fieldvalues/edit has useless <p>
patch by bmo2007@rsz.jp r=timeless a=justdave


git-svn-id: svn://10.0.0.236/trunk@217921 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 23:46:37 +00:00
gijskruitbosch%gmail.com
d7ba775b4c Bug 340177 - add spell-checking to ChatZilla's input-field
r=silver@warwickcompsoc.co.uk (James Ross)
ChatZilla Only.


git-svn-id: svn://10.0.0.236/trunk@217920 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 14:40:12 +00:00
sergei_d%fi.tartu.ee
15685cfd40 Bug 361542 – [BeOS] Linking fails in toolkit/components, p=thesuckiestemail, r=benjamin
git-svn-id: svn://10.0.0.236/trunk@217919 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 12:47:59 +00:00
olav%bkor.dhs.org
de5a226883 Bug 366187: Bugmail should consider 'Any field not mentioned above changes' even when a 'known' field changes
Patch by Olav Vitters <olav@bkor.dhs.org> r=LpSolit a=myk


git-svn-id: svn://10.0.0.236/trunk@217918 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 11:17:59 +00:00
olav%bkor.dhs.org
3c74be906d Bug 366190: Remove obsolete 'compatibility' comment about sending mail to disabled accounts
Patch by Olav Vitters <olav@bkor.dhs.org> r=LpSolit a=myk


git-svn-id: svn://10.0.0.236/trunk@217917 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 11:16:27 +00:00
timeless%mozdev.org
387b9b3478 Bug 331023 Cleanup of IDL files; fixing type inconsistencies
r=neil sr=bz
change nsIXULTemplateBuilder and nsIEditor to reference nsIContent as an interface


git-svn-id: svn://10.0.0.236/trunk@217916 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 11:01:35 +00:00
timeless%mozdev.org
291717dd61 Bug 325539 typo in mozilla/js/jsd/idl/jsdIDebuggerService.idl
r=silver


git-svn-id: svn://10.0.0.236/trunk@217915 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 10:50:23 +00:00
timeless%mozdev.org
94195bc495 Bug 348879 case errors in jsshell help
r=brendan

i tried to fix the regression test so that it handles both the new and old spellings


git-svn-id: svn://10.0.0.236/trunk@217914 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 10:46:06 +00:00
mozilla.mano%sent.com
131424d0aa Bug 366196 - Live bookmarks folders are not readonly. r=sayrer.
git-svn-id: svn://10.0.0.236/trunk@217912 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 02:37:17 +00:00
mozilla.mano%sent.com
9ca4a35a24 Bug 366027 - Redo command is broken once a remove-separator command is undone. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@217910 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-07 00:46:55 +00:00
lpsolit%gmail.com
11e7dd3c3a Bug 366059: Include the attachment size when viewing bugs in the XML format - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=myk
git-svn-id: svn://10.0.0.236/trunk@217909 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 23:51:56 +00:00
brendan%mozilla.org
834076962c Igor's patch for simpler extended atom indexing (365608, tweaks and r=me).
git-svn-id: svn://10.0.0.236/trunk@217908 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 23:25:00 +00:00
graydon%mozilla.com
dea01bf08e Bug 333078, Temporary band-aid for nsImageDocument cycle collection crashers.
r=dbaron


git-svn-id: svn://10.0.0.236/trunk@217906 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 22:09:38 +00:00
igor.bukanov%gmail.com
f7e1d72b50 Bug 363603: JSObjectMap.nslots is removed as redundant. r=brendan
git-svn-id: svn://10.0.0.236/trunk@217905 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 22:03:06 +00:00
mats.palmgren%bredband.net
e7c2c3f107 Plug a leak of nsDirectionalFrames. b=365909 r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@217904 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 21:02:05 +00:00
lpsolit%gmail.com
c0129cdb87 Bug 365753: Incorrect "Cancel" link when moving bug to another product - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=justdave
git-svn-id: svn://10.0.0.236/trunk@217903 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 20:02:32 +00:00
lpsolit%gmail.com
7c02f5249a Bug 365403: Prevent tags from overwriting existing saved searches - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=justdave
git-svn-id: svn://10.0.0.236/trunk@217902 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 19:55:28 +00:00
lpsolit%gmail.com
0e176fe16f Bug 365401: CSS error in dependency-tree.css - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=justdave
git-svn-id: svn://10.0.0.236/trunk@217901 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 19:48:10 +00:00
lpsolit%gmail.com
f432cbcdea Bug 365129: When moving a bug to another product and the target product has only one component, version or target milestone, automatically select them instead of throwing an error - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=justdave
git-svn-id: svn://10.0.0.236/trunk@217900 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 19:39:20 +00:00
mattwillis%gmail.com
9975ced957 bug 366141 - Fixes javascript strict warnings. Patch by Stefan Sitter <ssitter@googlemail.com> r1/r2=jminta
git-svn-id: svn://10.0.0.236/trunk@217899 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 18:32:56 +00:00
jshin%mailaps.org
e40c197bd3 bug 266839 : opera profile migrator code treats UTF-8 as ASCII
r=mconnor, sr=darin


git-svn-id: svn://10.0.0.236/trunk@217897 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 17:33:05 +00:00
kaie%kuix.de
dc92322e19 Bug 164707, Provide a way to view/delete orphan certs
Supplemental patch
r=rrelyea


git-svn-id: svn://10.0.0.236/trunk@217894 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 16:36:19 +00:00
enndeakin%sympatico.ca
d2a5376241 Bug 366056, autocomplete selectionStart/selectionEnd cannot be modified, r=mano
git-svn-id: svn://10.0.0.236/trunk@217893 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 14:29:24 +00:00
mozilla%weilbacher.org
5553257d14 [OS/2] Bug 351246: Load Mozilla into Highmem on OS/2. Part 6, changes to NSS build config. r=mkaply, sr=wtc
git-svn-id: svn://10.0.0.236/trunk@217892 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 14:27:21 +00:00
lpsolit%gmail.com
ad165dafb7 Bug 365593: bz_webservices_demo.pl does not match the API as defined in the Webservices code - Patch by Mads Bondo Dydensborg <mbd@dbc.dk> r=mkanat a=myk
git-svn-id: svn://10.0.0.236/trunk@217891 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 14:20:16 +00:00
lpsolit%gmail.com
36afa0208a Bug 362996: email_in.pl throws warnings of uninitialized values when no content-type is given - Patch by Bill Barry <after.fallout@gmail.com> r=mkanat a=myk
git-svn-id: svn://10.0.0.236/trunk@217890 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 14:14:59 +00:00
bugzilla%standard8.demon.co.uk
eca58721e6 Bug 365576 Update SeaMonkey's copyright strings to 2007 (Help part) r=KaiRo,sr=Neil
git-svn-id: svn://10.0.0.236/trunk@217889 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 13:32:26 +00:00
nrthomas%gmail.com
5ba64b23f1 Bug 365350 - make all the nightly tinderboxes doing updates follow the app version automatically (trunk), r=preed
git-svn-id: svn://10.0.0.236/trunk@217887 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 11:48:38 +00:00
nrthomas%gmail.com
c945aeb10a Bug 365350 - make all the nightly tinderboxes doing updates to follow the app version automatically (trunk), r=preed
git-svn-id: svn://10.0.0.236/trunk@217886 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 11:40:00 +00:00
nelson%bolyard.com
80a8e751f8 Bug 321584. When importing a PKCS#12 file that has no friendly names,
construct new friendly names, so the import will succeed. r=neil.williams


git-svn-id: svn://10.0.0.236/trunk@217884 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 06:05:50 +00:00
nelson%bolyard.com
f0de83a6bb Bug 232600. Define MOZ_DEBUG_SYMBOLS in environment to create .pdb files
and install them in $DIST.   r=rrelyea,wtchang


git-svn-id: svn://10.0.0.236/trunk@217883 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 05:48:54 +00:00
alfred.peng%sun.com
96a1b2f759 Bug 363824. Add compiler setting for Solaris in build-seamonkey-util.pl.
r=rhelmer+preed.


git-svn-id: svn://10.0.0.236/trunk@217882 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 05:45:25 +00:00
philringnalda%gmail.com
d57173f4af Bug 365765: Update calendar copyright dates to 2007, r=lilmatt
git-svn-id: svn://10.0.0.236/trunk@217881 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 04:51:32 +00:00
philringnalda%gmail.com
42e10ce2b4 Bug 365785: Mac: Remove extra UTF-16 to UTF-8 conversion of InfoPlist.strings.in, r=lilmatt
git-svn-id: svn://10.0.0.236/trunk@217880 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 04:05:52 +00:00
scott%scott-macgregor.org
dfabba796e Bug #366093 --> gmail should use TLS not SSL for SMTP. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@217879 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 03:34:16 +00:00
mattwillis%gmail.com
2421e200a6 bug 366083 - Remove listeners on destruction of datepicker. r=jminta
git-svn-id: svn://10.0.0.236/trunk@217878 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 02:59:40 +00:00
wtchang%redhat.com
deb589b720 Bug 51429: in safe_pclose, we may call kill + waitpid(WNOHANG) 1000 times
without giving the child any time to receive the SIGKILL signal and
terminate, break out of the while loop, and leave the child behind as a
zombie process.  The patch is contributed by John G. Myers
<jgmyers@speakeasy.net> and Tomas Mraz of Red Hat. r=neil.williams,relyea


git-svn-id: svn://10.0.0.236/trunk@217877 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 01:45:56 +00:00
wtchang%redhat.com
d398cd2cd1 Bug 51429: make sure that safe_popen cannot fail (in the parent process)
after fork succeeded.  r=neil.williams


git-svn-id: svn://10.0.0.236/trunk@217876 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-06 01:18:24 +00:00
jst%mozilla.org
455f6f861c Landing 64-bit fixes for bug 333078. r=graydon@mozilla.com, sr=bugmail@sicking.cc
git-svn-id: svn://10.0.0.236/trunk@217873 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 23:59:18 +00:00
wtchang%redhat.com
7bbbf49477 Bug 363070: upgraded to NSS 3.11.5 Beta 1. r=kengert.
git-svn-id: svn://10.0.0.236/trunk@217871 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 23:52:29 +00:00
sayrer%gmail.com
da39974b3d Add test_bug365773.xul to index.html
git-svn-id: svn://10.0.0.236/trunk@217870 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 23:23:50 +00:00
wtchang%redhat.com
4fc6771a7c Bug 365703: added a level of parenthesis. Suggested by Mike Hommey.
Modified files: prlog.c prtrace.c


git-svn-id: svn://10.0.0.236/trunk@217863 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 22:30:38 +00:00
jst%mozilla.org
b2dbd93ff7 Fixing bug 337716. Swap two calls to avoid using a potentially dangling obj pointer. r=mrbkap@gmail.com, sr=bugmail@sicking.cc
git-svn-id: svn://10.0.0.236/trunk@217861 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 22:28:00 +00:00
wtchang%redhat.com
df5993f5a2 Bug 365703: turn off logging and tracing if the effective group ID is
different from the real group ID.  The patch is suggested by Mike Hommey
<mh+mozilla@glandium.org>.  r=nelsonb,wtc.
Modified files: prlog.c prtrace.c


git-svn-id: svn://10.0.0.236/trunk@217860 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 22:26:27 +00:00
wtchang%redhat.com
513e436274 Bugzilla Bug 351246: Load memory into Highmem on OS/2. The patch is
contributed by Peter Weilbacher <mozilla@Weilbacher.org>. r=wtc,kaply


git-svn-id: svn://10.0.0.236/trunk@217853 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 22:10:04 +00:00
mrbkap%gmail.com
e81b436e63 Only do this security check if we don't already have a parser, since this call
won't do anything anyway. bug 364309, r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@217852 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 22:02:22 +00:00
despotdaemon
4bd8f451dd Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@217850 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 21:51:22 +00:00
gavin%gavinsharp.com
1804ee956b Testcase for bug 365773
git-svn-id: svn://10.0.0.236/trunk@217849 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 21:48:48 +00:00
despotdaemon
3209bec8cb Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@217846 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 21:45:29 +00:00
despotdaemon
9d8cb68753 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@217845 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 21:37:42 +00:00
joshmoz%gmail.com
884ecbda91 Move nsNativeThemeCocoa.cpp to .mm so we have the option of using Obj-C/Cocoa. All Cocoa widget files should be .mm unless there is a good reason for it. no bug. r=mento
git-svn-id: svn://10.0.0.236/trunk@217844 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 21:12:56 +00:00
despotdaemon
67db645578 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@217842 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 21:08:14 +00:00
despotdaemon
6b46f38161 Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@217841 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 20:48:51 +00:00
masayuki%d-toybox.com
3a84f6ba26 Bug 353872 font-size-adjust broken on windows r=stuart
git-svn-id: svn://10.0.0.236/trunk@217840 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 20:43:49 +00:00
despotdaemon
efaa01267a Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@217839 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 20:39:37 +00:00
pavlov%pavlov.net
cf3df96782 removing long unused files as part of bug 316141.
git-svn-id: svn://10.0.0.236/trunk@217838 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 20:38:54 +00:00
despotdaemon
3471ba53fc Pseudo-automatic update of changes made by pavlov@pavlov.net.
git-svn-id: svn://10.0.0.236/trunk@217837 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 20:36:42 +00:00
mark%moxienet.com
8547bf725e Prep for 1.1a2
git-svn-id: svn://10.0.0.236/trunk@217836 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 20:26:41 +00:00
sspitzer%mozilla.org
d31ac07374 fix for regression bug #366061: can no longer search or change sort order (view) in the history sidebar.
r=mano


git-svn-id: svn://10.0.0.236/trunk@217835 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 20:07:07 +00:00
masayuki%d-toybox.com
763f885f9b Bug 364058 [cocoa-cairo] css length unit 'ex' doesn't work on 10.3.9 r=vald
git-svn-id: svn://10.0.0.236/trunk@217834 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 20:00:04 +00:00
sspitzer%mozilla.org
2a1c8020e8 fix for bug #363690: make historyDisabled scriptable
r=mano,dietrich


git-svn-id: svn://10.0.0.236/trunk@217833 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 19:58:56 +00:00
masayuki%d-toybox.com
79cb937c55 Bug 364785 ts regression by bug 362665 and bug 364678 and Bug 364832 Family names should not be high priority rather than font name r=vlad
git-svn-id: svn://10.0.0.236/trunk@217832 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 19:58:24 +00:00
masayuki%d-toybox.com
07c58cfff5 Bug 365613 [regression] all font-weight are displayed as 'bold' except for the 'normal' keyword and '400' r=vlad
git-svn-id: svn://10.0.0.236/trunk@217831 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 19:56:46 +00:00
preed%mozilla.com
c57054c6d2 Bug 364088: A couple of fixes to the Stage step, including:
- use strict
-- find() needs a function ref, not a function;
-- Move the getgrnam() for the product down to where it's used
-- ja.xpi was not removed for mac (which is ja-JP-mac.xpi)
-- the ja-JP-mac.xpi regex for win32 and linux weren't quite right
-- there was a comment referencing deletion of zip files, but no code to do it
r=rhelmer


git-svn-id: svn://10.0.0.236/trunk@217830 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 19:53:08 +00:00
bienvenu%nventure.com
4fee5fe77d fix 229522, folder starting with period disappear after restart, patch by jeongkyu.kim@gmail.com, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@217829 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 18:09:58 +00:00
dietrich%mozilla.com
ace69a3fde Bug 340895 Move SessionStore preferences to firefox.js (for zeniko, r=mano)
git-svn-id: svn://10.0.0.236/trunk@217828 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 17:09:56 +00:00
mats.palmgren%bredband.net
394b6ebb90 OnChange is sometimes triggered for scripted changes. b=265047 r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@217827 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 16:31:07 +00:00
masayuki%d-toybox.com
c37d6cc905 Bug 361532 Cairo still incorrectly substitutes fonts and then bolds them incorrectly if you are not using Windows XP's default regional and language options on some sites. r=VYV03354+pavlov
git-svn-id: svn://10.0.0.236/trunk@217826 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 15:51:27 +00:00
mats.palmgren%bredband.net
80a72291c3 Null-check before calling GetPrimaryFrameFor(). b=362800 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@217825 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 15:50:29 +00:00
mats.palmgren%bredband.net
7cfad2b396 [border-collapse] Table content unnecessarily wrapped. b=363072 r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@217824 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 15:38:03 +00:00
dbaron%dbaron.org
7ad1c1b91e Attempt to respin Linux and Windows firefox nightlies.
git-svn-id: svn://10.0.0.236/trunk@217822 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 15:22:50 +00:00
mozilla.mano%sent.com
1188db1854 Fix browser.xul bustage in places-bookmarks-disabled builds from bug 365981.
git-svn-id: svn://10.0.0.236/trunk@217821 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 13:30:59 +00:00
masayuki%d-toybox.com
d9bc4caec5 Bug 357637 Loading time (Tp) of pages with Chinese text is unbearable #2 r=vlad
git-svn-id: svn://10.0.0.236/trunk@217820 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 12:30:30 +00:00
masayuki%d-toybox.com
26d32852b3 Bug 361576 underlines sometimes missing or wrong thickness r=vlad
git-svn-id: svn://10.0.0.236/trunk@217819 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 12:18:34 +00:00
mozilla.mano%sent.com
d555426b0e Bug 365981 - Places XUL cleanup. r=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@217818 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 11:45:15 +00:00
mozilla.mano%sent.com
bc2b9001ab Bug 358492 - List default feed reader on OS X. r=mento.
git-svn-id: svn://10.0.0.236/trunk@217817 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 11:40:46 +00:00
neil%parkwaycc.co.uk
3051c706ba Make about:logo work in Thunderbird b=365963 r=mscott
git-svn-id: svn://10.0.0.236/trunk@217816 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 11:22:06 +00:00
mozilla%weilbacher.org
9c5493a2ed [OS/2] Bug 358823: add dom_svg.xpt to packages-os2, remove duplicate chrome.xpt, clarify why two XPTs are not packaged, r=mkaply
git-svn-id: svn://10.0.0.236/trunk@217814 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 10:28:57 +00:00
nelson%bolyard.com
0badc62ed6 Fix crash when importing (unwrapping) private key with no label.
Bug 335481. r=julien,rrelyea


git-svn-id: svn://10.0.0.236/trunk@217812 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 09:46:55 +00:00
ginn.chen%sun.com
3eb82e8c37 Bug 365685 fix AccessibleHyperlink_getURI
patch by Nian.Liu at sun.com r=ginn.chen


git-svn-id: svn://10.0.0.236/trunk@217809 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 06:21:45 +00:00
ginn.chen%sun.com
31d89c6492 Bug 363200 Calling setCaretOffset should scroll the text into view if it is off screen
patch by Nian.Liu at sun.com r=aaronleventhal


git-svn-id: svn://10.0.0.236/trunk@217808 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 06:20:10 +00:00
stridey%gmail.com
ad77b9737d Bug 364496: Display a warning during bookmarks recovery alerting the user we're restoring. r=smorgan sr=pink
git-svn-id: svn://10.0.0.236/trunk@217806 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 05:01:43 +00:00
ajschult%verizon.net
bf31750357 Bug 365751: Deleting an attachment with \n is O(N^2). r+sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@217804 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 04:27:38 +00:00
psychoticwolf%carolina.rr.com
28584c8477 Bug 364890. Fix comment in Tinderbox s/bug/box. r=timeless
git-svn-id: svn://10.0.0.236/trunk@217803 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 04:25:20 +00:00
ajschult%verizon.net
313ebcbba1 Bug 365745: fast-update should query bonsai for multiple directories at once. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@217802 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 04:23:48 +00:00
gavin%gavinsharp.com
b14cdb47be Bustage fix for bug 309429
git-svn-id: svn://10.0.0.236/trunk@217801 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 02:45:24 +00:00
graydon%mozilla.com
bc31c71327 Bug 333078: fix win32 linkage bug seemingly introduced with previous commit
git-svn-id: svn://10.0.0.236/trunk@217800 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 02:17:41 +00:00
graydon%mozilla.com
75bfd7865e Bug 333078: XPCOM cycle collector, first performance-related followup patch.
Reorganizes collection throttling to coincide with existing JS_GC scheme.


git-svn-id: svn://10.0.0.236/trunk@217799 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 01:44:42 +00:00
nelson%bolyard.com
8ea6267f90 When storing new CRL, Find old CRL and if it can be decoded, delete it.
Bug 363749. r=wtchang,alexei.volkov


git-svn-id: svn://10.0.0.236/trunk@217798 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 01:32:18 +00:00
ghendricks%novell.com
86ec3f035e Add lookup to tags using combobox
git-svn-id: svn://10.0.0.236/trunk@217796 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 00:38:08 +00:00
alexei.volkov.bugs%sun.com
c9763fb007 359331: modutil -changepw strict shutdown failure. r=nelson
git-svn-id: svn://10.0.0.236/trunk@217795 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 00:33:54 +00:00
alexei.volkov.bugs%sun.com
8e4aef2827 353895: klocwork Null ptr derefs in pki/pkibase.c. r=nelson
git-svn-id: svn://10.0.0.236/trunk@217794 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 00:25:05 +00:00
alexei.volkov.bugs%sun.com
cf01bc82c1 353912: Misc klocwork bugs in lib/ckfw. r=nelson
git-svn-id: svn://10.0.0.236/trunk@217793 18797224-902f-48f8-a5cc-f745e15eee43
2007-01-05 00:23:14 +00:00
80 changed files with 663 additions and 115159 deletions

View File

@@ -1,95 +0,0 @@
#! gmake
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Netscape security libraries.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1994-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY). #
#######################################################################
include manifest.mn
#######################################################################
# (2) Include "global" configuration information. (OPTIONAL) #
#######################################################################
include $(CORE_DEPTH)/coreconf/config.mk
#######################################################################
# (3) Include "component" configuration information. (OPTIONAL) #
#######################################################################
#######################################################################
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################
include config.mk
#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
#######################################################################
include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################
export:: private_export
# On AIX 4.3, IBM xlC_r compiler (version 3.6.6) cannot compile
# pkcs11c.c in 64-bit mode for unknown reasons. A workaround is
# to compile it with optimizations turned on. (Bugzilla bug #63815)
ifeq ($(OS_TARGET)$(OS_RELEASE),AIX4.3)
ifeq ($(USE_64),1)
ifndef BUILD_OPT
$(OBJDIR)/pkcs11.o: pkcs11.c
@$(MAKE_OBJDIR)
$(CC) -o $@ -c -O2 $(CFLAGS) $<
$(OBJDIR)/pkcs11c.o: pkcs11c.c
@$(MAKE_OBJDIR)
$(CC) -o $@ -c -O2 $(CFLAGS) $<
endif
endif
endif

View File

@@ -1,107 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Netscape security libraries.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1994-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
CRYPTOLIB=$(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX)
CRYPTODIR=../freebl
ifdef MOZILLA_SECURITY_BUILD
CRYPTOLIB=$(DIST)/lib/$(LIB_PREFIX)crypto.$(LIB_SUFFIX)
CRYPTODIR=../crypto
endif
SQLITE_LIB = $(DIST)/lib/$(LIB_PREFIX)sqlite3.$(LIB_SUFFIX)
ifdef NSS_USE_SYTEM_SQLITE
SQLITE_LIB = -lsqlite3
endif
EXTRA_LIBS += \
$(CRYPTOLIB) \
$(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \
$(SQLITE_LIB) \
$(NULL)
# can't do this in manifest.mn because OS_TARGET isn't defined there.
ifeq (,$(filter-out WIN%,$(OS_TARGET)))
# don't want the 32 in the shared library name
SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
RES = $(OBJDIR)/$(LIBRARY_NAME).res
RESNAME = $(LIBRARY_NAME).rc
ifdef NS_USE_GCC
EXTRA_SHARED_LIBS += \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \
$(NULL)
else # ! NS_USE_GCC
EXTRA_SHARED_LIBS += \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.lib \
$(NULL)
endif # NS_USE_GCC
else
# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
EXTRA_SHARED_LIBS += \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \
$(NULL)
endif
ifeq ($(OS_TARGET),SunOS)
# The -R '$ORIGIN' linker option instructs this library to search for its
# dependencies in the same directory where it resides.
MKSHLIB += -R '$$ORIGIN'
OS_LIBS += -lbsm
endif
ifeq ($(OS_TARGET),WINCE)
DEFINES += -DDBM_USING_NSPR
endif
# indicates dependency on freebl static lib
$(SHARED_LIBRARY): $(CRYPTOLIB)

View File

@@ -1,641 +0,0 @@
/*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Elliptic Curve Cryptography library.
*
* The Initial Developer of the Original Code is
* Sun Microsystems, Inc.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Vipul Gupta <vipul.gupta@sun.com> and
* Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifdef NSS_ENABLE_ECC
#include "blapi.h"
#include "secoid.h"
#include "secitem.h"
#include "secerr.h"
#include "ec.h"
#include "ecl-curve.h"
#define CHECK_OK(func) if (func == NULL) goto cleanup
#define CHECK_SEC_OK(func) if (SECSuccess != (rv = func)) goto cleanup
/*
* Initializes a SECItem from a hexadecimal string
*
* Warning: This function ignores leading 00's, so any leading 00's
* in the hexadecimal string must be optional.
*/
static SECItem *
hexString2SECItem(PRArenaPool *arena, SECItem *item, const char *str)
{
int i = 0;
int byteval = 0;
int tmp = PORT_Strlen(str);
if ((tmp % 2) != 0) return NULL;
/* skip leading 00's unless the hex string is "00" */
while ((tmp > 2) && (str[0] == '0') && (str[1] == '0')) {
str += 2;
tmp -= 2;
}
item->data = (unsigned char *) PORT_ArenaAlloc(arena, tmp/2);
if (item->data == NULL) return NULL;
item->len = tmp/2;
while (str[i]) {
if ((str[i] >= '0') && (str[i] <= '9'))
tmp = str[i] - '0';
else if ((str[i] >= 'a') && (str[i] <= 'f'))
tmp = str[i] - 'a' + 10;
else if ((str[i] >= 'A') && (str[i] <= 'F'))
tmp = str[i] - 'A' + 10;
else
return NULL;
byteval = byteval * 16 + tmp;
if ((i % 2) != 0) {
item->data[i/2] = byteval;
byteval = 0;
}
i++;
}
return item;
}
/* Copy all of the fields from srcParams into dstParams
*/
SECStatus
EC_CopyParams(PRArenaPool *arena, ECParams *dstParams,
const ECParams *srcParams)
{
SECStatus rv = SECFailure;
dstParams->arena = arena;
dstParams->type = srcParams->type;
dstParams->fieldID.size = srcParams->fieldID.size;
dstParams->fieldID.type = srcParams->fieldID.type;
if (srcParams->fieldID.type == ec_field_GFp) {
CHECK_SEC_OK(SECITEM_CopyItem(arena, &dstParams->fieldID.u.prime,
&srcParams->fieldID.u.prime));
} else {
CHECK_SEC_OK(SECITEM_CopyItem(arena, &dstParams->fieldID.u.poly,
&srcParams->fieldID.u.poly));
}
dstParams->fieldID.k1 = srcParams->fieldID.k1;
dstParams->fieldID.k2 = srcParams->fieldID.k2;
dstParams->fieldID.k3 = srcParams->fieldID.k3;
CHECK_SEC_OK(SECITEM_CopyItem(arena, &dstParams->curve.a,
&srcParams->curve.a));
CHECK_SEC_OK(SECITEM_CopyItem(arena, &dstParams->curve.b,
&srcParams->curve.b));
CHECK_SEC_OK(SECITEM_CopyItem(arena, &dstParams->curve.seed,
&srcParams->curve.seed));
CHECK_SEC_OK(SECITEM_CopyItem(arena, &dstParams->base,
&srcParams->base));
CHECK_SEC_OK(SECITEM_CopyItem(arena, &dstParams->order,
&srcParams->order));
CHECK_SEC_OK(SECITEM_CopyItem(arena, &dstParams->DEREncoding,
&srcParams->DEREncoding));
dstParams->name = srcParams->name;
CHECK_SEC_OK(SECITEM_CopyItem(arena, &dstParams->curveOID,
&srcParams->curveOID));
dstParams->cofactor = srcParams->cofactor;
return SECSuccess;
cleanup:
return SECFailure;
}
static SECStatus
gf_populate_params(ECCurveName name, ECFieldType field_type, ECParams *params)
{
SECStatus rv = SECFailure;
const ECCurveParams *curveParams;
/* 2 ['0'+'4'] + MAX_ECKEY_LEN * 2 [x,y] * 2 [hex string] + 1 ['\0'] */
char genenc[3 + 2 * 2 * MAX_ECKEY_LEN];
if ((name < ECCurve_noName) || (name > ECCurve_pastLastCurve)) goto cleanup;
params->name = name;
curveParams = ecCurve_map[params->name];
CHECK_OK(curveParams);
params->fieldID.size = curveParams->size;
params->fieldID.type = field_type;
if (field_type == ec_field_GFp) {
CHECK_OK(hexString2SECItem(params->arena, &params->fieldID.u.prime,
curveParams->irr));
} else {
CHECK_OK(hexString2SECItem(params->arena, &params->fieldID.u.poly,
curveParams->irr));
}
CHECK_OK(hexString2SECItem(params->arena, &params->curve.a,
curveParams->curvea));
CHECK_OK(hexString2SECItem(params->arena, &params->curve.b,
curveParams->curveb));
genenc[0] = '0';
genenc[1] = '4';
genenc[2] = '\0';
strcat(genenc, curveParams->genx);
strcat(genenc, curveParams->geny);
CHECK_OK(hexString2SECItem(params->arena, &params->base, genenc));
CHECK_OK(hexString2SECItem(params->arena, &params->order,
curveParams->order));
params->cofactor = curveParams->cofactor;
rv = SECSuccess;
cleanup:
return rv;
}
SECStatus
EC_FillParams(PRArenaPool *arena, const SECItem *encodedParams,
ECParams *params)
{
SECStatus rv = SECFailure;
SECOidTag tag;
SECItem oid = { siBuffer, NULL, 0};
#if EC_DEBUG
int i;
printf("Encoded params in EC_DecodeParams: ");
for (i = 0; i < encodedParams->len; i++) {
printf("%02x:", encodedParams->data[i]);
}
printf("\n");
#endif
if ((encodedParams->len != ANSI_X962_CURVE_OID_TOTAL_LEN) &&
(encodedParams->len != SECG_CURVE_OID_TOTAL_LEN)) {
PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
return SECFailure;
};
oid.len = encodedParams->len - 2;
oid.data = encodedParams->data + 2;
if ((encodedParams->data[0] != SEC_ASN1_OBJECT_ID) ||
((tag = SECOID_FindOIDTag(&oid)) == SEC_OID_UNKNOWN)) {
PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
return SECFailure;
}
params->arena = arena;
params->cofactor = 0;
params->type = ec_params_named;
params->name = ECCurve_noName;
/* For named curves, fill out curveOID */
params->curveOID.len = oid.len;
params->curveOID.data = (unsigned char *) PORT_ArenaAlloc(arena, oid.len);
if (params->curveOID.data == NULL) goto cleanup;
memcpy(params->curveOID.data, oid.data, oid.len);
#if EC_DEBUG
printf("Curve: %s\n", SECOID_FindOIDTagDescription(tag));
#endif
switch (tag) {
/* Binary curves */
case SEC_OID_ANSIX962_EC_C2PNB163V1:
/* Populate params for c2pnb163v1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB163V1, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2PNB163V2:
/* Populate params for c2pnb163v2 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB163V2, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2PNB163V3:
/* Populate params for c2pnb163v3 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB163V3, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2PNB176V1:
/* Populate params for c2pnb176v1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB176V1, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2TNB191V1:
/* Populate params for c2tnb191v1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB191V1, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2TNB191V2:
/* Populate params for c2tnb191v2 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB191V2, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2TNB191V3:
/* Populate params for c2tnb191v3 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB191V3, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2PNB208W1:
/* Populate params for c2pnb208w1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB208W1, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2TNB239V1:
/* Populate params for c2tnb239v1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB239V1, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2TNB239V2:
/* Populate params for c2tnb239v2 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB239V2, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2TNB239V3:
/* Populate params for c2tnb239v3 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB239V3, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2PNB272W1:
/* Populate params for c2pnb272w1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB272W1, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2PNB304W1:
/* Populate params for c2pnb304w1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB304W1, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2TNB359V1:
/* Populate params for c2tnb359v1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB359V1, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2PNB368W1:
/* Populate params for c2pnb368w1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_PNB368W1, ec_field_GF2m,
params) );
break;
case SEC_OID_ANSIX962_EC_C2TNB431R1:
/* Populate params for c2tnb431r1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_CHAR2_TNB431R1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT113R1:
/* Populate params for sect113r1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_113R1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT113R2:
/* Populate params for sect113r2 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_113R2, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT131R1:
/* Populate params for sect131r1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_131R1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT131R2:
/* Populate params for sect131r2 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_131R2, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT163K1:
/* Populate params for sect163k1
* (the NIST K-163 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_163K1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT163R1:
/* Populate params for sect163r1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_163R1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT163R2:
/* Populate params for sect163r2
* (the NIST B-163 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_163R2, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT193R1:
/* Populate params for sect193r1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_193R1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT193R2:
/* Populate params for sect193r2 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_193R2, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT233K1:
/* Populate params for sect233k1
* (the NIST K-233 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_233K1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT233R1:
/* Populate params for sect233r1
* (the NIST B-233 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_233R1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT239K1:
/* Populate params for sect239k1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_239K1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT283K1:
/* Populate params for sect283k1
* (the NIST K-283 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_283K1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT283R1:
/* Populate params for sect283r1
* (the NIST B-283 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_283R1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT409K1:
/* Populate params for sect409k1
* (the NIST K-409 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_409K1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT409R1:
/* Populate params for sect409r1
* (the NIST B-409 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_409R1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT571K1:
/* Populate params for sect571k1
* (the NIST K-571 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_571K1, ec_field_GF2m,
params) );
break;
case SEC_OID_SECG_EC_SECT571R1:
/* Populate params for sect571r1
* (the NIST B-571 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_CHAR2_571R1, ec_field_GF2m,
params) );
break;
/* Prime curves */
case SEC_OID_ANSIX962_EC_PRIME192V1:
/* Populate params for prime192v1 aka secp192r1
* (the NIST P-192 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_192V1, ec_field_GFp,
params) );
break;
case SEC_OID_ANSIX962_EC_PRIME192V2:
/* Populate params for prime192v2 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_192V2, ec_field_GFp,
params) );
break;
case SEC_OID_ANSIX962_EC_PRIME192V3:
/* Populate params for prime192v3 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_192V3, ec_field_GFp,
params) );
break;
case SEC_OID_ANSIX962_EC_PRIME239V1:
/* Populate params for prime239v1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_239V1, ec_field_GFp,
params) );
break;
case SEC_OID_ANSIX962_EC_PRIME239V2:
/* Populate params for prime239v2 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_239V2, ec_field_GFp,
params) );
break;
case SEC_OID_ANSIX962_EC_PRIME239V3:
/* Populate params for prime239v3 */
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_239V3, ec_field_GFp,
params) );
break;
case SEC_OID_ANSIX962_EC_PRIME256V1:
/* Populate params for prime256v1 aka secp256r1
* (the NIST P-256 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_X9_62_PRIME_256V1, ec_field_GFp,
params) );
break;
case SEC_OID_SECG_EC_SECP112R1:
/* Populate params for secp112r1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_112R1, ec_field_GFp,
params) );
break;
case SEC_OID_SECG_EC_SECP112R2:
/* Populate params for secp112r2 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_112R2, ec_field_GFp,
params) );
break;
case SEC_OID_SECG_EC_SECP128R1:
/* Populate params for secp128r1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_128R1, ec_field_GFp,
params) );
break;
case SEC_OID_SECG_EC_SECP128R2:
/* Populate params for secp128r2 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_128R2, ec_field_GFp,
params) );
break;
case SEC_OID_SECG_EC_SECP160K1:
/* Populate params for secp160k1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_160K1, ec_field_GFp,
params) );
break;
case SEC_OID_SECG_EC_SECP160R1:
/* Populate params for secp160r1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_160R1, ec_field_GFp,
params) );
break;
case SEC_OID_SECG_EC_SECP160R2:
/* Populate params for secp160r1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_160R2, ec_field_GFp,
params) );
break;
case SEC_OID_SECG_EC_SECP192K1:
/* Populate params for secp192k1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_192K1, ec_field_GFp,
params) );
break;
case SEC_OID_SECG_EC_SECP224K1:
/* Populate params for secp224k1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_224K1, ec_field_GFp,
params) );
break;
case SEC_OID_SECG_EC_SECP224R1:
/* Populate params for secp224r1
* (the NIST P-224 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_224R1, ec_field_GFp,
params) );
break;
case SEC_OID_SECG_EC_SECP256K1:
/* Populate params for secp256k1 */
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_256K1, ec_field_GFp,
params) );
break;
case SEC_OID_SECG_EC_SECP384R1:
/* Populate params for secp384r1
* (the NIST P-384 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_384R1, ec_field_GFp,
params) );
break;
case SEC_OID_SECG_EC_SECP521R1:
/* Populate params for secp521r1
* (the NIST P-521 curve)
*/
CHECK_SEC_OK( gf_populate_params(ECCurve_SECG_PRIME_521R1, ec_field_GFp,
params) );
break;
default:
break;
};
cleanup:
if (!params->cofactor) {
PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
#if EC_DEBUG
printf("Unrecognized curve, returning NULL params\n");
#endif
}
return rv;
}
SECStatus
EC_DecodeParams(const SECItem *encodedParams, ECParams **ecparams)
{
PRArenaPool *arena;
ECParams *params;
SECStatus rv = SECFailure;
/* Initialize an arena for the ECParams structure */
if (!(arena = PORT_NewArena(NSS_FREEBL_DEFAULT_CHUNKSIZE)))
return SECFailure;
params = (ECParams *)PORT_ArenaZAlloc(arena, sizeof(ECParams));
if (!params) {
PORT_FreeArena(arena, PR_TRUE);
return SECFailure;
}
/* Copy the encoded params */
SECITEM_AllocItem(arena, &(params->DEREncoding),
encodedParams->len);
memcpy(params->DEREncoding.data, encodedParams->data, encodedParams->len);
/* Fill out the rest of the ECParams structure based on
* the encoded params
*/
rv = EC_FillParams(arena, encodedParams, params);
if (rv == SECFailure) {
PORT_FreeArena(arena, PR_TRUE);
return SECFailure;
} else {
*ecparams = params;;
return SECSuccess;
}
}
#endif /* NSS_ENABLE_ECC */

View File

@@ -1,351 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Network Security Services (NSS).
*
* The Initial Developer of the Original Code is
* Red Hat, Inc.
* Portions created by the Initial Developer are Copyright (C) 2006
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* This file implements audit logging required by FIPS 140-2 Security
* Level 2.
*/
#include "prprf.h"
#include "softoken.h"
/*
* Print the value of the returned object handle in the output buffer
* on a successful return of the PKCS #11 function. If the PKCS #11
* function failed or the pointer to object handle is NULL (which is
* the case for C_DeriveKey with CKM_TLS_KEY_AND_MAC_DERIVE), an empty
* string is stored in the output buffer.
*
* out: the output buffer
* outlen: the length of the output buffer
* argName: the name of the "pointer to object handle" argument
* phObject: the pointer to object handle
* rv: the return value of the PKCS #11 function
*/
static void sftk_PrintReturnedObjectHandle(char *out, PRUint32 outlen,
const char *argName, CK_OBJECT_HANDLE_PTR phObject, CK_RV rv)
{
if ((rv == CKR_OK) && phObject) {
PR_snprintf(out, outlen,
" *%s=0x%08lX", argName, (PRUint32)*phObject);
} else {
PORT_Assert(outlen != 0);
out[0] = '\0';
}
}
/*
* MECHANISM_BUFSIZE needs to be large enough for sftk_PrintMechanism,
* which uses <= 49 bytes.
*/
#define MECHANISM_BUFSIZE 64
static void sftk_PrintMechanism(char *out, PRUint32 outlen,
CK_MECHANISM_PTR pMechanism)
{
if (pMechanism) {
/*
* If we change the format string, we need to make sure
* MECHANISM_BUFSIZE is still large enough. We allow
* 20 bytes for %p on a 64-bit platform.
*/
PR_snprintf(out, outlen, "%p {mechanism=0x%08lX, ...}",
pMechanism, (PRUint32)pMechanism->mechanism);
} else {
PR_snprintf(out, outlen, "%p", pMechanism);
}
}
void sftk_AuditCreateObject(CK_SESSION_HANDLE hSession,
CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount,
CK_OBJECT_HANDLE_PTR phObject, CK_RV rv)
{
char msg[256];
char shObject[32];
NSSAuditSeverity severity = (rv == CKR_OK) ?
NSS_AUDIT_INFO : NSS_AUDIT_ERROR;
sftk_PrintReturnedObjectHandle(shObject, sizeof shObject,
"phObject", phObject, rv);
PR_snprintf(msg, sizeof msg,
"C_CreateObject(hSession=0x%08lX, pTemplate=%p, ulCount=%lu, "
"phObject=%p)=0x%08lX%s",
(PRUint32)hSession, pTemplate, (PRUint32)ulCount,
phObject, (PRUint32)rv, shObject);
sftk_LogAuditMessage(severity, msg);
}
void sftk_AuditCopyObject(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount,
CK_OBJECT_HANDLE_PTR phNewObject, CK_RV rv)
{
char msg[256];
char shNewObject[32];
NSSAuditSeverity severity = (rv == CKR_OK) ?
NSS_AUDIT_INFO : NSS_AUDIT_ERROR;
sftk_PrintReturnedObjectHandle(shNewObject, sizeof shNewObject,
"phNewObject", phNewObject, rv);
PR_snprintf(msg, sizeof msg,
"C_CopyObject(hSession=0x%08lX, hObject=0x%08lX, "
"pTemplate=%p, ulCount=%lu, phNewObject=%p)=0x%08lX%s",
(PRUint32)hSession, (PRUint32)hObject,
pTemplate, (PRUint32)ulCount, phNewObject, (PRUint32)rv, shNewObject);
sftk_LogAuditMessage(severity, msg);
}
/* WARNING: hObject has been destroyed and can only be printed. */
void sftk_AuditDestroyObject(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject, CK_RV rv)
{
char msg[256];
NSSAuditSeverity severity = (rv == CKR_OK) ?
NSS_AUDIT_INFO : NSS_AUDIT_ERROR;
PR_snprintf(msg, sizeof msg,
"C_DestroyObject(hSession=0x%08lX, hObject=0x%08lX)=0x%08lX",
(PRUint32)hSession, (PRUint32)hObject, (PRUint32)rv);
sftk_LogAuditMessage(severity, msg);
}
void sftk_AuditGetObjectSize(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject, CK_ULONG_PTR pulSize, CK_RV rv)
{
char msg[256];
NSSAuditSeverity severity = (rv == CKR_OK) ?
NSS_AUDIT_INFO : NSS_AUDIT_ERROR;
PR_snprintf(msg, sizeof msg,
"C_GetObjectSize(hSession=0x%08lX, hObject=0x%08lX, "
"pulSize=%p)=0x%08lX",
(PRUint32)hSession, (PRUint32)hObject,
pulSize, (PRUint32)rv);
sftk_LogAuditMessage(severity, msg);
}
void sftk_AuditGetAttributeValue(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE_PTR pTemplate,
CK_ULONG ulCount, CK_RV rv)
{
char msg[256];
NSSAuditSeverity severity = (rv == CKR_OK) ?
NSS_AUDIT_INFO : NSS_AUDIT_ERROR;
PR_snprintf(msg, sizeof msg,
"C_GetAttributeValue(hSession=0x%08lX, hObject=0x%08lX, "
"pTemplate=%p, ulCount=%lu)=0x%08lX",
(PRUint32)hSession, (PRUint32)hObject,
pTemplate, (PRUint32)ulCount, (PRUint32)rv);
sftk_LogAuditMessage(severity, msg);
}
void sftk_AuditSetAttributeValue(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE_PTR pTemplate,
CK_ULONG ulCount, CK_RV rv)
{
char msg[256];
NSSAuditSeverity severity = (rv == CKR_OK) ?
NSS_AUDIT_INFO : NSS_AUDIT_ERROR;
PR_snprintf(msg, sizeof msg,
"C_SetAttributeValue(hSession=0x%08lX, hObject=0x%08lX, "
"pTemplate=%p, ulCount=%lu)=0x%08lX",
(PRUint32)hSession, (PRUint32)hObject,
pTemplate, (PRUint32)ulCount, (PRUint32)rv);
sftk_LogAuditMessage(severity, msg);
}
void sftk_AuditCryptInit(const char *opName, CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey, CK_RV rv)
{
char msg[256];
char mech[MECHANISM_BUFSIZE];
NSSAuditSeverity severity = (rv == CKR_OK) ?
NSS_AUDIT_INFO : NSS_AUDIT_ERROR;
sftk_PrintMechanism(mech, sizeof mech, pMechanism);
PR_snprintf(msg, sizeof msg,
"C_%sInit(hSession=0x%08lX, pMechanism=%s, "
"hKey=0x%08lX)=0x%08lX",
opName, (PRUint32)hSession, mech,
(PRUint32)hKey, (PRUint32)rv);
sftk_LogAuditMessage(severity, msg);
}
void sftk_AuditGenerateKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism, CK_ATTRIBUTE_PTR pTemplate,
CK_ULONG ulCount, CK_OBJECT_HANDLE_PTR phKey, CK_RV rv)
{
char msg[256];
char mech[MECHANISM_BUFSIZE];
char shKey[32];
NSSAuditSeverity severity = (rv == CKR_OK) ?
NSS_AUDIT_INFO : NSS_AUDIT_ERROR;
sftk_PrintMechanism(mech, sizeof mech, pMechanism);
sftk_PrintReturnedObjectHandle(shKey, sizeof shKey, "phKey", phKey, rv);
PR_snprintf(msg, sizeof msg,
"C_GenerateKey(hSession=0x%08lX, pMechanism=%s, "
"pTemplate=%p, ulCount=%lu, phKey=%p)=0x%08lX%s",
(PRUint32)hSession, mech,
pTemplate, (PRUint32)ulCount, phKey, (PRUint32)rv, shKey);
sftk_LogAuditMessage(severity, msg);
}
void sftk_AuditGenerateKeyPair(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism, CK_ATTRIBUTE_PTR pPublicKeyTemplate,
CK_ULONG ulPublicKeyAttributeCount, CK_ATTRIBUTE_PTR pPrivateKeyTemplate,
CK_ULONG ulPrivateKeyAttributeCount, CK_OBJECT_HANDLE_PTR phPublicKey,
CK_OBJECT_HANDLE_PTR phPrivateKey, CK_RV rv)
{
char msg[512];
char mech[MECHANISM_BUFSIZE];
char shPublicKey[32];
char shPrivateKey[32];
NSSAuditSeverity severity = (rv == CKR_OK) ?
NSS_AUDIT_INFO : NSS_AUDIT_ERROR;
sftk_PrintMechanism(mech, sizeof mech, pMechanism);
sftk_PrintReturnedObjectHandle(shPublicKey, sizeof shPublicKey,
"phPublicKey", phPublicKey, rv);
sftk_PrintReturnedObjectHandle(shPrivateKey, sizeof shPrivateKey,
"phPrivateKey", phPrivateKey, rv);
PR_snprintf(msg, sizeof msg,
"C_GenerateKeyPair(hSession=0x%08lX, pMechanism=%s, "
"pPublicKeyTemplate=%p, ulPublicKeyAttributeCount=%lu, "
"pPrivateKeyTemplate=%p, ulPrivateKeyAttributeCount=%lu, "
"phPublicKey=%p, phPrivateKey=%p)=0x%08lX%s%s",
(PRUint32)hSession, mech,
pPublicKeyTemplate, (PRUint32)ulPublicKeyAttributeCount,
pPrivateKeyTemplate, (PRUint32)ulPrivateKeyAttributeCount,
phPublicKey, phPrivateKey, (PRUint32)rv, shPublicKey, shPrivateKey);
sftk_LogAuditMessage(severity, msg);
}
void sftk_AuditWrapKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hWrappingKey,
CK_OBJECT_HANDLE hKey, CK_BYTE_PTR pWrappedKey,
CK_ULONG_PTR pulWrappedKeyLen, CK_RV rv)
{
char msg[256];
char mech[MECHANISM_BUFSIZE];
NSSAuditSeverity severity = (rv == CKR_OK) ?
NSS_AUDIT_INFO : NSS_AUDIT_ERROR;
sftk_PrintMechanism(mech, sizeof mech, pMechanism);
PR_snprintf(msg, sizeof msg,
"C_WrapKey(hSession=0x%08lX, pMechanism=%s, hWrappingKey=0x%08lX, "
"hKey=0x%08lX, pWrappedKey=%p, pulWrappedKeyLen=%p)=0x%08lX",
(PRUint32)hSession, mech, (PRUint32)hWrappingKey,
(PRUint32)hKey, pWrappedKey, pulWrappedKeyLen, (PRUint32)rv);
sftk_LogAuditMessage(severity, msg);
}
void sftk_AuditUnwrapKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hUnwrappingKey,
CK_BYTE_PTR pWrappedKey, CK_ULONG ulWrappedKeyLen,
CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulAttributeCount,
CK_OBJECT_HANDLE_PTR phKey, CK_RV rv)
{
char msg[256];
char mech[MECHANISM_BUFSIZE];
char shKey[32];
NSSAuditSeverity severity = (rv == CKR_OK) ?
NSS_AUDIT_INFO : NSS_AUDIT_ERROR;
sftk_PrintMechanism(mech, sizeof mech, pMechanism);
sftk_PrintReturnedObjectHandle(shKey, sizeof shKey, "phKey", phKey, rv);
PR_snprintf(msg, sizeof msg,
"C_UnwrapKey(hSession=0x%08lX, pMechanism=%s, "
"hUnwrappingKey=0x%08lX, pWrappedKey=%p, ulWrappedKeyLen=%lu, "
"pTemplate=%p, ulAttributeCount=%lu, phKey=%p)=0x%08lX%s",
(PRUint32)hSession, mech,
(PRUint32)hUnwrappingKey, pWrappedKey, (PRUint32)ulWrappedKeyLen,
pTemplate, (PRUint32)ulAttributeCount, phKey, (PRUint32)rv, shKey);
sftk_LogAuditMessage(severity, msg);
}
void sftk_AuditDeriveKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hBaseKey,
CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulAttributeCount,
CK_OBJECT_HANDLE_PTR phKey, CK_RV rv)
{
char msg[512];
char mech[MECHANISM_BUFSIZE];
char shKey[32];
char sTlsKeys[128];
NSSAuditSeverity severity = (rv == CKR_OK) ?
NSS_AUDIT_INFO : NSS_AUDIT_ERROR;
sftk_PrintMechanism(mech, sizeof mech, pMechanism);
sftk_PrintReturnedObjectHandle(shKey, sizeof shKey, "phKey", phKey, rv);
if ((rv == CKR_OK) &&
(pMechanism->mechanism == CKM_TLS_KEY_AND_MAC_DERIVE)) {
CK_SSL3_KEY_MAT_PARAMS *param =
(CK_SSL3_KEY_MAT_PARAMS *)pMechanism->pParameter;
CK_SSL3_KEY_MAT_OUT *keymat = param->pReturnedKeyMaterial;
PR_snprintf(sTlsKeys, sizeof sTlsKeys,
" hClientMacSecret=0x%08lX hServerMacSecret=0x%08lX"
" hClientKey=0x%08lX hServerKey=0x%08lX",
(PRUint32)keymat->hClientMacSecret,
(PRUint32)keymat->hServerMacSecret,
(PRUint32)keymat->hClientKey,
(PRUint32)keymat->hServerKey);
} else {
sTlsKeys[0] = '\0';
}
PR_snprintf(msg, sizeof msg,
"C_DeriveKey(hSession=0x%08lX, pMechanism=%s, "
"hBaseKey=0x%08lX, pTemplate=%p, ulAttributeCount=%lu, "
"phKey=%p)=0x%08lX%s%s",
(PRUint32)hSession, mech,
(PRUint32)hBaseKey, pTemplate,(PRUint32)ulAttributeCount,
phKey, (PRUint32)rv, shKey, sTlsKeys);
sftk_LogAuditMessage(severity, msg);
}
void sftk_AuditDigestKey(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hKey, CK_RV rv)
{
char msg[256];
NSSAuditSeverity severity = (rv == CKR_OK) ?
NSS_AUDIT_INFO : NSS_AUDIT_ERROR;
PR_snprintf(msg, sizeof msg,
"C_DigestKey(hSession=0x%08lX, hKey=0x%08lX)=0x%08lX",
(PRUint32)hSession, (PRUint32)hKey, (PRUint32)rv);
sftk_LogAuditMessage(severity, msg);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,80 +0,0 @@
#! gmake
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Netscape security libraries.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1994-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY). #
#######################################################################
include manifest.mn
#######################################################################
# (2) Include "global" configuration information. (OPTIONAL) #
#######################################################################
include $(CORE_DEPTH)/coreconf/config.mk
#######################################################################
# (3) Include "component" configuration information. (OPTIONAL) #
#######################################################################
#######################################################################
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################
include config.mk
#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
#######################################################################
include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################
export:: private_export

View File

@@ -1,85 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* cdbhdl.h - certificate database handle
* private to the certdb module
*
* $Id: cdbhdl.h,v 1.1.2.1 2007-04-03 22:50:02 rrelyea%redhat.com Exp $
*/
#ifndef _CDBHDL_H_
#define _CDBHDL_H_
#include "nspr.h"
#include "mcom_db.h"
#include "pcertt.h"
#include "prtypes.h"
/*
* Handle structure for open certificate databases
*/
struct NSSLOWCERTCertDBHandleStr {
DB *permCertDB;
PZMonitor *dbMon;
PRBool dbVerify;
PRInt32 ref; /* reference count */
};
#ifdef DBM_USING_NSPR
#define NO_RDONLY PR_RDONLY
#define NO_RDWR PR_RDWR
#define NO_CREATE (PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE)
#else
#define NO_RDONLY O_RDONLY
#define NO_RDWR O_RDWR
#define NO_CREATE (O_RDWR | O_CREAT | O_TRUNC)
#endif
typedef DB * (*rdbfunc)(const char *appName, const char *prefix,
const char *type, int flags);
typedef int (*rdbstatusfunc)(void);
#define RDB_FAIL 1
#define RDB_RETRY 2
DB * rdbopen(const char *appName, const char *prefix,
const char *type, int flags, int *status);
DB *dbsopen (const char *dbname , int flags, int mode, DBTYPE type,
const void * appData);
SECStatus db_Copy(DB *dest,DB *src);
int db_InitComplete(DB *db);
#endif

View File

@@ -1,102 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Netscape security libraries.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1994-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
CRYPTOLIB=$(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX)
CRYPTODIR=../freebl
ifdef MOZILLA_SECURITY_BUILD
CRYPTOLIB=$(DIST)/lib/$(LIB_PREFIX)crypto.$(LIB_SUFFIX)
CRYPTODIR=../crypto
endif
EXTRA_LIBS += \
$(CRYPTOLIB) \
$(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX) \
$(NULL)
# can't do this in manifest.mn because OS_TARGET isn't defined there.
ifeq (,$(filter-out WIN%,$(OS_TARGET)))
# don't want the 32 in the shared library name
SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
RES = $(OBJDIR)/$(LIBRARY_NAME).res
RESNAME = $(LIBRARY_NAME).rc
ifdef NS_USE_GCC
EXTRA_SHARED_LIBS += \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \
$(NULL)
else # ! NS_USE_GCC
EXTRA_SHARED_LIBS += \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.lib \
$(NULL)
endif # NS_USE_GCC
else
# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
EXTRA_SHARED_LIBS += \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \
$(NULL)
endif
ifeq ($(OS_TARGET),SunOS)
# The -R '$ORIGIN' linker option instructs this library to search for its
# dependencies in the same directory where it resides.
MKSHLIB += -R '$$ORIGIN'
OS_LIBS += -lbsm
endif
ifeq ($(OS_TARGET),WINCE)
DEFINES += -DDBM_USING_NSPR
endif
# indicates dependency on freebl static lib
$(SHARED_LIBRARY): $(CRYPTOLIB)

View File

@@ -1,647 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* Berkeley DB 1.85 Shim code to handle blobs.
*
* $Id: dbmshim.c,v 1.1.2.1 2007-04-03 22:50:02 rrelyea%redhat.com Exp $
*/
#include "mcom_db.h"
#include "secitem.h"
#include "nssb64.h"
#include "blapi.h"
#include "secerr.h"
#include "lgdb.h"
/*
* Blob block:
* Byte 0 CERTDB Version -+ -+
* Byte 1 certDBEntryTypeBlob | BLOB_HEAD_LEN |
* Byte 2 flags (always '0'); | |
* Byte 3 reserved (always '0'); -+ |
* Byte 4 LSB length | <--BLOB_LENGTH_START | BLOB_BUF_LEN
* Byte 5 . | |
* Byte 6 . | BLOB_LENGTH_LEN |
* Byte 7 MSB length | |
* Byte 8 blob_filename -+ -+ <-- BLOB_NAME_START |
* Byte 9 . | BLOB_NAME_LEN |
* . . | |
* Byte 37 . -+ -+
*/
#define DBS_BLOCK_SIZE (16*1024) /* 16 k */
#define DBS_MAX_ENTRY_SIZE (DBS_BLOCK_SIZE - (2048)) /* 14 k */
#define DBS_CACHE_SIZE DBS_BLOCK_SIZE*8
#define ROUNDDIV(x,y) (x+(y-1))/y
#define BLOB_HEAD_LEN 4
#define BLOB_LENGTH_START BLOB_HEAD_LEN
#define BLOB_LENGTH_LEN 4
#define BLOB_NAME_START BLOB_LENGTH_START+BLOB_LENGTH_LEN
#define BLOB_NAME_LEN 1+ROUNDDIV(SHA1_LENGTH,3)*4+1
#define BLOB_BUF_LEN BLOB_HEAD_LEN+BLOB_LENGTH_LEN+BLOB_NAME_LEN
/* a Shim data structure. This data structure has a db built into it. */
typedef struct DBSStr DBS;
struct DBSStr {
DB db;
char *blobdir;
int mode;
PRBool readOnly;
PRFileMap *dbs_mapfile;
unsigned char *dbs_addr;
PRUint32 dbs_len;
char staticBlobArea[BLOB_BUF_LEN];
};
/*
* return true if the Datablock contains a blobtype
*/
static PRBool
dbs_IsBlob(DBT *blobData)
{
unsigned char *addr = (unsigned char *)blobData->data;
if (blobData->size < BLOB_BUF_LEN) {
return PR_FALSE;
}
return addr && ((certDBEntryType) addr[1] == certDBEntryTypeBlob);
}
/*
* extract the filename in the blob of the real data set.
* This value is not malloced (does not need to be freed by the caller.
*/
static const char *
dbs_getBlobFileName(DBT *blobData)
{
char *addr = (char *)blobData->data;
return &addr[BLOB_NAME_START];
}
/*
* extract the size of the actual blob from the blob record
*/
static PRUint32
dbs_getBlobSize(DBT *blobData)
{
unsigned char *addr = (unsigned char *)blobData->data;
return (PRUint32)(addr[BLOB_LENGTH_START+3] << 24) |
(addr[BLOB_LENGTH_START+2] << 16) |
(addr[BLOB_LENGTH_START+1] << 8) |
addr[BLOB_LENGTH_START];
}
/* We are using base64 data for the filename, but base64 data can include a
* '/' which is interpreted as a path separator on many platforms. Replace it
* with an inocuous '-'. We don't need to convert back because we never actual
* decode the filename.
*/
static void
dbs_replaceSlash(char *cp, int len)
{
while (len--) {
if (*cp == '/') *cp = '-';
cp++;
}
}
/*
* create a blob record from a key, data and return it in blobData.
* NOTE: The data element is static data (keeping with the dbm model).
*/
static void
dbs_mkBlob(DBS *dbsp,const DBT *key, const DBT *data, DBT *blobData)
{
unsigned char sha1_data[SHA1_LENGTH];
char *b = dbsp->staticBlobArea;
PRUint32 length = data->size;
SECItem sha1Item;
b[0] = CERT_DB_FILE_VERSION; /* certdb version number */
b[1] = (char) certDBEntryTypeBlob; /* type */
b[2] = 0; /* flags */
b[3] = 0; /* reserved */
b[BLOB_LENGTH_START] = length & 0xff;
b[BLOB_LENGTH_START+1] = (length >> 8) & 0xff;
b[BLOB_LENGTH_START+2] = (length >> 16) & 0xff;
b[BLOB_LENGTH_START+3] = (length >> 24) & 0xff;
sha1Item.data = sha1_data;
sha1Item.len = SHA1_LENGTH;
SHA1_HashBuf(sha1_data,key->data,key->size);
b[BLOB_NAME_START]='b'; /* Make sure we start with a alpha */
NSSBase64_EncodeItem(NULL,&b[BLOB_NAME_START+1],BLOB_NAME_LEN-1,&sha1Item);
b[BLOB_BUF_LEN-1] = 0;
dbs_replaceSlash(&b[BLOB_NAME_START+1],BLOB_NAME_LEN-1);
blobData->data = b;
blobData->size = BLOB_BUF_LEN;
return;
}
/*
* construct a path to the actual blob. The string returned must be
* freed by the caller with PR_smprintf_free.
*
* Note: this file does lots of consistancy checks on the DBT. The
* routines that call this depend on these checks, so they don't worry
* about them (success of this routine implies a good blobdata record).
*/
static char *
dbs_getBlobFilePath(char *blobdir,DBT *blobData)
{
const char *name;
if (blobdir == NULL) {
PR_SetError(SEC_ERROR_BAD_DATABASE,0);
return NULL;
}
if (!dbs_IsBlob(blobData)) {
PR_SetError(SEC_ERROR_BAD_DATABASE,0);
return NULL;
}
name = dbs_getBlobFileName(blobData);
if (!name || *name == 0) {
PR_SetError(SEC_ERROR_BAD_DATABASE,0);
return NULL;
}
return PR_smprintf("%s" PATH_SEPARATOR "%s", blobdir, name);
}
/*
* Delete a blob file pointed to by the blob record.
*/
static void
dbs_removeBlob(DBS *dbsp, DBT *blobData)
{
char *file;
file = dbs_getBlobFilePath(dbsp->blobdir, blobData);
if (!file) {
return;
}
PR_Delete(file);
PR_smprintf_free(file);
}
/*
* Directory modes are slightly different, the 'x' bit needs to be on to
* access them. Copy all the read bits to 'x' bits
*/
static int
dbs_DirMode(int mode)
{
int x_bits = (mode >> 2) & 0111;
return mode | x_bits;
}
/*
* write a data blob to it's file. blobdData is the blob record that will be
* stored in the database. data is the actual data to go out on disk.
*/
static int
dbs_writeBlob(DBS *dbsp, int mode, DBT *blobData, const DBT *data)
{
char *file = NULL;
PRFileDesc *filed;
PRStatus status;
int len;
int error = 0;
file = dbs_getBlobFilePath(dbsp->blobdir, blobData);
if (!file) {
goto loser;
}
if (PR_Access(dbsp->blobdir, PR_ACCESS_EXISTS) != PR_SUCCESS) {
status = PR_MkDir(dbsp->blobdir,dbs_DirMode(mode));
if (status != PR_SUCCESS) {
goto loser;
}
}
filed = PR_OpenFile(file,PR_CREATE_FILE|PR_TRUNCATE|PR_WRONLY, mode);
if (filed == NULL) {
error = PR_GetError();
goto loser;
}
len = PR_Write(filed,data->data,data->size);
error = PR_GetError();
PR_Close(filed);
if (len < (int)data->size) {
goto loser;
}
PR_smprintf_free(file);
return 0;
loser:
if (file) {
PR_Delete(file);
PR_smprintf_free(file);
}
/* don't let close or delete reset the error */
PR_SetError(error,0);
return -1;
}
/*
* we need to keep a address map in memory between calls to DBM.
* remember what we have mapped can close it when we get another dbm
* call.
*
* NOTE: Not all platforms support mapped files. This code is designed to
* detect this at runtime. If map files aren't supported the OS will indicate
* this by failing the PR_Memmap call. In this case we emulate mapped files
* by just reading in the file into regular memory. We signal this state by
* making dbs_mapfile NULL and dbs_addr non-NULL.
*/
static void
dbs_freemap(DBS *dbsp)
{
if (dbsp->dbs_mapfile) {
PR_MemUnmap(dbsp->dbs_addr,dbsp->dbs_len);
PR_CloseFileMap(dbsp->dbs_mapfile);
dbsp->dbs_mapfile = NULL;
dbsp->dbs_addr = NULL;
dbsp->dbs_len = 0;
} else if (dbsp->dbs_addr) {
PORT_Free(dbsp->dbs_addr);
dbsp->dbs_addr = NULL;
dbsp->dbs_len = 0;
}
return;
}
static void
dbs_setmap(DBS *dbsp, PRFileMap *mapfile, unsigned char *addr, PRUint32 len)
{
dbsp->dbs_mapfile = mapfile;
dbsp->dbs_addr = addr;
dbsp->dbs_len = len;
}
/*
* platforms that cannot map the file need to read it into a temp buffer.
*/
static unsigned char *
dbs_EmulateMap(PRFileDesc *filed, int len)
{
unsigned char *addr;
PRInt32 dataRead;
addr = PORT_Alloc(len);
if (addr == NULL) {
return NULL;
}
dataRead = PR_Read(filed,addr,len);
if (dataRead != len) {
PORT_Free(addr);
if (dataRead > 0) {
/* PR_Read didn't set an error, we need to */
PR_SetError(SEC_ERROR_BAD_DATABASE,0);
}
return NULL;
}
return addr;
}
/*
* pull a database record off the disk
* data points to the blob record on input and the real record (if we could
* read it) on output. if there is an error data is not modified.
*/
static int
dbs_readBlob(DBS *dbsp, DBT *data)
{
char *file = NULL;
PRFileDesc *filed = NULL;
PRFileMap *mapfile = NULL;
unsigned char *addr = NULL;
int error;
int len = -1;
file = dbs_getBlobFilePath(dbsp->blobdir, data);
if (!file) {
goto loser;
}
filed = PR_OpenFile(file,PR_RDONLY,0);
PR_smprintf_free(file); file = NULL;
if (filed == NULL) {
goto loser;
}
len = dbs_getBlobSize(data);
mapfile = PR_CreateFileMap(filed, len, PR_PROT_READONLY);
if (mapfile == NULL) {
/* USE PR_GetError instead of PORT_GetError here
* because we are getting the error from PR_xxx
* function */
if (PR_GetError() != PR_NOT_IMPLEMENTED_ERROR) {
goto loser;
}
addr = dbs_EmulateMap(filed, len);
} else {
addr = PR_MemMap(mapfile, 0, len);
}
if (addr == NULL) {
goto loser;
}
PR_Close(filed);
dbs_setmap(dbsp,mapfile,addr,len);
data->data = addr;
data->size = len;
return 0;
loser:
/* preserve the error code */
error = PR_GetError();
if (mapfile) {
PR_CloseFileMap(mapfile);
}
if (filed) {
PR_Close(filed);
}
PR_SetError(error,0);
return -1;
}
/*
* actual DBM shims
*/
static int
dbs_get(const DB *dbs, const DBT *key, DBT *data, unsigned int flags)
{
int ret;
DBS *dbsp = (DBS *)dbs;
DB *db = (DB *)dbs->internal;
dbs_freemap(dbsp);
ret = (* db->get)(db, key, data, flags);
if ((ret == 0) && dbs_IsBlob(data)) {
ret = dbs_readBlob(dbsp,data);
}
return(ret);
}
static int
dbs_put(const DB *dbs, DBT *key, const DBT *data, unsigned int flags)
{
DBT blob;
int ret = 0;
DBS *dbsp = (DBS *)dbs;
DB *db = (DB *)dbs->internal;
dbs_freemap(dbsp);
/* If the db is readonly, just pass the data down to rdb and let it fail */
if (!dbsp->readOnly) {
DBT oldData;
int ret1;
/* make sure the current record is deleted if it's a blob */
ret1 = (*db->get)(db,key,&oldData,0);
if ((ret1 == 0) && flags == R_NOOVERWRITE) {
/* let DBM return the error to maintain consistancy */
return (* db->put)(db, key, data, flags);
}
if ((ret1 == 0) && dbs_IsBlob(&oldData)) {
dbs_removeBlob(dbsp, &oldData);
}
if (data->size > DBS_MAX_ENTRY_SIZE) {
dbs_mkBlob(dbsp,key,data,&blob);
ret = dbs_writeBlob(dbsp, dbsp->mode, &blob, data);
data = &blob;
}
}
if (ret == 0) {
ret = (* db->put)(db, key, data, flags);
}
return(ret);
}
static int
dbs_sync(const DB *dbs, unsigned int flags)
{
DB *db = (DB *)dbs->internal;
DBS *dbsp = (DBS *)dbs;
dbs_freemap(dbsp);
return (* db->sync)(db, flags);
}
static int
dbs_del(const DB *dbs, const DBT *key, unsigned int flags)
{
int ret;
DBS *dbsp = (DBS *)dbs;
DB *db = (DB *)dbs->internal;
dbs_freemap(dbsp);
if (!dbsp->readOnly) {
DBT oldData;
ret = (*db->get)(db,key,&oldData,0);
if ((ret == 0) && dbs_IsBlob(&oldData)) {
dbs_removeBlob(dbsp,&oldData);
}
}
return (* db->del)(db, key, flags);
}
static int
dbs_seq(const DB *dbs, DBT *key, DBT *data, unsigned int flags)
{
int ret;
DBS *dbsp = (DBS *)dbs;
DB *db = (DB *)dbs->internal;
dbs_freemap(dbsp);
ret = (* db->seq)(db, key, data, flags);
if ((ret == 0) && dbs_IsBlob(data)) {
/* don't return a blob read as an error so traversals keep going */
(void) dbs_readBlob(dbsp,data);
}
return(ret);
}
static int
dbs_close(DB *dbs)
{
DBS *dbsp = (DBS *)dbs;
DB *db = (DB *)dbs->internal;
int ret;
dbs_freemap(dbsp);
ret = (* db->close)(db);
PORT_Free(dbsp->blobdir);
PORT_Free(dbsp);
return ret;
}
static int
dbs_fd(const DB *dbs)
{
DB *db = (DB *)dbs->internal;
return (* db->fd)(db);
}
/*
* the naming convention we use is
* change the .xxx into .dir. (for nss it's always .db);
* if no .extension exists or is equal to .dir, add a .dir
* the returned data must be freed.
*/
#define DIRSUFFIX ".dir"
static char *
dbs_mkBlobDirName(const char *dbname)
{
int dbname_len = PORT_Strlen(dbname);
int dbname_end = dbname_len;
const char *cp;
char *blobDir = NULL;
/* scan back from the end looking for either a directory separator, a '.',
* or the end of the string. NOTE: Windows should check for both separators
* here. For now this is safe because we know NSS always uses a '.'
*/
for (cp = &dbname[dbname_len];
(cp > dbname) && (*cp != '.') && (*cp != *PATH_SEPARATOR) ;
cp--)
/* Empty */ ;
if (*cp == '.') {
dbname_end = cp - dbname;
if (PORT_Strcmp(cp,DIRSUFFIX) == 0) {
dbname_end = dbname_len;
}
}
blobDir = PORT_ZAlloc(dbname_end+sizeof(DIRSUFFIX));
if (blobDir == NULL) {
return NULL;
}
PORT_Memcpy(blobDir,dbname,dbname_end);
PORT_Memcpy(&blobDir[dbname_end],DIRSUFFIX,sizeof(DIRSUFFIX));
return blobDir;
}
#define DBM_DEFAULT 0
static const HASHINFO dbs_hashInfo = {
DBS_BLOCK_SIZE, /* bucket size, must be greater than = to
* or maximum entry size (+ header)
* we allow before blobing */
DBM_DEFAULT, /* Fill Factor */
DBM_DEFAULT, /* number of elements */
DBS_CACHE_SIZE, /* cache size */
DBM_DEFAULT, /* hash function */
DBM_DEFAULT, /* byte order */
};
/*
* the open function. NOTE: this is the only exposed function in this file.
* everything else is called through the function table pointer.
*/
DB *
dbsopen(const char *dbname, int flags, int mode, DBTYPE type,
const void *userData)
{
DB *db = NULL,*dbs = NULL;
DBS *dbsp = NULL;
/* NOTE: we are overriding userData with dbs_hashInfo. since all known
* callers pass 0, this is ok, otherwise we should merge the two */
dbsp = (DBS *)PORT_ZAlloc(sizeof(DBS));
if (!dbsp) {
return NULL;
}
dbs = &dbsp->db;
dbsp->blobdir=dbs_mkBlobDirName(dbname);
if (dbsp->blobdir == NULL) {
goto loser;
}
dbsp->mode = mode;
dbsp->readOnly = (PRBool)(flags == NO_RDONLY);
dbsp->dbs_mapfile = NULL;
dbsp->dbs_addr = NULL;
dbsp->dbs_len = 0;
/* the real dbm call */
db = dbopen(dbname, flags, mode, type, &dbs_hashInfo);
if (db == NULL) {
goto loser;
}
dbs->internal = (void *) db;
dbs->type = type;
dbs->close = dbs_close;
dbs->get = dbs_get;
dbs->del = dbs_del;
dbs->put = dbs_put;
dbs->seq = dbs_seq;
dbs->sync = dbs_sync;
dbs->fd = dbs_fd;
return dbs;
loser:
if (db) {
(*db->close)(db);
}
if (dbsp) {
if (dbsp->blobdir) {
PORT_Free(dbsp->blobdir);
}
PORT_Free(dbsp);
}
return NULL;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,86 +0,0 @@
/*
* private.h - Private data structures for the software token library
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: keydbi.h,v 1.1.2.1 2007-04-03 22:50:02 rrelyea%redhat.com Exp $ */
#ifndef _KEYDBI_H_
#define _KEYDBI_H_
#include "nspr.h"
#include "seccomon.h"
#include "mcom_db.h"
/*
* Handle structure for open key databases
*/
struct NSSLOWKEYDBHandleStr {
DB *db;
DB *updatedb; /* used when updating an old version */
SECItem *global_salt; /* password hashing salt for this db */
int version; /* version of the database */
char *appname; /* multiaccess app name */
char *dbname; /* name of the openned DB */
PRBool readOnly; /* is the DB read only */
PRLock *lock;
PRInt32 ref; /* reference count */
};
/*
** Typedef for callback for traversing key database.
** "key" is the key used to index the data in the database (nickname)
** "data" is the key data
** "pdata" is the user's data
*/
typedef SECStatus (* NSSLOWKEYTraverseKeysFunc)(DBT *key, DBT *data, void *pdata);
SEC_BEGIN_PROTOS
/*
** Traverse the entire key database, and pass the nicknames and keys to a
** user supplied function.
** "f" is the user function to call for each key
** "udata" is the user's data, which is passed through to "f"
*/
extern SECStatus nsslowkey_TraverseKeys(NSSLOWKEYDBHandle *handle,
NSSLOWKEYTraverseKeysFunc f,
void *udata);
SEC_END_PROTOS
#endif /* _KEYDBI_H_ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,955 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "secitem.h"
#include "pkcs11.h"
#include "lgdb.h"
#include "pcert.h"
#include "lowkeyi.h"
#include "blapi.h"
#include "secder.h"
#include "keydbi.h"
/*
* ******************** Object Creation Utilities ***************************
*/
/*
* check the consistancy and initialize a Certificate Object
*/
static CK_RV
lg_createCertObject(SDB *sdb, CK_OBJECT_HANDLE *handle,
const CK_ATTRIBUTE *templ, CK_ULONG count)
{
SECItem derCert;
NSSLOWCERTCertificate *cert;
NSSLOWCERTCertTrust *trust = NULL;
NSSLOWCERTCertTrust userTrust =
{ CERTDB_USER, CERTDB_USER, CERTDB_USER };
NSSLOWCERTCertTrust defTrust =
{ CERTDB_TRUSTED_UNKNOWN,
CERTDB_TRUSTED_UNKNOWN, CERTDB_TRUSTED_UNKNOWN };
char *label = NULL;
char *email = NULL;
SECStatus rv;
PRBool inDB = PR_TRUE;
NSSLOWCERTCertDBHandle *certHandle = lg_getCertDB(sdb);
NSSLOWKEYDBHandle *keyHandle = NULL;
CK_CERTIFICATE_TYPE type;
const CK_ATTRIBUTE *attribute;
/* we can't store any certs private */
if (lg_isTrue(CKA_PRIVATE, templ, count)) {
return CKR_ATTRIBUTE_VALUE_INVALID;
}
/* We only support X.509 Certs for now */
attribute = lg_FindAttribute(CKA_CERTIFICATE_TYPE, templ, count);
if (attribute == NULL) return CKR_TEMPLATE_INCOMPLETE;
type = *(CK_CERTIFICATE_TYPE *)attribute->pValue;
if (type != CKC_X_509) {
return CKR_ATTRIBUTE_VALUE_INVALID;
}
/* X.509 Certificate */
if (certHandle == NULL) {
return CKR_TOKEN_WRITE_PROTECTED;
}
/* get the der cert */
attribute = lg_FindAttribute(CKA_VALUE, templ, count);
if (!attribute) {
return CKR_ATTRIBUTE_VALUE_INVALID;
}
derCert.type = 0;
derCert.data = (unsigned char *)attribute->pValue;
derCert.len = attribute->ulValueLen ;
label = lg_getString(CKA_LABEL, templ, count);
cert = nsslowcert_FindCertByDERCert(certHandle, &derCert);
if (cert == NULL) {
cert = nsslowcert_DecodeDERCertificate(&derCert, label);
inDB = PR_FALSE;
}
if (cert == NULL) {
if (label) PORT_Free(label);
return CKR_ATTRIBUTE_VALUE_INVALID;
}
keyHandle = lg_getKeyDB(sdb);
if (keyHandle) {
if (nsslowkey_KeyForCertExists(keyHandle,cert)) {
trust = &userTrust;
}
}
if (!inDB) {
if (!trust) trust = &defTrust;
rv = nsslowcert_AddPermCert(certHandle, cert, label, trust);
} else {
rv = trust ? nsslowcert_ChangeCertTrust(certHandle,cert,trust) :
SECSuccess;
}
if (label) PORT_Free(label);
if (rv != SECSuccess) {
nsslowcert_DestroyCertificate(cert);
return CKR_DEVICE_ERROR;
}
/*
* Add a NULL S/MIME profile if necessary.
*/
email = lg_getString(CKA_NETSCAPE_EMAIL, templ, count);
if (email) {
certDBEntrySMime *entry;
entry = nsslowcert_ReadDBSMimeEntry(certHandle,email);
if (!entry) {
nsslowcert_SaveSMimeProfile(certHandle, email,
&cert->derSubject, NULL, NULL);
} else {
nsslowcert_DestroyDBEntry((certDBEntry *)entry);
}
PORT_Free(email);
}
*handle=lg_mkHandle(sdb,&cert->certKey,LG_TOKEN_TYPE_CERT);
nsslowcert_DestroyCertificate(cert);
return CKR_OK;
}
unsigned int
lg_MapTrust(CK_TRUST trust, PRBool clientAuth)
{
unsigned int trustCA = clientAuth ? CERTDB_TRUSTED_CLIENT_CA :
CERTDB_TRUSTED_CA;
switch (trust) {
case CKT_NETSCAPE_TRUSTED:
return CERTDB_VALID_PEER|CERTDB_TRUSTED;
case CKT_NETSCAPE_TRUSTED_DELEGATOR:
return CERTDB_VALID_CA|trustCA;
case CKT_NETSCAPE_UNTRUSTED:
return CERTDB_NOT_TRUSTED;
case CKT_NETSCAPE_MUST_VERIFY:
return 0;
case CKT_NETSCAPE_VALID: /* implies must verify */
return CERTDB_VALID_PEER;
case CKT_NETSCAPE_VALID_DELEGATOR: /* implies must verify */
return CERTDB_VALID_CA;
default:
break;
}
return CERTDB_TRUSTED_UNKNOWN;
}
/*
* check the consistancy and initialize a Trust Object
*/
static CK_RV
lg_createTrustObject(SDB *sdb, CK_OBJECT_HANDLE *handle,
const CK_ATTRIBUTE *templ, CK_ULONG count)
{
const CK_ATTRIBUTE *issuer = NULL;
const CK_ATTRIBUTE *serial = NULL;
NSSLOWCERTCertificate *cert = NULL;
const CK_ATTRIBUTE *trust;
CK_TRUST sslTrust = CKT_NETSCAPE_TRUST_UNKNOWN;
CK_TRUST clientTrust = CKT_NETSCAPE_TRUST_UNKNOWN;
CK_TRUST emailTrust = CKT_NETSCAPE_TRUST_UNKNOWN;
CK_TRUST signTrust = CKT_NETSCAPE_TRUST_UNKNOWN;
CK_BBOOL stepUp;
NSSLOWCERTCertTrust dbTrust = { 0 };
SECStatus rv;
NSSLOWCERTCertDBHandle *certHandle = lg_getCertDB(sdb);
NSSLOWCERTIssuerAndSN issuerSN;
/* we can't store any certs private */
if (lg_isTrue(CKA_PRIVATE, templ, count)) {
return CKR_ATTRIBUTE_VALUE_INVALID;
}
if (certHandle == NULL) {
return CKR_TOKEN_WRITE_PROTECTED;
}
issuer = lg_FindAttribute(CKA_ISSUER, templ, count);
serial = lg_FindAttribute(CKA_SERIAL_NUMBER, templ, count);
if (issuer && serial) {
issuerSN.derIssuer.data = (unsigned char *)issuer->pValue;
issuerSN.derIssuer.len = issuer->ulValueLen ;
issuerSN.serialNumber.data = (unsigned char *)serial->pValue;
issuerSN.serialNumber.len = serial->ulValueLen ;
cert = nsslowcert_FindCertByIssuerAndSN(certHandle,&issuerSN);
}
if (cert == NULL) {
return CKR_ATTRIBUTE_VALUE_INVALID;
}
lg_GetULongAttribute(CKA_TRUST_SERVER_AUTH, templ, count, &sslTrust);
lg_GetULongAttribute(CKA_TRUST_CLIENT_AUTH, templ, count, &clientTrust);
lg_GetULongAttribute(CKA_TRUST_EMAIL_PROTECTION, templ, count, &emailTrust);
lg_GetULongAttribute(CKA_TRUST_CODE_SIGNING, templ, count, &signTrust);
stepUp = CK_FALSE;
trust = lg_FindAttribute(CKA_TRUST_STEP_UP_APPROVED, templ, count);
if (trust) {
if (trust->ulValueLen == sizeof(CK_BBOOL)) {
stepUp = *(CK_BBOOL*)trust->pValue;
}
}
/* preserve certain old fields */
if (cert->trust) {
dbTrust.sslFlags = cert->trust->sslFlags & CERTDB_PRESERVE_TRUST_BITS;
dbTrust.emailFlags=
cert->trust->emailFlags & CERTDB_PRESERVE_TRUST_BITS;
dbTrust.objectSigningFlags =
cert->trust->objectSigningFlags & CERTDB_PRESERVE_TRUST_BITS;
}
dbTrust.sslFlags |= lg_MapTrust(sslTrust,PR_FALSE);
dbTrust.sslFlags |= lg_MapTrust(clientTrust,PR_TRUE);
dbTrust.emailFlags |= lg_MapTrust(emailTrust,PR_FALSE);
dbTrust.objectSigningFlags |= lg_MapTrust(signTrust,PR_FALSE);
if (stepUp) {
dbTrust.sslFlags |= CERTDB_GOVT_APPROVED_CA;
}
rv = nsslowcert_ChangeCertTrust(certHandle,cert,&dbTrust);
*handle=lg_mkHandle(sdb,&cert->certKey,LG_TOKEN_TYPE_TRUST);
nsslowcert_DestroyCertificate(cert);
if (rv != SECSuccess) {
return CKR_DEVICE_ERROR;
}
return CKR_OK;
}
/*
* check the consistancy and initialize a Trust Object
*/
static CK_RV
lg_createSMimeObject(SDB *sdb, CK_OBJECT_HANDLE *handle,
const CK_ATTRIBUTE *templ, CK_ULONG count)
{
SECItem derSubj,rawProfile,rawTime,emailKey;
SECItem *pRawProfile = NULL;
SECItem *pRawTime = NULL;
char *email = NULL;
const CK_ATTRIBUTE *subject = NULL,
*profile = NULL,
*time = NULL;
SECStatus rv;
NSSLOWCERTCertDBHandle *certHandle;
CK_RV ck_rv = CKR_OK;
/* we can't store any certs private */
if (lg_isTrue(CKA_PRIVATE,templ,count)) {
return CKR_ATTRIBUTE_VALUE_INVALID;
}
certHandle = lg_getCertDB(sdb);
if (certHandle == NULL) {
return CKR_TOKEN_WRITE_PROTECTED;
}
/* lookup SUBJECT */
subject = lg_FindAttribute(CKA_SUBJECT,templ,count);
PORT_Assert(subject);
if (!subject) {
ck_rv = CKR_ATTRIBUTE_VALUE_INVALID;
goto loser;
}
derSubj.data = (unsigned char *)subject->pValue;
derSubj.len = subject->ulValueLen ;
derSubj.type = 0;
/* lookup VALUE */
profile = lg_FindAttribute(CKA_VALUE,templ,count);
if (profile) {
rawProfile.data = (unsigned char *)profile->pValue;
rawProfile.len = profile->ulValueLen ;
rawProfile.type = siBuffer;
pRawProfile = &rawProfile;
}
/* lookup Time */
time = lg_FindAttribute(CKA_NETSCAPE_SMIME_TIMESTAMP,templ,count);
if (time) {
rawTime.data = (unsigned char *)time->pValue;
rawTime.len = time->ulValueLen ;
rawTime.type = siBuffer;
pRawTime = &rawTime;
}
email = lg_getString(CKA_NETSCAPE_EMAIL,templ,count);
if (!email) {
ck_rv = CKR_ATTRIBUTE_VALUE_INVALID;
goto loser;
}
/* Store S/MIME Profile by SUBJECT */
rv = nsslowcert_SaveSMimeProfile(certHandle, email, &derSubj,
pRawProfile,pRawTime);
if (rv != SECSuccess) {
ck_rv = CKR_DEVICE_ERROR;
goto loser;
}
emailKey.data = (unsigned char *)email;
emailKey.len = PORT_Strlen(email)+1;
*handle = lg_mkHandle(sdb, &emailKey, LG_TOKEN_TYPE_SMIME);
loser:
if (email) PORT_Free(email);
return ck_rv;
}
/*
* check the consistancy and initialize a Trust Object
*/
static CK_RV
lg_createCrlObject(SDB *sdb, CK_OBJECT_HANDLE *handle,
const CK_ATTRIBUTE *templ, CK_ULONG count)
{
PRBool isKRL = PR_FALSE;
SECItem derSubj,derCrl;
char *url = NULL;
const CK_ATTRIBUTE *subject,*crl;
SECStatus rv;
NSSLOWCERTCertDBHandle *certHandle;
certHandle = lg_getCertDB(sdb);
/* we can't store any private crls */
if (lg_isTrue(CKA_PRIVATE,templ,count)) {
return CKR_ATTRIBUTE_VALUE_INVALID;
}
if (certHandle == NULL) {
return CKR_TOKEN_WRITE_PROTECTED;
}
/* lookup SUBJECT */
subject = lg_FindAttribute(CKA_SUBJECT,templ,count);
if (!subject) {
return CKR_ATTRIBUTE_VALUE_INVALID;
}
derSubj.data = (unsigned char *)subject->pValue;
derSubj.len = subject->ulValueLen ;
/* lookup VALUE */
crl = lg_FindAttribute(CKA_VALUE,templ,count);
PORT_Assert(crl);
if (!crl) {
return CKR_ATTRIBUTE_VALUE_INVALID;
}
derCrl.data = (unsigned char *)crl->pValue;
derCrl.len = crl->ulValueLen ;
url = lg_getString(CKA_NETSCAPE_URL,templ,count);
isKRL = lg_isTrue(CKA_NETSCAPE_KRL,templ,count);
/* Store CRL by SUBJECT */
rv = nsslowcert_AddCrl(certHandle, &derCrl, &derSubj, url, isKRL);
if (url) {
PORT_Free(url);
}
if (rv != SECSuccess) {
return CKR_DEVICE_ERROR;
}
/* if we overwrote the existing CRL, poison the handle entry so we get
* a new object handle */
(void) lg_poisonHandle(sdb, &derSubj,
isKRL ? LG_TOKEN_KRL_HANDLE : LG_TOKEN_TYPE_CRL);
*handle = lg_mkHandle(sdb, &derSubj,
isKRL ? LG_TOKEN_KRL_HANDLE : LG_TOKEN_TYPE_CRL);
return CKR_OK;
}
/*
* check the consistancy and initialize a Public Key Object
*/
static CK_RV
lg_createPublicKeyObject(SDB *sdb, CK_KEY_TYPE key_type,
CK_OBJECT_HANDLE *handle, const CK_ATTRIBUTE *templ, CK_ULONG count)
{
CK_ATTRIBUTE_TYPE pubKeyAttr = CKA_VALUE;
CK_RV crv;
NSSLOWKEYPrivateKey *priv;
SECItem pubKey;
NSSLOWKEYDBHandle *keyHandle = NULL;
switch (key_type) {
case CKK_RSA:
pubKeyAttr = CKA_MODULUS;
break;
#ifdef NSS_ENABLE_ECC
case CKK_EC:
pubKeyAttr = CKA_EC_POINT;
break;
#endif /* NSS_ENABLE_ECC */
case CKK_DSA:
case CKK_DH:
break;
default:
return CKR_ATTRIBUTE_VALUE_INVALID;
}
crv = lg_Attribute2SSecItem(NULL,pubKeyAttr,templ,count,&pubKey);
if (crv != CKR_OK) return crv;
PORT_Assert(pubKey.data);
keyHandle = lg_getKeyDB(sdb);
if (keyHandle == NULL) {
PORT_Free(pubKey.data);
return CKR_TOKEN_WRITE_PROTECTED;
}
if (keyHandle->version != 3) {
unsigned char buf[SHA1_LENGTH];
SHA1_HashBuf(buf,pubKey.data,pubKey.len);
PORT_Memcpy(pubKey.data,buf,sizeof(buf));
pubKey.len = sizeof(buf);
}
/* make sure the associated private key already exists */
/* only works if we are logged in */
priv = nsslowkey_FindKeyByPublicKey(keyHandle, &pubKey, sdb /*password*/);
if (priv == NULL) {
PORT_Free(pubKey.data);
return crv;
}
nsslowkey_DestroyPrivateKey(priv);
*handle = lg_mkHandle(sdb, &pubKey, LG_TOKEN_TYPE_PUB);
PORT_Free(pubKey.data);
return CKR_OK;
}
/* make a private key from a verified object */
static NSSLOWKEYPrivateKey *
lg_mkPrivKey(SDB *sdb, const CK_ATTRIBUTE *templ, CK_ULONG count,
CK_KEY_TYPE key_type, CK_RV *crvp)
{
NSSLOWKEYPrivateKey *privKey;
PLArenaPool *arena;
CK_RV crv = CKR_OK;
SECStatus rv;
arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
if (arena == NULL) {
*crvp = CKR_HOST_MEMORY;
return NULL;
}
privKey = (NSSLOWKEYPrivateKey *)
PORT_ArenaZAlloc(arena,sizeof(NSSLOWKEYPrivateKey));
if (privKey == NULL) {
PORT_FreeArena(arena,PR_FALSE);
*crvp = CKR_HOST_MEMORY;
return NULL;
}
/* in future this would be a switch on key_type */
privKey->arena = arena;
switch (key_type) {
case CKK_RSA:
privKey->keyType = NSSLOWKEYRSAKey;
crv=lg_Attribute2SSecItem(arena,CKA_MODULUS,templ,count,
&privKey->u.rsa.modulus);
if (crv != CKR_OK) break;
crv=lg_Attribute2SSecItem(arena,CKA_PUBLIC_EXPONENT,templ,count,
&privKey->u.rsa.publicExponent);
if (crv != CKR_OK) break;
crv=lg_PrivAttr2SSecItem(arena,CKA_PRIVATE_EXPONENT,templ,count,
&privKey->u.rsa.privateExponent, sdb);
if (crv != CKR_OK) break;
crv=lg_PrivAttr2SSecItem(arena,CKA_PRIME_1,templ,count,
&privKey->u.rsa.prime1, sdb);
if (crv != CKR_OK) break;
crv=lg_PrivAttr2SSecItem(arena,CKA_PRIME_2,templ,count,
&privKey->u.rsa.prime2, sdb);
if (crv != CKR_OK) break;
crv=lg_PrivAttr2SSecItem(arena,CKA_EXPONENT_1,templ,count,
&privKey->u.rsa.exponent1, sdb);
if (crv != CKR_OK) break;
crv=lg_PrivAttr2SSecItem(arena,CKA_EXPONENT_2,templ,count,
&privKey->u.rsa.exponent2, sdb);
if (crv != CKR_OK) break;
crv=lg_PrivAttr2SSecItem(arena,CKA_COEFFICIENT,templ,count,
&privKey->u.rsa.coefficient, sdb);
if (crv != CKR_OK) break;
rv = DER_SetUInteger(privKey->arena, &privKey->u.rsa.version,
NSSLOWKEY_VERSION);
if (rv != SECSuccess) crv = CKR_HOST_MEMORY;
break;
case CKK_DSA:
privKey->keyType = NSSLOWKEYDSAKey;
crv = lg_Attribute2SSecItem(arena,CKA_PRIME,templ,count,
&privKey->u.dsa.params.prime);
if (crv != CKR_OK) break;
crv = lg_Attribute2SSecItem(arena,CKA_SUBPRIME,templ,count,
&privKey->u.dsa.params.subPrime);
if (crv != CKR_OK) break;
crv = lg_Attribute2SSecItem(arena,CKA_BASE,templ,count,
&privKey->u.dsa.params.base);
if (crv != CKR_OK) break;
crv = lg_PrivAttr2SSecItem(arena,CKA_VALUE,templ,count,
&privKey->u.dsa.privateValue, sdb);
if (crv != CKR_OK) break;
if (lg_hasAttribute(CKA_NETSCAPE_DB, templ,count)) {
crv = lg_Attribute2SSecItem(arena, CKA_NETSCAPE_DB,templ,count,
&privKey->u.dsa.publicValue);
/* privKey was zero'd so public value is already set to NULL, 0
* if we don't set it explicitly */
}
break;
case CKK_DH:
privKey->keyType = NSSLOWKEYDHKey;
crv = lg_Attribute2SSecItem(arena,CKA_PRIME,templ,count,
&privKey->u.dh.prime);
if (crv != CKR_OK) break;
crv = lg_Attribute2SSecItem(arena,CKA_BASE,templ,count,
&privKey->u.dh.base);
if (crv != CKR_OK) break;
crv = lg_PrivAttr2SSecItem(arena,CKA_VALUE,templ,count,
&privKey->u.dh.privateValue, sdb);
if (crv != CKR_OK) break;
if (lg_hasAttribute(CKA_NETSCAPE_DB, templ, count)) {
crv = lg_Attribute2SSecItem(arena, CKA_NETSCAPE_DB,templ,count,
&privKey->u.dh.publicValue);
/* privKey was zero'd so public value is already set to NULL, 0
* if we don't set it explicitly */
}
break;
#ifdef NSS_ENABLE_ECC
case CKK_EC:
privKey->keyType = NSSLOWKEYECKey;
crv = lg_Attribute2SSecItem(arena, CKA_EC_PARAMS,templ,count,
&privKey->u.ec.ecParams.DEREncoding);
if (crv != CKR_OK) break;
/* Fill out the rest of the ecParams structure
* based on the encoded params
*/
if (LGEC_FillParams(arena, &privKey->u.ec.ecParams.DEREncoding,
&privKey->u.ec.ecParams) != SECSuccess) {
crv = CKR_DOMAIN_PARAMS_INVALID;
break;
}
crv = lg_PrivAttr2SSecItem(arena,CKA_VALUE,templ,count,
&privKey->u.ec.privateValue, sdb);
if (crv != CKR_OK) break;
if (lg_hasAttribute(CKA_NETSCAPE_DB,templ,count)) {
crv = lg_Attribute2SSecItem(arena, CKA_NETSCAPE_DB,templ,count,
&privKey->u.ec.publicValue);
if (crv != CKR_OK) break;
/* privKey was zero'd so public value is already set to NULL, 0
* if we don't set it explicitly */
}
rv = DER_SetUInteger(privKey->arena, &privKey->u.ec.version,
NSSLOWKEY_EC_PRIVATE_KEY_VERSION);
if (rv != SECSuccess) crv = CKR_HOST_MEMORY;
break;
#endif /* NSS_ENABLE_ECC */
default:
crv = CKR_KEY_TYPE_INCONSISTENT;
break;
}
*crvp = crv;
if (crv != CKR_OK) {
PORT_FreeArena(arena,PR_FALSE);
return NULL;
}
return privKey;
}
/*
* check the consistancy and initialize a Private Key Object
*/
static CK_RV
lg_createPrivateKeyObject(SDB *sdb, CK_KEY_TYPE key_type,
CK_OBJECT_HANDLE *handle, const CK_ATTRIBUTE *templ, CK_ULONG count)
{
NSSLOWKEYPrivateKey *privKey;
char *label;
SECStatus rv = SECSuccess;
CK_RV crv = CKR_DEVICE_ERROR;
SECItem pubKey;
NSSLOWKEYDBHandle *keyHandle = lg_getKeyDB(sdb);
if (keyHandle == NULL) {
return CKR_TOKEN_WRITE_PROTECTED;
}
privKey=lg_mkPrivKey(sdb, templ,count,key_type,&crv);
if (privKey == NULL) return crv;
label = lg_getString(CKA_LABEL,templ,count);
crv = lg_Attribute2SSecItem(NULL,CKA_NETSCAPE_DB,templ,count,&pubKey);
if (crv != CKR_OK) {
crv = CKR_TEMPLATE_INCOMPLETE;
rv = SECFailure;
goto fail;
}
#ifdef notdef
if (keyHandle->version != 3) {
unsigned char buf[SHA1_LENGTH];
SHA1_HashBuf(buf,pubKey.data,pubKey.len);
PORT_Memcpy(pubKey.data,buf,sizeof(buf));
pubKey.len = sizeof(buf);
}
#endif
/* get the key type */
if (key_type == CKK_RSA) {
rv = RSA_PrivateKeyCheck(&privKey->u.rsa);
if (rv == SECFailure) {
goto fail;
}
}
rv = nsslowkey_StoreKeyByPublicKey(keyHandle, privKey, &pubKey,
label, sdb /*->password*/);
fail:
if (label) PORT_Free(label);
*handle = lg_mkHandle(sdb,&pubKey,LG_TOKEN_TYPE_PRIV);
if (pubKey.data) PORT_Free(pubKey.data);
nsslowkey_DestroyPrivateKey(privKey);
if (rv != SECSuccess) return crv;
return CKR_OK;
}
#define LG_KEY_MAX_RETRIES 10 /* don't hang if we are having problems with the rng */
#define LG_KEY_ID_SIZE 18 /* don't use either SHA1 or MD5 sizes */
/*
* Secret keys must have a CKA_ID value to be stored in the database. This code
* will generate one if there wasn't one already.
*/
static CK_RV
lg_GenerateSecretCKA_ID(NSSLOWKEYDBHandle *handle, SECItem *id, char *label)
{
unsigned int retries;
SECStatus rv = SECSuccess;
CK_RV crv = CKR_OK;
id->data = NULL;
if (label) {
id->data = (unsigned char *)PORT_Strdup(label);
if (id->data == NULL) {
return CKR_HOST_MEMORY;
}
id->len = PORT_Strlen(label)+1;
if (!nsslowkey_KeyForIDExists(handle,id)) {
return CKR_OK;
}
PORT_Free(id->data);
id->data = NULL;
id->len = 0;
}
id->data = (unsigned char *)PORT_Alloc(LG_KEY_ID_SIZE);
if (id->data == NULL) {
return CKR_HOST_MEMORY;
}
id->len = LG_KEY_ID_SIZE;
retries = 0;
do {
rv = RNG_GenerateGlobalRandomBytes(id->data,id->len);
} while (rv == SECSuccess && nsslowkey_KeyForIDExists(handle,id) &&
(++retries <= LG_KEY_MAX_RETRIES));
if ((rv != SECSuccess) || (retries > LG_KEY_MAX_RETRIES)) {
crv = CKR_DEVICE_ERROR; /* random number generator is bad */
PORT_Free(id->data);
id->data = NULL;
id->len = 0;
}
return crv;
}
static NSSLOWKEYPrivateKey *lg_mkSecretKeyRep(const CK_ATTRIBUTE *templ,
CK_ULONG count, CK_KEY_TYPE key_type,
SECItem *pubkey, SDB *sdbpw)
{
NSSLOWKEYPrivateKey *privKey = 0;
PLArenaPool *arena = 0;
CK_KEY_TYPE keyType;
PRUint32 keyTypeStorage;
SECItem keyTypeItem;
CK_RV crv;
SECStatus rv;
static unsigned char derZero[1] = { 0 };
arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
if (arena == NULL) { crv = CKR_HOST_MEMORY; goto loser; }
privKey = (NSSLOWKEYPrivateKey *)
PORT_ArenaZAlloc(arena,sizeof(NSSLOWKEYPrivateKey));
if (privKey == NULL) { crv = CKR_HOST_MEMORY; goto loser; }
privKey->arena = arena;
/* Secret keys are represented in the database as "fake" RSA keys.
* The RSA key is marked as a secret key representation by setting the
* public exponent field to 0, which is an invalid RSA exponent.
* The other fields are set as follows:
* modulus - CKA_ID value for the secret key
* private exponent - CKA_VALUE (the key itself)
* coefficient - CKA_KEY_TYPE, which indicates what encryption algorithm
* is used for the key.
* all others - set to integer 0
*/
privKey->keyType = NSSLOWKEYRSAKey;
/* The modulus is set to the key id of the symmetric key */
crv = lg_Attribute2SecItem(arena, CKA_ID, templ, count,
&privKey->u.rsa.modulus);
if (crv != CKR_OK) goto loser;
/* The public exponent is set to 0 length to indicate a special key */
privKey->u.rsa.publicExponent.len = sizeof derZero;
privKey->u.rsa.publicExponent.data = derZero;
/* The private exponent is the actual key value */
crv = lg_PrivAttr2SecItem(arena, CKA_VALUE, templ, count,
&privKey->u.rsa.privateExponent, sdbpw);
if (crv != CKR_OK) goto loser;
/* All other fields empty - needs testing */
privKey->u.rsa.prime1.len = sizeof derZero;
privKey->u.rsa.prime1.data = derZero;
privKey->u.rsa.prime2.len = sizeof derZero;
privKey->u.rsa.prime2.data = derZero;
privKey->u.rsa.exponent1.len = sizeof derZero;
privKey->u.rsa.exponent1.data = derZero;
privKey->u.rsa.exponent2.len = sizeof derZero;
privKey->u.rsa.exponent2.data = derZero;
/* Coeficient set to KEY_TYPE */
crv = lg_GetULongAttribute(CKA_KEY_TYPE, templ, count, &keyType);
if (crv != CKR_OK) goto loser;
/* on 64 bit platforms, we still want to store 32 bits of keyType (This is
* safe since the PKCS #11 defines for all types are 32 bits or less). */
keyTypeStorage = (PRUint32) keyType;
keyTypeStorage = PR_htonl(keyTypeStorage);
keyTypeItem.data = (unsigned char *)&keyTypeStorage;
keyTypeItem.len = sizeof (keyTypeStorage);
rv = SECITEM_CopyItem(arena, &privKey->u.rsa.coefficient, &keyTypeItem);
if (rv != SECSuccess) {
crv = CKR_HOST_MEMORY;
goto loser;
}
/* Private key version field set normally for compatibility */
rv = DER_SetUInteger(privKey->arena,
&privKey->u.rsa.version, NSSLOWKEY_VERSION);
if (rv != SECSuccess) { crv = CKR_HOST_MEMORY; goto loser; }
loser:
if (crv != CKR_OK) {
PORT_FreeArena(arena,PR_FALSE);
privKey = 0;
}
return privKey;
}
/*
* check the consistancy and initialize a Secret Key Object
*/
static CK_RV
lg_createSecretKeyObject(SDB *sdb, CK_KEY_TYPE key_type,
CK_OBJECT_HANDLE *handle, const CK_ATTRIBUTE *templ, CK_ULONG count)
{
CK_RV crv;
NSSLOWKEYPrivateKey *privKey = NULL;
NSSLOWKEYDBHandle *keyHandle = NULL;
SECItem pubKey;
char *label = NULL;
SECStatus rv = SECSuccess;
pubKey.data = 0;
/* If the object is a TOKEN object, store in the database */
keyHandle = lg_getKeyDB(sdb);
if (keyHandle == NULL) {
return CKR_TOKEN_WRITE_PROTECTED;
}
label = lg_getString(CKA_LABEL,templ,count);
crv = lg_Attribute2SecItem(NULL,CKA_ID,templ,count,&pubKey);
/* Should this be ID? */
if (crv != CKR_OK) goto loser;
/* if we don't have an ID, generate one */
if (pubKey.len == 0) {
if (pubKey.data) {
PORT_Free(pubKey.data);
pubKey.data = NULL;
}
crv = lg_GenerateSecretCKA_ID(keyHandle, &pubKey, label);
if (crv != CKR_OK) goto loser;
}
privKey = lg_mkSecretKeyRep(templ, count, key_type, &pubKey, sdb);
if (privKey == NULL) {
crv = CKR_HOST_MEMORY;
goto loser;
}
rv = nsslowkey_StoreKeyByPublicKey(keyHandle,
privKey, &pubKey, label, sdb /*->password*/);
if (rv != SECSuccess) {
crv = CKR_DEVICE_ERROR;
goto loser;
}
*handle = lg_mkHandle(sdb, &pubKey, LG_TOKEN_TYPE_KEY);
loser:
if (label) PORT_Free(label);
if (privKey) nsslowkey_DestroyPrivateKey(privKey);
if (pubKey.data) PORT_Free(pubKey.data);
return crv;
}
/*
* check the consistancy and initialize a Key Object
*/
static CK_RV
lg_createKeyObject(SDB *sdb, CK_OBJECT_CLASS objclass,
CK_OBJECT_HANDLE *handle, const CK_ATTRIBUTE *templ, CK_ULONG count)
{
CK_RV crv;
CK_KEY_TYPE key_type;
/* get the key type */
crv = lg_GetULongAttribute(CKA_KEY_TYPE, templ, count, &key_type);
if (crv != CKR_OK) {
return crv;
}
switch (objclass) {
case CKO_PUBLIC_KEY:
return lg_createPublicKeyObject(sdb,key_type,handle,templ,count);
case CKO_PRIVATE_KEY:
return lg_createPrivateKeyObject(sdb,key_type,handle,templ,count);
case CKO_SECRET_KEY:
return lg_createSecretKeyObject(sdb,key_type,handle,templ,count);
default:
break;
}
return CKR_ATTRIBUTE_VALUE_INVALID;
}
/*
* Parse the template and create an object stored in the DB that reflects.
* the object specified in the database.
*/
CK_RV
lg_CreateObject(SDB *sdb, CK_OBJECT_HANDLE *handle,
const CK_ATTRIBUTE *templ, CK_ULONG count)
{
CK_RV crv;
CK_OBJECT_CLASS objclass;
/* get the object class */
crv = lg_GetULongAttribute(CKA_CLASS, templ, count, &objclass);
if (crv != CKR_OK) {
return crv;
}
/* Now handle the specific object class.
*/
switch (objclass) {
case CKO_CERTIFICATE:
crv = lg_createCertObject(sdb,handle,templ,count);
break;
case CKO_NETSCAPE_TRUST:
crv = lg_createTrustObject(sdb,handle,templ,count);
break;
case CKO_NETSCAPE_CRL:
crv = lg_createCrlObject(sdb,handle,templ,count);
break;
case CKO_NETSCAPE_SMIME:
crv = lg_createSMimeObject(sdb,handle,templ,count);
break;
case CKO_PRIVATE_KEY:
case CKO_PUBLIC_KEY:
case CKO_SECRET_KEY:
crv = lg_createKeyObject(sdb,objclass,handle,templ,count);
break;
default:
crv = CKR_ATTRIBUTE_VALUE_INVALID;
break;
}
return crv;
}

View File

@@ -1,197 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* Internal data structures and functions used by pkcs11.c
*/
#ifndef _LGDB_H_
#define _LGDB_H_ 1
#include "nssilock.h"
#include "seccomon.h"
#include "secoidt.h"
#include "lowkeyti.h"
#include "pkcs11t.h"
#include "sdb.h"
#include "cdbhdl.h"
#define MULTIACCESS "multiaccess:"
/* machine dependent path stuff used by dbinit.c and pk11db.c */
#ifdef macintosh
#define PATH_SEPARATOR ":"
#define SECMOD_DB "Security Modules"
#define CERT_DB_FMT "%sCertificates%s"
#define KEY_DB_FMT "%sKey Database%s"
#else
#define PATH_SEPARATOR "/"
#define SECMOD_DB "secmod.db"
#define CERT_DB_FMT "%scert%s.db"
#define KEY_DB_FMT "%skey%s.db"
#endif
SEC_BEGIN_PROTOS
/* internal utility functions used by pkcs11.c */
extern const CK_ATTRIBUTE *lg_FindAttribute(CK_ATTRIBUTE_TYPE type,
const CK_ATTRIBUTE *templ, CK_ULONG count);
extern CK_RV lg_Attribute2SecItem(PLArenaPool *,CK_ATTRIBUTE_TYPE type,
const CK_ATTRIBUTE *templ, CK_ULONG count,
SECItem *item);
extern CK_RV lg_Attribute2SSecItem(PLArenaPool *,CK_ATTRIBUTE_TYPE type,
const CK_ATTRIBUTE *templ, CK_ULONG count,
SECItem *item);
extern CK_RV lg_PrivAttr2SecItem(PLArenaPool *,CK_ATTRIBUTE_TYPE type,
const CK_ATTRIBUTE *templ, CK_ULONG count,
SECItem *item, SDB *sdbpw);
extern CK_RV lg_PrivAttr2SSecItem(PLArenaPool *,CK_ATTRIBUTE_TYPE type,
const CK_ATTRIBUTE *templ, CK_ULONG count,
SECItem *item, SDB *sdbpw);
extern CK_RV lg_GetULongAttribute(CK_ATTRIBUTE_TYPE type,
const CK_ATTRIBUTE *templ, CK_ULONG count,
CK_ULONG *out);
extern PRBool lg_hasAttribute(CK_ATTRIBUTE_TYPE type,
const CK_ATTRIBUTE *templ, CK_ULONG count);
extern PRBool lg_isTrue(CK_ATTRIBUTE_TYPE type,
const CK_ATTRIBUTE *templ, CK_ULONG count);
extern PRBool lg_isSensitive(CK_ATTRIBUTE_TYPE type, CK_OBJECT_CLASS inClass);
extern char *lg_getString(CK_ATTRIBUTE_TYPE type,
const CK_ATTRIBUTE *templ, CK_ULONG count);
extern unsigned int lg_MapTrust(CK_TRUST trust, PRBool clientAuth);
/* clear out all the existing object ID to database key mappings.
* used to reinit a token */
extern CK_RV SFTK_ClearTokenKeyHashTable(SDB *sdb);
extern void lg_FreeSearch(SDBFind *search);
NSSLOWCERTCertDBHandle *lg_getCertDB(SDB *sdb);
NSSLOWKEYDBHandle *lg_getKeyDB(SDB *sdb);
const char *lg_EvaluateConfigDir(const char *configdir, char **domain);
/*
* object handle modifiers
*/
#define LG_TOKEN_MASK 0xc0000000L
#define LG_TOKEN_TYPE_MASK 0x38000000L
#define LG_TOKEN_TYPE_SHIFT 27
/* keydb (high bit == 0) */
#define LG_TOKEN_TYPE_PRIV 0x08000000L
#define LG_TOKEN_TYPE_PUB 0x10000000L
#define LG_TOKEN_TYPE_KEY 0x18000000L
/* certdb (high bit == 1) */
#define LG_TOKEN_TYPE_TRUST 0x20000000L
#define LG_TOKEN_TYPE_CRL 0x28000000L
#define LG_TOKEN_TYPE_SMIME 0x30000000L
#define LG_TOKEN_TYPE_CERT 0x38000000L
#define LG_TOKEN_KRL_HANDLE (LG_TOKEN_TYPE_CRL|1)
#define LG_SEARCH_BLOCK_SIZE 10
#define LG_BUF_SPACE 50
#define LG_STRICT PR_FALSE
/*
* token object utilities
*/
void lg_addHandle(SDBFind *search, CK_OBJECT_HANDLE handle);
PRBool lg_poisonHandle(SDB *sdb, SECItem *dbkey, CK_OBJECT_HANDLE handle);
PRBool lg_tokenMatch(SDB *sdb, const SECItem *dbKey, CK_OBJECT_HANDLE class,
const CK_ATTRIBUTE *templ, CK_ULONG count);
const SECItem *lg_lookupTokenKeyByHandle(SDB *sdb, CK_OBJECT_HANDLE handle);
CK_OBJECT_HANDLE lg_mkHandle(SDB *sdb, SECItem *dbKey, CK_OBJECT_HANDLE class);
SECStatus lg_deleteTokenKeyByHandle(SDB *sdb, CK_OBJECT_HANDLE handle);
SECStatus lg_util_encrypt(PLArenaPool *arena, SDB *sdbpw,
SECItem *plainText, SECItem **cipherText);
SECStatus lg_util_decrypt(SDB *sdbpw,
SECItem *cipherText, SECItem **plainText);
PLHashTable *lg_GetHashTable(SDB *sdb);
void lg_DBLock(SDB *sdb);
void lg_DBUnlock(SDB *sdb);
typedef void (*LGFreeFunc)(void *);
/*
* database functions
*/
/* lg_FindObjectsInit initializes a search for token and session objects
* that match a template. */
CK_RV lg_FindObjectsInit(SDB *sdb, const CK_ATTRIBUTE *pTemplate,
CK_ULONG ulCount, SDBFind **search);
/* lg_FindObjects continues a search for token and session objects
* that match a template, obtaining additional object handles. */
CK_RV lg_FindObjects(SDB *sdb, SDBFind *search,
CK_OBJECT_HANDLE *phObject,CK_ULONG ulMaxObjectCount,
CK_ULONG *pulObjectCount);
/* lg_FindObjectsFinal finishes a search for token and session objects. */
CK_RV lg_FindObjectsFinal(SDB* lgdb, SDBFind *search);
/* lg_CreateObject parses the template and create an object stored in the
* DB that reflects the object specified in the template. */
CK_RV lg_CreateObject(SDB *sdb, CK_OBJECT_HANDLE *handle,
const CK_ATTRIBUTE *templ, CK_ULONG count);
CK_RV lg_GetAttributeValue(SDB *sdb, CK_OBJECT_HANDLE object_id,
CK_ATTRIBUTE *template, CK_ULONG count);
CK_RV lg_SetAttributeValue(SDB *sdb, CK_OBJECT_HANDLE object_id,
const CK_ATTRIBUTE *template, CK_ULONG count);
CK_RV lg_DestroyObject(SDB *sdb, CK_OBJECT_HANDLE object_id);
CK_RV lg_Close(SDB *sdb);
CK_RV lg_Reset(SDB *sdb);
/*
* The old database doesn't share and doesn't support
* transactions.
*/
CK_RV lg_Begin(SDB *sdb);
CK_RV lg_Commit(SDB *sdb);
CK_RV lg_Abort(SDB *sdb);
CK_RV lg_GetPWEntry(SDB *sdb, SDBPasswordEntry *entry);
CK_RV lg_PutPWEntry(SDB *sdb, SDBPasswordEntry *entry);
SEC_END_PROTOS
#endif /* _LGDB_H_ */

View File

@@ -1,64 +0,0 @@
;+#
;+# ***** BEGIN LICENSE BLOCK *****
;+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
;+#
;+# The contents of this file are subject to the Mozilla Public License Version
;+# 1.1 (the "License"); you may not use this file except in compliance with
;+# the License. You may obtain a copy of the License at
;+# http://www.mozilla.org/MPL/
;+#
;+# Software distributed under the License is distributed on an "AS IS" basis,
;+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
;+# for the specific language governing rights and limitations under the
;+# License.
;+#
;+# The Original Code is the Netscape security libraries.
;+#
;+# The Initial Developer of the Original Code is
;+# Netscape Communications Corporation.
;+# Portions created by the Initial Developer are Copyright (C) 2000
;+# the Initial Developer. All Rights Reserved.
;+#
;+# Contributor(s):
;+# Dr Stephen Henson <stephen.henson@gemplus.com>
;+#
;+# Alternatively, the contents of this file may be used under the terms of
;+# either the GNU General Public License Version 2 or later (the "GPL"), or
;+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
;+# in which case the provisions of the GPL or the LGPL are applicable instead
;+# of those above. If you wish to allow use of your version of this file only
;+# under the terms of either the GPL or the LGPL, and not to allow others to
;+# use your version of this file under the terms of the MPL, indicate your
;+# decision by deleting the provisions above and replace them with the notice
;+# and other provisions required by the GPL or the LGPL. If you do not delete
;+# the provisions above, a recipient may use your version of this file under
;+# the terms of any one of the MPL, the GPL or the LGPL.
;+#
;+# ***** END LICENSE BLOCK *****
;+#
;+# OK, this file is meant to support SUN, LINUX, AIX and WINDOWS
;+# 1. For all unix platforms, the string ";-" means "remove this line"
;+# 2. For all unix platforms, the string " DATA " will be removed from any
;+# line on which it occurs.
;+# 3. Lines containing ";+" will have ";+" removed on SUN and LINUX.
;+# On AIX, lines containing ";+" will be removed.
;+# 4. For all unix platforms, the string ";;" will thave the ";;" removed.
;+# 5. For all unix platforms, after the above processing has taken place,
;+# all characters after the first ";" on the line will be removed.
;+# And for AIX, the first ";" will also be removed.
;+# This file is passed directly to windows. Since ';' is a comment, all UNIX
;+# directives are hidden behind ";", ";+", and ";-"
;+LGDBM_3.12 { # NSS 3.12 release
;+ global:
LIBRARY lgdbm3 ;-
EXPORTS ;-
legacy_Open;
legacy_Shutdown;
legacy_ReadSecmodDB;
legacy_ReleaseSecmodDBData;
legacy_AddSecmodDB;
legacy_DeleteSecmodDB;
legacy_SetCryptFunctions;
;+ local:
;+ *;
;+};

View File

@@ -1,144 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* Internal PKCS #11 functions. Should only be called by pkcs11.c
*/
#include "pkcs11.h"
#include "lgdb.h"
#include "pcert.h"
#include "lowkeyi.h"
/*
* remove an object.
*/
CK_RV
lg_DestroyObject(SDB *sdb, CK_OBJECT_HANDLE object_id)
{
CK_RV crv = CKR_OK;
SECStatus rv;
NSSLOWCERTCertificate *cert;
NSSLOWCERTCertTrust tmptrust;
PRBool isKrl;
NSSLOWKEYDBHandle *keyHandle;
NSSLOWCERTCertDBHandle *certHandle;
const SECItem *dbKey;
object_id &= ~LG_TOKEN_MASK;
dbKey = lg_lookupTokenKeyByHandle(sdb,object_id);
if (dbKey == NULL) {
return CKR_OBJECT_HANDLE_INVALID;
}
/* remove the objects from the real data base */
switch (object_id & LG_TOKEN_TYPE_MASK) {
case LG_TOKEN_TYPE_PRIV:
case LG_TOKEN_TYPE_KEY:
/* KEYID is the public KEY for DSA and DH, and the MODULUS for
* RSA */
keyHandle = lg_getKeyDB(sdb);
if (!keyHandle) {
crv = CKR_TOKEN_WRITE_PROTECTED;
break;
}
rv = nsslowkey_DeleteKey(keyHandle, dbKey);
if (rv != SECSuccess) {
crv = CKR_DEVICE_ERROR;
}
break;
case LG_TOKEN_TYPE_PUB:
break; /* public keys only exist at the behest of the priv key */
case LG_TOKEN_TYPE_CERT:
certHandle = lg_getCertDB(sdb);
if (!certHandle) {
crv = CKR_TOKEN_WRITE_PROTECTED;
break;
}
cert = nsslowcert_FindCertByKey(certHandle,dbKey);
if (cert == NULL) {
crv = CKR_DEVICE_ERROR;
break;
}
rv = nsslowcert_DeletePermCertificate(cert);
if (rv != SECSuccess) {
crv = CKR_DEVICE_ERROR;
}
nsslowcert_DestroyCertificate(cert);
break;
case LG_TOKEN_TYPE_CRL:
certHandle = lg_getCertDB(sdb);
if (!certHandle) {
crv = CKR_TOKEN_WRITE_PROTECTED;
break;
}
isKrl = (PRBool) (object_id == LG_TOKEN_KRL_HANDLE);
rv = nsslowcert_DeletePermCRL(certHandle, dbKey, isKrl);
if (rv == SECFailure) crv = CKR_DEVICE_ERROR;
break;
case LG_TOKEN_TYPE_TRUST:
certHandle = lg_getCertDB(sdb);
if (!certHandle) {
crv = CKR_TOKEN_WRITE_PROTECTED;
break;
}
cert = nsslowcert_FindCertByKey(certHandle, dbKey);
if (cert == NULL) {
crv = CKR_DEVICE_ERROR;
break;
}
tmptrust = *cert->trust;
tmptrust.sslFlags &= CERTDB_PRESERVE_TRUST_BITS;
tmptrust.emailFlags &= CERTDB_PRESERVE_TRUST_BITS;
tmptrust.objectSigningFlags &= CERTDB_PRESERVE_TRUST_BITS;
tmptrust.sslFlags |= CERTDB_TRUSTED_UNKNOWN;
tmptrust.emailFlags |= CERTDB_TRUSTED_UNKNOWN;
tmptrust.objectSigningFlags |= CERTDB_TRUSTED_UNKNOWN;
rv = nsslowcert_ChangeCertTrust(certHandle, cert, &tmptrust);
if (rv != SECSuccess) crv = CKR_DEVICE_ERROR;
nsslowcert_DestroyCertificate(cert);
break;
default:
break;
}
lg_DBLock(sdb);
lg_deleteTokenKeyByHandle(sdb,object_id);
lg_DBUnlock(sdb);
return crv;
}

View File

@@ -1,941 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "secitem.h"
#include "pkcs11.h"
#include "lgdb.h"
#include "lowkeyi.h"
#include "pcert.h"
#include "blapi.h"
#include "keydbi.h"
/*
* This code maps PKCS #11 Finds to legacy database searches. This code
* was orginally in pkcs11.c in previous versions of NSS.
*/
struct SDBFindStr {
CK_OBJECT_HANDLE *handles;
int size;
int index;
int array_size;
};
/*
* free a search structure
*/
void
lg_FreeSearch(SDBFind *search)
{
if (search->handles) {
PORT_Free(search->handles);
}
PORT_Free(search);
}
void
lg_addHandle(SDBFind *search, CK_OBJECT_HANDLE handle)
{
if (search->handles == NULL) {
return;
}
if (search->size >= search->array_size) {
search->array_size += LG_SEARCH_BLOCK_SIZE;
search->handles = (CK_OBJECT_HANDLE *) PORT_Realloc(search->handles,
sizeof(CK_OBJECT_HANDLE)* search->array_size);
if (search->handles == NULL) {
return;
}
}
search->handles[search->size] = handle;
search->size++;
}
/*
* find any certs that may match the template and load them.
*/
#define LG_CERT 0x00000001
#define LG_TRUST 0x00000002
#define LG_CRL 0x00000004
#define LG_SMIME 0x00000008
#define LG_PRIVATE 0x00000010
#define LG_PUBLIC 0x00000020
#define LG_KEY 0x00000040
/*
* structure to collect key handles.
*/
typedef struct lgEntryDataStr {
SDB *sdb;
SDBFind *searchHandles;
const CK_ATTRIBUTE *template;
CK_ULONG templ_count;
} lgEntryData;
static SECStatus
lg_crl_collect(SECItem *data, SECItem *key, certDBEntryType type, void *arg)
{
lgEntryData *crlData;
CK_OBJECT_HANDLE class_handle;
SDB *sdb;
crlData = (lgEntryData *)arg;
sdb = crlData->sdb;
class_handle = (type == certDBEntryTypeRevocation) ? LG_TOKEN_TYPE_CRL :
LG_TOKEN_KRL_HANDLE;
if (lg_tokenMatch(sdb, key, class_handle,
crlData->template, crlData->templ_count)) {
lg_addHandle(crlData->searchHandles,
lg_mkHandle(sdb,key,class_handle));
}
return(SECSuccess);
}
static void
lg_searchCrls(SDB *sdb, SECItem *derSubject, PRBool isKrl,
unsigned long classFlags, SDBFind *search,
const CK_ATTRIBUTE *pTemplate, CK_ULONG ulCount)
{
NSSLOWCERTCertDBHandle *certHandle = NULL;
certHandle = lg_getCertDB(sdb);
if (certHandle == NULL) {
return;
}
if (derSubject->data != NULL) {
certDBEntryRevocation *crl =
nsslowcert_FindCrlByKey(certHandle, derSubject, isKrl);
if (crl != NULL) {
lg_addHandle(search, lg_mkHandle(sdb, derSubject,
isKrl ? LG_TOKEN_KRL_HANDLE : LG_TOKEN_TYPE_CRL));
nsslowcert_DestroyDBEntry((certDBEntry *)crl);
}
} else {
lgEntryData crlData;
/* traverse */
crlData.sdb = sdb;
crlData.searchHandles = search;
crlData.template = pTemplate;
crlData.templ_count = ulCount;
nsslowcert_TraverseDBEntries(certHandle, certDBEntryTypeRevocation,
lg_crl_collect, (void *)&crlData);
nsslowcert_TraverseDBEntries(certHandle, certDBEntryTypeKeyRevocation,
lg_crl_collect, (void *)&crlData);
}
}
/*
* structure to collect key handles.
*/
typedef struct lgKeyDataStr {
SDB *sdb;
NSSLOWKEYDBHandle *keyHandle;
SDBFind *searchHandles;
SECItem *id;
const CK_ATTRIBUTE *template;
CK_ULONG templ_count;
unsigned long classFlags;
PRBool strict;
} lgKeyData;
static PRBool
isSecretKey(NSSLOWKEYPrivateKey *privKey)
{
if (privKey->keyType == NSSLOWKEYRSAKey &&
privKey->u.rsa.publicExponent.len == 1 &&
privKey->u.rsa.publicExponent.data[0] == 0)
return PR_TRUE;
return PR_FALSE;
}
static SECStatus
lg_key_collect(DBT *key, DBT *data, void *arg)
{
lgKeyData *keyData;
NSSLOWKEYPrivateKey *privKey = NULL;
SECItem tmpDBKey;
SDB *sdb;
unsigned long classFlags;
keyData = (lgKeyData *)arg;
sdb = keyData->sdb;
classFlags = keyData->classFlags;
tmpDBKey.data = key->data;
tmpDBKey.len = key->size;
tmpDBKey.type = siBuffer;
PORT_Assert(keyData->keyHandle);
if (!keyData->strict && keyData->id) {
SECItem result;
PRBool haveMatch= PR_FALSE;
unsigned char hashKey[SHA1_LENGTH];
result.data = hashKey;
result.len = sizeof(hashKey);
if (keyData->id->len == 0) {
/* Make sure this isn't a LG_KEY */
privKey = nsslowkey_FindKeyByPublicKey(keyData->keyHandle,
&tmpDBKey, keyData->sdb/*->password*/);
if (privKey) {
/* turn off the unneeded class flags */
classFlags &= isSecretKey(privKey) ? ~(LG_PRIVATE|LG_PUBLIC) :
~LG_KEY;
haveMatch = (PRBool)
((classFlags & (LG_KEY|LG_PRIVATE|LG_PUBLIC)) != 0);
nsslowkey_DestroyPrivateKey(privKey);
}
} else {
SHA1_HashBuf( hashKey, key->data, key->size ); /* match id */
haveMatch = SECITEM_ItemsAreEqual(keyData->id,&result);
if (!haveMatch && ((unsigned char *)key->data)[0] == 0) {
/* This is a fix for backwards compatibility. The key
* database indexes private keys by the public key, and
* versions of NSS prior to 3.4 stored the public key as
* a signed integer. The public key is now treated as an
* unsigned integer, with no leading zero. In order to
* correctly compute the hash of an old key, it is necessary
* to fallback and detect the leading zero.
*/
SHA1_HashBuf(hashKey,
(unsigned char *)key->data + 1, key->size - 1);
haveMatch = SECITEM_ItemsAreEqual(keyData->id,&result);
}
}
if (haveMatch) {
if (classFlags & LG_PRIVATE) {
lg_addHandle(keyData->searchHandles,
lg_mkHandle(sdb,&tmpDBKey,LG_TOKEN_TYPE_PRIV));
}
if (classFlags & LG_PUBLIC) {
lg_addHandle(keyData->searchHandles,
lg_mkHandle(sdb,&tmpDBKey,LG_TOKEN_TYPE_PUB));
}
if (classFlags & LG_KEY) {
lg_addHandle(keyData->searchHandles,
lg_mkHandle(sdb,&tmpDBKey,LG_TOKEN_TYPE_KEY));
}
}
return SECSuccess;
}
privKey = nsslowkey_FindKeyByPublicKey(keyData->keyHandle, &tmpDBKey,
keyData->sdb/*->password*/);
if ( privKey == NULL ) {
goto loser;
}
if (isSecretKey(privKey)) {
if ((classFlags & LG_KEY) &&
lg_tokenMatch(keyData->sdb, &tmpDBKey, LG_TOKEN_TYPE_KEY,
keyData->template, keyData->templ_count)) {
lg_addHandle(keyData->searchHandles,
lg_mkHandle(keyData->sdb, &tmpDBKey, LG_TOKEN_TYPE_KEY));
}
} else {
if ((classFlags & LG_PRIVATE) &&
lg_tokenMatch(keyData->sdb, &tmpDBKey, LG_TOKEN_TYPE_PRIV,
keyData->template, keyData->templ_count)) {
lg_addHandle(keyData->searchHandles,
lg_mkHandle(keyData->sdb,&tmpDBKey,LG_TOKEN_TYPE_PRIV));
}
if ((classFlags & LG_PUBLIC) &&
lg_tokenMatch(keyData->sdb, &tmpDBKey, LG_TOKEN_TYPE_PUB,
keyData->template, keyData->templ_count)) {
lg_addHandle(keyData->searchHandles,
lg_mkHandle(keyData->sdb, &tmpDBKey,LG_TOKEN_TYPE_PUB));
}
}
loser:
if ( privKey ) {
nsslowkey_DestroyPrivateKey(privKey);
}
return(SECSuccess);
}
static void
lg_searchKeys(SDB *sdb, SECItem *key_id,
unsigned long classFlags, SDBFind *search, PRBool mustStrict,
const CK_ATTRIBUTE *pTemplate, CK_ULONG ulCount)
{
NSSLOWKEYDBHandle *keyHandle = NULL;
NSSLOWKEYPrivateKey *privKey;
lgKeyData keyData;
PRBool found = PR_FALSE;
keyHandle = lg_getKeyDB(sdb);
if (keyHandle == NULL) {
return;
}
if (key_id->data) {
privKey = nsslowkey_FindKeyByPublicKey(keyHandle, key_id, sdb);
if (privKey) {
if ((classFlags & LG_KEY) && isSecretKey(privKey)) {
lg_addHandle(search,
lg_mkHandle(sdb,key_id,LG_TOKEN_TYPE_KEY));
found = PR_TRUE;
}
if ((classFlags & LG_PRIVATE) && !isSecretKey(privKey)) {
lg_addHandle(search,
lg_mkHandle(sdb,key_id,LG_TOKEN_TYPE_PRIV));
found = PR_TRUE;
}
if ((classFlags & LG_PUBLIC) && !isSecretKey(privKey)) {
lg_addHandle(search,
lg_mkHandle(sdb,key_id,LG_TOKEN_TYPE_PUB));
found = PR_TRUE;
}
nsslowkey_DestroyPrivateKey(privKey);
}
/* don't do the traversal if we have an up to date db */
if (keyHandle->version != 3) {
goto loser;
}
/* don't do the traversal if it can't possibly be the correct id */
/* all soft token id's are SHA1_HASH_LEN's */
if (key_id->len != SHA1_LENGTH) {
goto loser;
}
if (found) {
/* if we already found some keys, don't do the traversal */
goto loser;
}
}
keyData.sdb = sdb;
keyData.keyHandle = keyHandle;
keyData.searchHandles = search;
keyData.id = key_id;
keyData.template = pTemplate;
keyData.templ_count = ulCount;
keyData.classFlags = classFlags;
keyData.strict = mustStrict ? mustStrict : LG_STRICT;
nsslowkey_TraverseKeys(keyHandle, lg_key_collect, &keyData);
loser:
return;
}
/*
* structure to collect certs into
*/
typedef struct lgCertDataStr {
SDB *sdb;
int cert_count;
int max_cert_count;
NSSLOWCERTCertificate **certs;
const CK_ATTRIBUTE *template;
CK_ULONG templ_count;
unsigned long classFlags;
PRBool strict;
} lgCertData;
/*
* collect all the certs from the traverse call.
*/
static SECStatus
lg_cert_collect(NSSLOWCERTCertificate *cert,void *arg)
{
lgCertData *cd = (lgCertData *)arg;
if (cert == NULL) {
return SECSuccess;
}
if (cd->certs == NULL) {
return SECFailure;
}
if (cd->strict) {
if ((cd->classFlags & LG_CERT) && !lg_tokenMatch(cd->sdb,
&cert->certKey, LG_TOKEN_TYPE_CERT, cd->template,cd->templ_count)) {
return SECSuccess;
}
if ((cd->classFlags & LG_TRUST) && !lg_tokenMatch(cd->sdb,
&cert->certKey, LG_TOKEN_TYPE_TRUST,
cd->template, cd->templ_count)) {
return SECSuccess;
}
}
/* allocate more space if we need it. This should only happen in
* the general traversal case */
if (cd->cert_count >= cd->max_cert_count) {
int size;
cd->max_cert_count += LG_SEARCH_BLOCK_SIZE;
size = cd->max_cert_count * sizeof (NSSLOWCERTCertificate *);
cd->certs = (NSSLOWCERTCertificate **)PORT_Realloc(cd->certs,size);
if (cd->certs == NULL) {
return SECFailure;
}
}
cd->certs[cd->cert_count++] = nsslowcert_DupCertificate(cert);
return SECSuccess;
}
/* provide impedence matching ... */
static SECStatus
lg_cert_collect2(NSSLOWCERTCertificate *cert, SECItem *dymmy, void *arg)
{
return lg_cert_collect(cert, arg);
}
static void
lg_searchSingleCert(lgCertData *certData,NSSLOWCERTCertificate *cert)
{
if (cert == NULL) {
return;
}
if (certData->strict &&
!lg_tokenMatch(certData->sdb, &cert->certKey, LG_TOKEN_TYPE_CERT,
certData->template,certData->templ_count)) {
nsslowcert_DestroyCertificate(cert);
return;
}
certData->certs = (NSSLOWCERTCertificate **)
PORT_Alloc(sizeof (NSSLOWCERTCertificate *));
if (certData->certs == NULL) {
nsslowcert_DestroyCertificate(cert);
return;
}
certData->certs[0] = cert;
certData->cert_count = 1;
}
static void
lg_CertSetupData(lgCertData *certData,int count)
{
certData->max_cert_count = count;
if (certData->max_cert_count <= 0) {
return;
}
certData->certs = (NSSLOWCERTCertificate **)
PORT_Alloc( count * sizeof(NSSLOWCERTCertificate *));
return;
}
static void
lg_searchCertsAndTrust(SDB *sdb, SECItem *derCert, SECItem *name,
SECItem *derSubject, NSSLOWCERTIssuerAndSN *issuerSN,
SECItem *email,
unsigned long classFlags, SDBFind *handles,
const CK_ATTRIBUTE *pTemplate, CK_LONG ulCount)
{
NSSLOWCERTCertDBHandle *certHandle = NULL;
lgCertData certData;
int i;
certHandle = lg_getCertDB(sdb);
if (certHandle == NULL) return;
certData.sdb = sdb;
certData.max_cert_count = 0;
certData.certs = NULL;
certData.cert_count = 0;
certData.template = pTemplate;
certData.templ_count = ulCount;
certData.classFlags = classFlags;
certData.strict = LG_STRICT;
/*
* Find the Cert.
*/
if (derCert->data != NULL) {
NSSLOWCERTCertificate *cert =
nsslowcert_FindCertByDERCert(certHandle,derCert);
lg_searchSingleCert(&certData,cert);
} else if (name->data != NULL) {
char *tmp_name = (char*)PORT_Alloc(name->len+1);
int count;
if (tmp_name == NULL) {
return;
}
PORT_Memcpy(tmp_name,name->data,name->len);
tmp_name[name->len] = 0;
count= nsslowcert_NumPermCertsForNickname(certHandle,tmp_name);
lg_CertSetupData(&certData,count);
nsslowcert_TraversePermCertsForNickname(certHandle,tmp_name,
lg_cert_collect, &certData);
PORT_Free(tmp_name);
} else if (derSubject->data != NULL) {
int count;
count = nsslowcert_NumPermCertsForSubject(certHandle,derSubject);
lg_CertSetupData(&certData,count);
nsslowcert_TraversePermCertsForSubject(certHandle,derSubject,
lg_cert_collect, &certData);
} else if ((issuerSN->derIssuer.data != NULL) &&
(issuerSN->serialNumber.data != NULL)) {
if (classFlags & LG_CERT) {
NSSLOWCERTCertificate *cert =
nsslowcert_FindCertByIssuerAndSN(certHandle,issuerSN);
lg_searchSingleCert(&certData,cert);
}
if (classFlags & LG_TRUST) {
NSSLOWCERTTrust *trust =
nsslowcert_FindTrustByIssuerAndSN(certHandle, issuerSN);
if (trust) {
lg_addHandle(handles,
lg_mkHandle(sdb,&trust->dbKey,LG_TOKEN_TYPE_TRUST));
nsslowcert_DestroyTrust(trust);
}
}
} else if (email->data != NULL) {
char *tmp_name = (char*)PORT_Alloc(email->len+1);
certDBEntrySMime *entry = NULL;
if (tmp_name == NULL) {
return;
}
PORT_Memcpy(tmp_name,email->data,email->len);
tmp_name[email->len] = 0;
entry = nsslowcert_ReadDBSMimeEntry(certHandle,tmp_name);
if (entry) {
int count;
SECItem *subjectName = &entry->subjectName;
count = nsslowcert_NumPermCertsForSubject(certHandle, subjectName);
lg_CertSetupData(&certData,count);
nsslowcert_TraversePermCertsForSubject(certHandle, subjectName,
lg_cert_collect, &certData);
nsslowcert_DestroyDBEntry((certDBEntry *)entry);
}
PORT_Free(tmp_name);
} else {
/* we aren't filtering the certs, we are working on all, so turn
* on the strict filters. */
certData.strict = PR_TRUE;
lg_CertSetupData(&certData,LG_SEARCH_BLOCK_SIZE);
nsslowcert_TraversePermCerts(certHandle, lg_cert_collect2, &certData);
}
/*
* build the handles
*/
for (i=0 ; i < certData.cert_count ; i++) {
NSSLOWCERTCertificate *cert = certData.certs[i];
/* if we filtered it would have been on the stuff above */
if (classFlags & LG_CERT) {
lg_addHandle(handles,
lg_mkHandle(sdb,&cert->certKey,LG_TOKEN_TYPE_CERT));
}
if ((classFlags & LG_TRUST) && nsslowcert_hasTrust(cert->trust)) {
lg_addHandle(handles,
lg_mkHandle(sdb,&cert->certKey,LG_TOKEN_TYPE_TRUST));
}
nsslowcert_DestroyCertificate(cert);
}
if (certData.certs) PORT_Free(certData.certs);
return;
}
static SECStatus
lg_smime_collect(SECItem *data, SECItem *key, certDBEntryType type, void *arg)
{
lgEntryData *smimeData;
SDB *sdb;
smimeData = (lgEntryData *)arg;
sdb = smimeData->sdb;
if (lg_tokenMatch(sdb, key, LG_TOKEN_TYPE_SMIME,
smimeData->template, smimeData->templ_count)) {
lg_addHandle(smimeData->searchHandles,
lg_mkHandle(sdb,key,LG_TOKEN_TYPE_SMIME));
}
return(SECSuccess);
}
static void
lg_searchSMime(SDB *sdb, SECItem *email, SDBFind *handles,
const CK_ATTRIBUTE *pTemplate, CK_LONG ulCount)
{
NSSLOWCERTCertDBHandle *certHandle = NULL;
certDBEntrySMime *entry;
certHandle = lg_getCertDB(sdb);
if (certHandle == NULL) return;
if (email->data != NULL) {
char *tmp_name = (char*)PORT_Alloc(email->len+1);
if (tmp_name == NULL) {
return;
}
PORT_Memcpy(tmp_name,email->data,email->len);
tmp_name[email->len] = 0;
entry = nsslowcert_ReadDBSMimeEntry(certHandle,tmp_name);
if (entry) {
SECItem emailKey;
emailKey.data = (unsigned char *)tmp_name;
emailKey.len = PORT_Strlen(tmp_name)+1;
emailKey.type = 0;
lg_addHandle(handles,
lg_mkHandle(sdb,&emailKey,LG_TOKEN_TYPE_SMIME));
nsslowcert_DestroyDBEntry((certDBEntry *)entry);
}
PORT_Free(tmp_name);
} else {
/* traverse */
lgEntryData smimeData;
/* traverse */
smimeData.sdb = sdb;
smimeData.searchHandles = handles;
smimeData.template = pTemplate;
smimeData.templ_count = ulCount;
nsslowcert_TraverseDBEntries(certHandle, certDBEntryTypeSMimeProfile,
lg_smime_collect, (void *)&smimeData);
}
return;
}
static CK_RV
lg_searchTokenList(SDB *sdb, SDBFind *search,
const CK_ATTRIBUTE *pTemplate, CK_LONG ulCount)
{
int i;
PRBool isKrl = PR_FALSE;
SECItem derCert = { siBuffer, NULL, 0 };
SECItem derSubject = { siBuffer, NULL, 0 };
SECItem name = { siBuffer, NULL, 0 };
SECItem email = { siBuffer, NULL, 0 };
SECItem key_id = { siBuffer, NULL, 0 };
SECItem cert_sha1_hash = { siBuffer, NULL, 0 };
SECItem cert_md5_hash = { siBuffer, NULL, 0 };
NSSLOWCERTIssuerAndSN issuerSN = {
{ siBuffer, NULL, 0 },
{ siBuffer, NULL, 0 }
};
SECItem *copy = NULL;
CK_CERTIFICATE_TYPE certType;
CK_OBJECT_CLASS objectClass;
CK_RV crv;
unsigned long classFlags =
LG_CERT|LG_TRUST|LG_PRIVATE|LG_PUBLIC|LG_KEY|LG_SMIME|LG_CRL;
if (lg_getCertDB(sdb) == NULL) {
classFlags = LG_PRIVATE|LG_KEY;
} else {
classFlags = LG_CERT|LG_TRUST|LG_PUBLIC|LG_SMIME|LG_CRL;
}
/*
* look for things to search on token objects for. If the right options
* are specified, we can use them as direct indeces into the database
* (rather than using linear searches. We can also use the attributes to
* limit the kinds of objects we are searching for. Later we can use this
* array to filter the remaining objects more finely.
*/
for (i=0 ;classFlags && i < (int)ulCount; i++) {
switch (pTemplate[i].type) {
case CKA_SUBJECT:
copy = &derSubject;
classFlags &= (LG_CERT|LG_PRIVATE|LG_PUBLIC|LG_SMIME|LG_CRL);
break;
case CKA_ISSUER:
copy = &issuerSN.derIssuer;
classFlags &= (LG_CERT|LG_TRUST);
break;
case CKA_SERIAL_NUMBER:
copy = &issuerSN.serialNumber;
classFlags &= (LG_CERT|LG_TRUST);
break;
case CKA_VALUE:
copy = &derCert;
classFlags &= (LG_CERT|LG_CRL|LG_SMIME);
break;
case CKA_LABEL:
copy = &name;
break;
case CKA_NETSCAPE_EMAIL:
copy = &email;
classFlags &= LG_SMIME|LG_CERT;
break;
case CKA_NETSCAPE_SMIME_TIMESTAMP:
classFlags &= LG_SMIME;
break;
case CKA_CLASS:
crv = lg_GetULongAttribute(CKA_CLASS,&pTemplate[i],1, &objectClass);
if (crv != CKR_OK) {
classFlags = 0;
break;;
}
switch (objectClass) {
case CKO_CERTIFICATE:
classFlags &= LG_CERT;
break;
case CKO_NETSCAPE_TRUST:
classFlags &= LG_TRUST;
break;
case CKO_NETSCAPE_CRL:
classFlags &= LG_CRL;
break;
case CKO_NETSCAPE_SMIME:
classFlags &= LG_SMIME;
break;
case CKO_PRIVATE_KEY:
classFlags &= LG_PRIVATE;
break;
case CKO_PUBLIC_KEY:
classFlags &= LG_PUBLIC;
break;
case CKO_SECRET_KEY:
classFlags &= LG_KEY;
break;
default:
classFlags = 0;
break;
}
break;
case CKA_PRIVATE:
if (pTemplate[i].ulValueLen != sizeof(CK_BBOOL)) {
classFlags = 0;
}
if (*((CK_BBOOL *)pTemplate[i].pValue) == CK_TRUE) {
classFlags &= (LG_PRIVATE|LG_KEY);
} else {
classFlags &= ~(LG_PRIVATE|LG_KEY);
}
break;
case CKA_SENSITIVE:
if (pTemplate[i].ulValueLen != sizeof(CK_BBOOL)) {
classFlags = 0;
}
if (*((CK_BBOOL *)pTemplate[i].pValue) == CK_TRUE) {
classFlags &= (LG_PRIVATE|LG_KEY);
} else {
classFlags = 0;
}
break;
case CKA_TOKEN:
if (pTemplate[i].ulValueLen != sizeof(CK_BBOOL)) {
classFlags = 0;
}
if (*((CK_BBOOL *)pTemplate[i].pValue) != CK_TRUE) {
classFlags = 0;
}
break;
case CKA_CERT_SHA1_HASH:
classFlags &= LG_TRUST;
copy = &cert_sha1_hash; break;
case CKA_CERT_MD5_HASH:
classFlags &= LG_TRUST;
copy = &cert_md5_hash; break;
case CKA_CERTIFICATE_TYPE:
crv = lg_GetULongAttribute(CKA_CLASS,&pTemplate[i],1,&certType);
if (crv != CKR_OK) {
classFlags = 0;
}
classFlags &= LG_CERT;
if (certType != CKC_X_509) {
classFlags = 0;
}
break;
case CKA_ID:
copy = &key_id;
classFlags &= (LG_CERT|LG_PRIVATE|LG_KEY|LG_PUBLIC);
break;
case CKA_NETSCAPE_KRL:
if (pTemplate[i].ulValueLen != sizeof(CK_BBOOL)) {
classFlags = 0;
}
classFlags &= LG_CRL;
isKrl = (PRBool)(*((CK_BBOOL *)pTemplate[i].pValue) == CK_TRUE);
break;
case CKA_MODIFIABLE:
break;
case CKA_KEY_TYPE:
case CKA_DERIVE:
classFlags &= LG_PUBLIC|LG_PRIVATE|LG_KEY;
break;
case CKA_VERIFY_RECOVER:
classFlags &= LG_PUBLIC;
break;
case CKA_SIGN_RECOVER:
classFlags &= LG_PRIVATE;
break;
case CKA_ENCRYPT:
case CKA_VERIFY:
case CKA_WRAP:
classFlags &= LG_PUBLIC|LG_KEY;
break;
case CKA_DECRYPT:
case CKA_SIGN:
case CKA_UNWRAP:
case CKA_ALWAYS_SENSITIVE:
case CKA_EXTRACTABLE:
case CKA_NEVER_EXTRACTABLE:
classFlags &= LG_PRIVATE|LG_KEY;
break;
/* can't be a certificate if it doesn't match one of the above
* attributes */
default:
classFlags = 0;
break;
}
if (copy) {
copy->data = (unsigned char*)pTemplate[i].pValue;
copy->len = pTemplate[i].ulValueLen;
}
copy = NULL;
}
/* certs */
if (classFlags & (LG_CERT|LG_TRUST)) {
lg_searchCertsAndTrust(sdb,&derCert,&name,&derSubject,
&issuerSN, &email,classFlags,search,
pTemplate, ulCount);
}
/* keys */
if (classFlags & (LG_PRIVATE|LG_PUBLIC|LG_KEY)) {
PRBool mustStrict = ((classFlags & LG_KEY) != 0) && (name.len != 0);
lg_searchKeys(sdb, &key_id, classFlags, search,
mustStrict, pTemplate, ulCount);
}
/* crl's */
if (classFlags & LG_CRL) {
lg_searchCrls(sdb, &derSubject, isKrl, classFlags, search,
pTemplate, ulCount);
}
/* Add S/MIME entry stuff */
if (classFlags & LG_SMIME) {
lg_searchSMime(sdb, &email, search, pTemplate, ulCount);
}
return CKR_OK;
}
/* lg_FindObjectsInit initializes a search for token and session objects
* that match a template. */
CK_RV lg_FindObjectsInit(SDB *sdb, const CK_ATTRIBUTE *pTemplate,
CK_ULONG ulCount, SDBFind **retSearch)
{
SDBFind *search;
CK_RV crv = CKR_OK;
*retSearch = NULL;
search = (SDBFind *)PORT_Alloc(sizeof(SDBFind));
if (search == NULL) {
crv = CKR_HOST_MEMORY;
goto loser;
}
search->handles = (CK_OBJECT_HANDLE *)
PORT_Alloc(sizeof(CK_OBJECT_HANDLE) * LG_SEARCH_BLOCK_SIZE);
if (search->handles == NULL) {
crv = CKR_HOST_MEMORY;
goto loser;
}
search->index = 0;
search->size = 0;
search->array_size = LG_SEARCH_BLOCK_SIZE;
/* FIXME - do we still need to get Login state? */
crv = lg_searchTokenList(sdb, search, pTemplate, ulCount);
if (crv != CKR_OK) {
goto loser;
}
*retSearch = search;
return CKR_OK;
loser:
if (search) {
lg_FreeSearch(search);
}
return crv;
}
/* lg_FindObjects continues a search for token and session objects
* that match a template, obtaining additional object handles. */
CK_RV lg_FindObjects(SDB *sdb, SDBFind *search,
CK_OBJECT_HANDLE *phObject,CK_ULONG ulMaxObjectCount,
CK_ULONG *pulObjectCount)
{
int transfer;
int left;
*pulObjectCount = 0;
left = search->size - search->index;
transfer = ((int)ulMaxObjectCount > left) ? left : ulMaxObjectCount;
if (transfer > 0) {
PORT_Memcpy(phObject,&search->handles[search->index],
transfer*sizeof(CK_OBJECT_HANDLE_PTR));
} else {
*phObject = CK_INVALID_HANDLE;
}
search->index += transfer;
*pulObjectCount = transfer;
return CKR_OK;
}
/* lg_FindObjectsFinal finishes a search for token and session objects. */
CK_RV lg_FindObjectsFinal(SDB* lgdb, SDBFind *search)
{
if (search != NULL) {
lg_FreeSearch(search);
}
return CKR_OK;
}

View File

@@ -1,644 +0,0 @@
/*
* NSS utility functions
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: lginit.c,v 1.1.2.1 2007-04-03 22:50:02 rrelyea%redhat.com Exp $ */
#include "lowkeyi.h"
#include "pcert.h"
#include "keydbi.h"
#include "lgdb.h"
typedef struct LGPrivateStr {
NSSLOWCERTCertDBHandle *certDB;
NSSLOWKEYDBHandle *keyDB;
PRLock *dbLock;
PLHashTable *hashTable;
} LGPrivate;
static char *
lg_certdb_name_cb(void *arg, int dbVersion)
{
const char *configdir = (const char *)arg;
const char *dbver;
char *smpname = NULL;
char *dbname = NULL;
switch (dbVersion) {
case 8:
dbver = "8";
break;
case 7:
dbver = "7";
break;
case 6:
dbver = "6";
break;
case 5:
dbver = "5";
break;
case 4:
default:
dbver = "";
break;
}
/* make sure we return something allocated with PORT_ so we have properly
* matched frees at the end */
smpname = PR_smprintf(CERT_DB_FMT, configdir, dbver);
if (smpname) {
dbname = PORT_Strdup(smpname);
PR_smprintf_free(smpname);
}
return dbname;
}
static char *
lg_keydb_name_cb(void *arg, int dbVersion)
{
const char *configdir = (const char *)arg;
const char *dbver;
char *smpname = NULL;
char *dbname = NULL;
switch (dbVersion) {
case 4:
dbver = "4";
break;
case 3:
dbver = "3";
break;
case 1:
dbver = "1";
break;
case 2:
default:
dbver = "";
break;
}
smpname = PR_smprintf(KEY_DB_FMT, configdir, dbver);
if (smpname) {
dbname = PORT_Strdup(smpname);
PR_smprintf_free(smpname);
}
return dbname;
}
const char *
lg_EvaluateConfigDir(const char *configdir,char **appName)
{
if (PORT_Strncmp(configdir, MULTIACCESS, sizeof(MULTIACCESS)-1) == 0) {
char *cdir;
*appName = PORT_Strdup(configdir+sizeof(MULTIACCESS)-1);
if (*appName == NULL) {
return configdir;
}
cdir = *appName;
while (*cdir && *cdir != ':') {
cdir++;
}
if (*cdir == ':') {
*cdir = 0;
cdir++;
}
configdir = cdir;
}
return configdir;
}
static int rdbmapflags(int flags);
static rdbfunc lg_rdbfunc = NULL;
static rdbstatusfunc lg_rdbstatusfunc = NULL;
/* NOTE: SHLIB_SUFFIX is defined on the command line */
#define RDBLIB SHLIB_PREFIX"rdb."SHLIB_SUFFIX
DB * rdbopen(const char *appName, const char *prefix,
const char *type, int flags, int *status)
{
PRLibrary *lib;
DB *db;
if (lg_rdbfunc) {
db = (*lg_rdbfunc)(appName,prefix,type,rdbmapflags(flags));
if (!db && status && lg_rdbstatusfunc) {
*status = (*lg_rdbstatusfunc)();
}
return db;
}
/*
* try to open the library.
*/
lib = PR_LoadLibrary(RDBLIB);
if (!lib) {
return NULL;
}
/* get the entry points */
lg_rdbstatusfunc = (rdbstatusfunc) PR_FindSymbol(lib,"rdbstatus");
lg_rdbfunc = (rdbfunc) PR_FindSymbol(lib,"rdbopen");
if (lg_rdbfunc) {
db = (*lg_rdbfunc)(appName,prefix,type,rdbmapflags(flags));
if (!db && status && lg_rdbstatusfunc) {
*status = (*lg_rdbstatusfunc)();
}
return db;
}
/* couldn't find the entry point, unload the library and fail */
PR_UnloadLibrary(lib);
return NULL;
}
/*
* the following data structures are from rdb.h.
*/
struct RDBStr {
DB db;
int (*xactstart)(DB *db);
int (*xactdone)(DB *db, PRBool abort);
int version;
int (*dbinitcomplete)(DB *db);
};
#define DB_RDB ((DBTYPE) 0xff)
#define RDB_RDONLY 1
#define RDB_RDWR 2
#define RDB_CREATE 4
static int
rdbmapflags(int flags) {
switch (flags) {
case NO_RDONLY:
return RDB_RDONLY;
case NO_RDWR:
return RDB_RDWR;
case NO_CREATE:
return RDB_CREATE;
default:
break;
}
return 0;
}
PRBool
db_IsRDB(DB *db)
{
return (PRBool) db->type == DB_RDB;
}
int
db_BeginTransaction(DB *db)
{
struct RDBStr *rdb = (struct RDBStr *)db;
if (db->type != DB_RDB) {
return 0;
}
return rdb->xactstart(db);
}
int
db_FinishTransaction(DB *db, PRBool abort)
{
struct RDBStr *rdb = (struct RDBStr *)db;
if (db->type != DB_RDB) {
return 0;
}
return rdb->xactdone(db, abort);
}
static DB *
lg_getRawDB(SDB *sdb)
{
NSSLOWCERTCertDBHandle *certDB;
NSSLOWKEYDBHandle *keyDB;
certDB = lg_getCertDB(sdb);
if (certDB) {
return certDB->permCertDB;
}
keyDB = lg_getKeyDB(sdb);
if (keyDB) {
return keyDB->db;
}
return NULL;
}
CK_RV
lg_Begin(SDB *sdb)
{
DB *db = lg_getRawDB(sdb);
int ret;
if (db == NULL) {
return CKR_GENERAL_ERROR; /* shouldn't happen */
}
ret = db_BeginTransaction(db);
if (ret != 0) {
return CKR_GENERAL_ERROR; /* could happen */
}
return CKR_OK;
}
CK_RV
lg_Commit(SDB *sdb)
{
DB *db = lg_getRawDB(sdb);
int ret;
if (db == NULL) {
return CKR_GENERAL_ERROR; /* shouldn't happen */
}
ret = db_FinishTransaction(db, PR_FALSE);
if (ret != 0) {
return CKR_GENERAL_ERROR; /* could happen */
}
return CKR_OK;
}
CK_RV
lg_Abort(SDB *sdb)
{
DB *db = lg_getRawDB(sdb);
int ret;
if (db == NULL) {
return CKR_GENERAL_ERROR; /* shouldn't happen */
}
ret = db_FinishTransaction(db, PR_TRUE);
if (ret != 0) {
return CKR_GENERAL_ERROR; /* could happen */
}
return CKR_OK;
}
int
db_InitComplete(DB *db)
{
struct RDBStr *rdb = (struct RDBStr *)db;
if (db->type != DB_RDB) {
return 0;
}
/* we should have added a version number to the RDBS structure. Since we
* didn't, we detect that we have and 'extended' structure if the rdbstatus
* func exists */
if (!lg_rdbstatusfunc) {
return 0;
}
return rdb->dbinitcomplete(db);
}
SECStatus
db_Copy(DB *dest,DB *src)
{
int ret;
DBT key,data;
ret = (*src->seq)(src, &key, &data, R_FIRST);
if (ret) {
return SECSuccess;
}
do {
(void)(*dest->put)(dest,&key,&data, R_NOOVERWRITE);
} while ( (*src->seq)(src, &key, &data, R_NEXT) == 0);
(void)(*dest->sync)(dest,0);
return SECSuccess;
}
static CK_RV
lg_OpenCertDB(const char * configdir, const char *prefix, PRBool readOnly,
NSSLOWCERTCertDBHandle **certdbPtr)
{
NSSLOWCERTCertDBHandle *certdb = NULL;
CK_RV crv = CKR_NETSCAPE_CERTDB_FAILED;
SECStatus rv;
char * name = NULL;
char * appName = NULL;
if (prefix == NULL) {
prefix = "";
}
configdir = lg_EvaluateConfigDir(configdir, &appName);
name = PR_smprintf("%s" PATH_SEPARATOR "%s",configdir,prefix);
if (name == NULL) goto loser;
certdb = (NSSLOWCERTCertDBHandle*)PORT_ZAlloc(sizeof(NSSLOWCERTCertDBHandle));
if (certdb == NULL)
goto loser;
certdb->ref = 1;
/* fix when we get the DB in */
rv = nsslowcert_OpenCertDB(certdb, readOnly, appName, prefix,
lg_certdb_name_cb, (void *)name, PR_FALSE);
if (rv == SECSuccess) {
crv = CKR_OK;
*certdbPtr = certdb;
certdb = NULL;
}
loser:
if (certdb) PR_Free(certdb);
if (name) PR_smprintf_free(name);
if (appName) PORT_Free(appName);
return crv;
}
static CK_RV
lg_OpenKeyDB(const char * configdir, const char *prefix, PRBool readOnly,
NSSLOWKEYDBHandle **keydbPtr)
{
NSSLOWKEYDBHandle *keydb;
char * name = NULL;
char * appName = NULL;
if (prefix == NULL) {
prefix = "";
}
configdir = lg_EvaluateConfigDir(configdir, &appName);
name = PR_smprintf("%s" PATH_SEPARATOR "%s",configdir,prefix);
if (name == NULL)
return CKR_HOST_MEMORY;
keydb = nsslowkey_OpenKeyDB(readOnly, appName, prefix,
lg_keydb_name_cb, (void *)name);
PR_smprintf_free(name);
if (appName) PORT_Free(appName);
if (keydb == NULL)
return CKR_NETSCAPE_KEYDB_FAILED;
*keydbPtr = keydb;
return CKR_OK;
}
/*
* Accessors for the private parts of the sdb structure.
*/
void
lg_DBLock(SDB *sdb)
{
LGPrivate *lgdb_p = (LGPrivate *)sdb->private;
PR_Lock(lgdb_p->dbLock);
}
void
lg_DBUnlock(SDB *sdb)
{
LGPrivate *lgdb_p = (LGPrivate *)sdb->private;
PR_Unlock(lgdb_p->dbLock);
}
PLHashTable *
lg_GetHashTable(SDB *sdb)
{
LGPrivate *lgdb_p = (LGPrivate *)sdb->private;
return lgdb_p->hashTable;
}
NSSLOWCERTCertDBHandle *
lg_getCertDB(SDB *sdb)
{
LGPrivate *lgdb_p = (LGPrivate *)sdb->private;
return lgdb_p->certDB;
}
NSSLOWKEYDBHandle *
lg_getKeyDB(SDB *sdb)
{
LGPrivate *lgdb_p = (LGPrivate *)sdb->private;
return lgdb_p->keyDB;
}
CK_RV
lg_Close(SDB *sdb)
{
LGPrivate *lgdb_p = (LGPrivate *)sdb->private;
if (lgdb_p) {
if (lgdb_p->certDB) {
nsslowcert_ClosePermCertDB(lgdb_p->certDB);
} else if (lgdb_p->keyDB) {
nsslowkey_CloseKeyDB(lgdb_p->keyDB);
}
if (lgdb_p->dbLock) {
PR_DestroyLock(lgdb_p->dbLock);
}
if (lgdb_p->hashTable) {
PL_HashTableDestroy(lgdb_p->hashTable);
}
PORT_Free(lgdb_p);
}
PORT_Free(sdb);
return CKR_OK;
}
static PLHashNumber
lg_HashNumber(const void *key)
{
return (PLHashNumber) key;
}
/*
* helper function to wrap a NSSLOWCERTCertDBHandle or a NSSLOWKEYDBHandle
* with and sdb structure.
*/
CK_RV
lg_init(SDB **pSdb, int flags, NSSLOWCERTCertDBHandle *certdbPtr,
NSSLOWKEYDBHandle *keydbPtr)
{
SDB *sdb = NULL;
LGPrivate *lgdb_p = NULL;
CK_RV error = CKR_HOST_MEMORY;
*pSdb = NULL;
sdb = (SDB *) PORT_Alloc(sizeof(SDB));
if (sdb == NULL) {
goto loser;
}
lgdb_p = (LGPrivate *) PORT_Alloc(sizeof(LGPrivate));
if (lgdb_p == NULL) {
goto loser;
}
/* invariant fields */
lgdb_p->certDB = certdbPtr;
lgdb_p->keyDB = keydbPtr;
lgdb_p->dbLock = PR_NewLock();
if (lgdb_p->dbLock == NULL) {
goto loser;
}
lgdb_p->hashTable = PL_NewHashTable(64, lg_HashNumber, PL_CompareValues,
SECITEM_HashCompare, NULL, 0);
if (lgdb_p->hashTable == NULL) {
goto loser;
}
sdb->sdb_type = SDB_LEGACY;
sdb->sdb_flags = flags;
sdb->private = lgdb_p;
sdb->sdb_FindObjectsInit = lg_FindObjectsInit;
sdb->sdb_FindObjects = lg_FindObjects;
sdb->sdb_FindObjectsFinal = lg_FindObjectsFinal;
sdb->sdb_GetAttributeValue = lg_GetAttributeValue;
sdb->sdb_SetAttributeValue = lg_SetAttributeValue;
sdb->sdb_CreateObject = lg_CreateObject;
sdb->sdb_DestroyObject = lg_DestroyObject;
sdb->sdb_GetPWEntry = lg_GetPWEntry;
sdb->sdb_PutPWEntry = lg_PutPWEntry;
sdb->sdb_Begin = lg_Begin;
sdb->sdb_Commit = lg_Commit;
sdb->sdb_Abort = lg_Abort;
sdb->sdb_Close = lg_Reset;
sdb->sdb_Close = lg_Close;
*pSdb = sdb;
return CKR_OK;
loser:
if (sdb) {
PORT_Free(sdb);
}
if (lgdb_p) {
if (lgdb_p->dbLock) {
PR_DestroyLock(lgdb_p->dbLock);
}
if (lgdb_p->hashTable) {
PL_HashTableDestroy(lgdb_p->hashTable);
}
PORT_Free(lgdb_p);
}
return error;
}
extern SECStatus secoid_Init(void); /* util *REALLY* needs
* to be a shared library */
/*
* OK there are now lots of options here, lets go through them all:
*
* configdir - base directory where all the cert, key, and module datbases live.
* certPrefix - prefix added to the beginning of the cert database example: "
* "https-server1-"
* keyPrefix - prefix added to the beginning of the key database example: "
* "https-server1-"
* secmodName - name of the security module database (usually "secmod.db").
* readOnly - Boolean: true if the databases are to be openned read only.
* nocertdb - Don't open the cert DB and key DB's, just initialize the
* Volatile certdb.
* nomoddb - Don't open the security module DB, just initialize the
* PKCS #11 module.
* forceOpen - Continue to force initializations even if the databases cannot
* be opened.
*/
CK_RV
legacy_Open(const char *configdir, const char *certPrefix,
const char *keyPrefix, int certVersion, int keyVersion,
int flags, SDB **certDB, SDB **keyDB)
{
CK_RV crv = CKR_OK;
PRBool readOnly = (flags == SDB_RDONLY)? PR_TRUE: PR_FALSE;
secoid_Init();
nsslowcert_InitLocks();
if (keyDB) *keyDB = NULL;
if (certDB) *certDB = NULL;
if (certDB) {
NSSLOWCERTCertDBHandle *certdbPtr;
crv = lg_OpenCertDB(configdir, certPrefix, readOnly, &certdbPtr);
if (crv != CKR_OK) {
goto loser;
}
crv = lg_init(certDB, flags, certdbPtr, NULL);
if (crv != CKR_OK) {
nsslowcert_ClosePermCertDB(certdbPtr);
goto loser;
}
}
if (keyDB) {
NSSLOWKEYDBHandle *keydbPtr;
crv = lg_OpenKeyDB(configdir, keyPrefix, readOnly, &keydbPtr);
if (crv != CKR_OK) {
goto loser;
}
crv = lg_init(keyDB, flags, NULL, keydbPtr);
if (crv != CKR_OK) {
nsslowkey_CloseKeyDB(keydbPtr);
goto loser;
}
if (certDB && *certDB) {
LGPrivate *lgdb_p = (LGPrivate *)(*certDB)->private;
lgdb_p->keyDB = keydbPtr;
}
}
loser:
if (crv != CKR_OK) {
if (keyDB && *keyDB) {
lg_Close(*keyDB);
*keyDB = NULL;
}
if (certDB && *certDB) {
lg_Close(*certDB);
*certDB = NULL;
}
}
return crv;
}
CK_RV
legacy_Shutdown(void)
{
nsslowcert_DestroyFreeLists();
nsslowcert_DestroyGlobalLocks();
}

View File

@@ -1,424 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "lgdb.h"
#include "secerr.h"
#include "lgglue.h"
/*
* ******************** Attribute Utilities *******************************
*/
/*
* look up and attribute structure from a type and Object structure.
* The returned attribute is referenced and needs to be freed when
* it is no longer needed.
*/
const CK_ATTRIBUTE *
lg_FindAttribute(CK_ATTRIBUTE_TYPE type, const CK_ATTRIBUTE *templ,
CK_ULONG count )
{
int i;
for (i=0; i < count; i++) {
if (templ[i].type == type) {
return &templ[i];
}
}
return NULL;
}
/*
* return true if object has attribute
*/
PRBool
lg_hasAttribute(CK_ATTRIBUTE_TYPE type, const CK_ATTRIBUTE *templ,
CK_ULONG count )
{
if (lg_FindAttribute(type, templ, count) == NULL) {
return PR_FALSE;
}
return PR_TRUE;
}
/*
* copy an attribute into a SECItem. Secitem is allocated in the specified
* arena.
*/
CK_RV
lg_Attribute2SecItem(PLArenaPool *arena, CK_ATTRIBUTE_TYPE type,
const CK_ATTRIBUTE *templ, CK_ULONG count,
SECItem *item)
{
int len;
const CK_ATTRIBUTE *attribute;
attribute = lg_FindAttribute(type, templ, count);
if (attribute == NULL) return CKR_TEMPLATE_INCOMPLETE;
len = attribute->ulValueLen;
if (arena) {
item->data = (unsigned char *) PORT_ArenaAlloc(arena,len);
} else {
item->data = (unsigned char *) PORT_Alloc(len);
}
if (item->data == NULL) {
return CKR_HOST_MEMORY;
}
item->len = len;
PORT_Memcpy(item->data, attribute->pValue, len);
return CKR_OK;
}
/*
* copy an unsigned attribute into a SECItem. Secitem is allocated in
* the specified arena.
*/
CK_RV
lg_Attribute2SSecItem(PLArenaPool *arena, CK_ATTRIBUTE_TYPE type,
const CK_ATTRIBUTE *templ, CK_ULONG count,
SECItem *item)
{
const CK_ATTRIBUTE *attribute;
item->data = NULL;
attribute = lg_FindAttribute(type, templ, count);
if (attribute == NULL) return CKR_TEMPLATE_INCOMPLETE;
(void)SECITEM_AllocItem(arena, item, attribute->ulValueLen);
if (item->data == NULL) {
return CKR_HOST_MEMORY;
}
PORT_Memcpy(item->data, attribute->pValue, item->len);
return CKR_OK;
}
/*
* copy an unsigned attribute into a SECItem. Secitem is allocated in
* the specified arena.
*/
CK_RV
lg_PrivAttr2SSecItem(PLArenaPool *arena, CK_ATTRIBUTE_TYPE type,
const CK_ATTRIBUTE *templ, CK_ULONG count,
SECItem *item, SDB *sdbpw)
{
const CK_ATTRIBUTE *attribute;
SECItem epki, *dest = NULL;
SECStatus rv;
item->data = NULL;
attribute = lg_FindAttribute(type, templ, count);
if (attribute == NULL) return CKR_TEMPLATE_INCOMPLETE;
epki.data = attribute->pValue;
epki.len = attribute->ulValueLen;
rv = lg_util_decrypt(sdbpw, &epki, &dest);
if (rv != SECSuccess) {
return CKR_USER_NOT_LOGGED_IN;
}
(void)SECITEM_AllocItem(arena, item, dest->len);
if (item->data == NULL) {
SECITEM_FreeItem(dest, PR_TRUE);
return CKR_HOST_MEMORY;
}
PORT_Memcpy(item->data, dest->data, item->len);
SECITEM_FreeItem(dest, PR_TRUE);
return CKR_OK;
}
CK_RV
lg_PrivAttr2SecItem(PLArenaPool *arena, CK_ATTRIBUTE_TYPE type,
const CK_ATTRIBUTE *templ, CK_ULONG count,
SECItem *item, SDB *sdbpw)
{
return lg_PrivAttr2SSecItem(arena, type, templ, count, item, sdbpw);
}
/*
* this is only valid for CK_BBOOL type attributes. Return the state
* of that attribute.
*/
PRBool
lg_isTrue(CK_ATTRIBUTE_TYPE type, const CK_ATTRIBUTE *templ, CK_ULONG count)
{
const CK_ATTRIBUTE *attribute;
PRBool tok = PR_FALSE;
attribute=lg_FindAttribute(type, templ, count);
if (attribute == NULL) { return PR_FALSE; }
tok = (PRBool)(*(CK_BBOOL *)attribute->pValue);
return tok;
}
/*
* return a null terminated string from attribute 'type'. This string
* is allocated and needs to be freed with PORT_Free() When complete.
*/
char *
lg_getString(CK_ATTRIBUTE_TYPE type, const CK_ATTRIBUTE *templ, CK_ULONG count)
{
const CK_ATTRIBUTE *attribute;
char *label = NULL;
attribute = lg_FindAttribute(type, templ, count);
if (attribute == NULL) return NULL;
if (attribute->pValue != NULL) {
label = (char *) PORT_Alloc(attribute->ulValueLen+1);
if (label == NULL) {
return NULL;
}
PORT_Memcpy(label,attribute->pValue, attribute->ulValueLen);
label[attribute->ulValueLen] = 0;
}
return label;
}
CK_RV
lg_GetULongAttribute(CK_ATTRIBUTE_TYPE type, const CK_ATTRIBUTE *templ,
CK_ULONG count, CK_ULONG *longData)
{
const CK_ATTRIBUTE *attribute;
CK_ULONG value = 0;
const unsigned char *data;
int i;
attribute = lg_FindAttribute(type, templ, count);
if (attribute == NULL) return CKR_TEMPLATE_INCOMPLETE;
if (attribute->ulValueLen != sizeof(CK_ULONG)) {
return CKR_ATTRIBUTE_VALUE_INVALID;
}
data = (const unsigned char *)attribute->pValue;
for (i=0; i < 4; i++) {
value |= (CK_ULONG)(data[i]) << ((3-i)*8);
}
*longData = value;
return CKR_OK;
}
/*
* ******************** Object Utilities *******************************
*/
SECStatus
lg_deleteTokenKeyByHandle(SDB *sdb, CK_OBJECT_HANDLE handle)
{
SECItem *item;
PRBool rem;
PLHashTable *hashTable= lg_GetHashTable(sdb);
item = (SECItem *)PL_HashTableLookup(hashTable, (void *)handle);
rem = PL_HashTableRemove(hashTable,(void *)handle) ;
if (rem && item) {
SECITEM_FreeItem(item,PR_TRUE);
}
return rem ? SECSuccess : SECFailure;
}
/* must be called holding lg_DBLock(sdb) */
static SECStatus
lg_addTokenKeyByHandle(SDB *sdb, CK_OBJECT_HANDLE handle, SECItem *key)
{
PLHashEntry *entry;
SECItem *item;
PLHashTable *hashTable= lg_GetHashTable(sdb);
item = SECITEM_DupItem(key);
if (item == NULL) {
return SECFailure;
}
entry = PL_HashTableAdd(hashTable,(void *)handle,item);
if (entry == NULL) {
SECITEM_FreeItem(item,PR_TRUE);
return SECFailure;
}
return SECSuccess;
}
/* must be called holding lg_DBLock(sdb) */
const SECItem *
lg_lookupTokenKeyByHandle(SDB *sdb, CK_OBJECT_HANDLE handle)
{
PLHashTable *hashTable= lg_GetHashTable(sdb);
return (const SECItem *)PL_HashTableLookup(hashTable, (void *)handle);
}
static PRIntn
lg_freeHashItem(PLHashEntry* entry, PRIntn index, void *arg)
{
SECItem *item = (SECItem *)entry->value;
SECITEM_FreeItem(item, PR_TRUE);
return HT_ENUMERATE_NEXT;
}
CK_RV
LG_ClearTokenKeyHashTable(SDB *sdb)
{
PLHashTable *hashTable;
lg_DBLock(sdb);
hashTable= lg_GetHashTable(sdb);
PL_HashTableEnumerateEntries(hashTable, lg_freeHashItem, NULL);
lg_DBLock(sdb);
return CKR_OK;
}
/*
* handle Token Object stuff
*/
static void
lg_XORHash(unsigned char *key, unsigned char *dbkey, int len)
{
int i;
PORT_Memset(key, 0, 4);
for (i=0; i < len-4; i += 4) {
key[0] ^= dbkey[i];
key[1] ^= dbkey[i+1];
key[2] ^= dbkey[i+2];
key[3] ^= dbkey[i+3];
}
}
/* Make a token handle for an object and record it so we can find it again */
CK_OBJECT_HANDLE
lg_mkHandle(SDB *sdb, SECItem *dbKey, CK_OBJECT_HANDLE class)
{
unsigned char hashBuf[4];
CK_OBJECT_HANDLE handle;
const SECItem *key;
handle = class;
/* there is only one KRL, use a fixed handle for it */
if (handle != LG_TOKEN_KRL_HANDLE) {
lg_XORHash(hashBuf,dbKey->data,dbKey->len);
handle = (hashBuf[0] << 24) | (hashBuf[1] << 16) |
(hashBuf[2] << 8) | hashBuf[3];
handle = class | (handle & ~(LG_TOKEN_TYPE_MASK|LG_TOKEN_MASK));
/* we have a CRL who's handle has randomly matched the reserved KRL
* handle, increment it */
if (handle == LG_TOKEN_KRL_HANDLE) {
handle++;
}
}
lg_DBLock(sdb);
while ((key = lg_lookupTokenKeyByHandle(sdb,handle)) != NULL) {
if (SECITEM_ItemsAreEqual(key,dbKey)) {
lg_DBUnlock(sdb);
return handle;
}
handle++;
}
lg_addTokenKeyByHandle(sdb,handle,dbKey);
lg_DBUnlock(sdb);
return handle;
}
PRBool
lg_poisonHandle(SDB *sdb, SECItem *dbKey, CK_OBJECT_HANDLE class)
{
unsigned char hashBuf[4];
CK_OBJECT_HANDLE handle;
const SECItem *key;
handle = class;
/* there is only one KRL, use a fixed handle for it */
if (handle != LG_TOKEN_KRL_HANDLE) {
lg_XORHash(hashBuf,dbKey->data,dbKey->len);
handle = (hashBuf[0] << 24) | (hashBuf[1] << 16) |
(hashBuf[2] << 8) | hashBuf[3];
handle = class | (handle & ~(LG_TOKEN_TYPE_MASK|LG_TOKEN_MASK));
/* we have a CRL who's handle has randomly matched the reserved KRL
* handle, increment it */
if (handle == LG_TOKEN_KRL_HANDLE) {
handle++;
}
}
lg_DBLock(sdb);
while ((key = lg_lookupTokenKeyByHandle(sdb,handle)) != NULL) {
if (SECITEM_ItemsAreEqual(key,dbKey)) {
key->data[0] ^= 0x80;
lg_DBUnlock(sdb);
return PR_TRUE;
}
handle++;
}
lg_DBUnlock(sdb);
return PR_FALSE;
}
static LGEncryptFunc lg_encrypt_stub = NULL;
static LGDecryptFunc lg_decrypt_stub = NULL;
void
legacy_SetCryptFunctions(LGEncryptFunc enc, LGDecryptFunc dec)
{
lg_encrypt_stub = enc;
lg_decrypt_stub = dec;
}
SECStatus lg_util_encrypt(PLArenaPool *arena, SDB *sdb,
SECItem *plainText, SECItem **cipherText)
{
if (lg_encrypt_stub == NULL) {
PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
return SECFailure;
}
return (*lg_encrypt_stub)(arena, sdb, plainText, cipherText);
}
SECStatus lg_util_decrypt(SDB *sdb, SECItem *cipherText, SECItem **plainText)
{
if (lg_decrypt_stub == NULL) {
PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
return SECFailure;
}
return (*lg_decrypt_stub)(sdb, cipherText, plainText);
}

View File

@@ -1,824 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* Certificate handling code
*
* $Id: lowcert.c,v 1.1.2.2 2007-05-15 21:59:52 rrelyea%redhat.com Exp $
*/
#include "seccomon.h"
#include "secder.h"
#include "nssilock.h"
#include "lowkeyi.h"
#include "secasn1.h"
#include "secoid.h"
#include "secerr.h"
#include "pcert.h"
static const SEC_ASN1Template nsslowcert_SubjectPublicKeyInfoTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(NSSLOWCERTSubjectPublicKeyInfo) },
{ SEC_ASN1_INLINE, offsetof(NSSLOWCERTSubjectPublicKeyInfo,algorithm),
SECOID_AlgorithmIDTemplate },
{ SEC_ASN1_BIT_STRING,
offsetof(NSSLOWCERTSubjectPublicKeyInfo,subjectPublicKey), },
{ 0, }
};
static const SEC_ASN1Template nsslowcert_RSAPublicKeyTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(NSSLOWKEYPublicKey) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPublicKey,u.rsa.modulus), },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPublicKey,u.rsa.publicExponent), },
{ 0, }
};
static const SEC_ASN1Template nsslowcert_DSAPublicKeyTemplate[] = {
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPublicKey,u.dsa.publicValue), },
{ 0, }
};
static const SEC_ASN1Template nsslowcert_DHPublicKeyTemplate[] = {
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPublicKey,u.dh.publicValue), },
{ 0, }
};
/*
* See bugzilla bug 125359
* Since NSS (via PKCS#11) wants to handle big integers as unsigned ints,
* all of the templates above that en/decode into integers must be converted
* from ASN.1's signed integer type. This is done by marking either the
* source or destination (encoding or decoding, respectively) type as
* siUnsignedInteger.
*/
static void
prepare_low_rsa_pub_key_for_asn1(NSSLOWKEYPublicKey *pubk)
{
pubk->u.rsa.modulus.type = siUnsignedInteger;
pubk->u.rsa.publicExponent.type = siUnsignedInteger;
}
static void
prepare_low_dsa_pub_key_for_asn1(NSSLOWKEYPublicKey *pubk)
{
pubk->u.dsa.publicValue.type = siUnsignedInteger;
pubk->u.dsa.params.prime.type = siUnsignedInteger;
pubk->u.dsa.params.subPrime.type = siUnsignedInteger;
pubk->u.dsa.params.base.type = siUnsignedInteger;
}
static void
prepare_low_dh_pub_key_for_asn1(NSSLOWKEYPublicKey *pubk)
{
pubk->u.dh.prime.type = siUnsignedInteger;
pubk->u.dh.base.type = siUnsignedInteger;
pubk->u.dh.publicValue.type = siUnsignedInteger;
}
/*
* simple cert decoder to avoid the cost of asn1 engine
*/
static unsigned char *
nsslowcert_dataStart(unsigned char *buf, unsigned int length,
unsigned int *data_length, PRBool includeTag,
unsigned char* rettag) {
unsigned char tag;
unsigned int used_length= 0;
tag = buf[used_length++];
if (rettag) {
*rettag = tag;
}
/* blow out when we come to the end */
if (tag == 0) {
return NULL;
}
*data_length = buf[used_length++];
if (*data_length&0x80) {
int len_count = *data_length & 0x7f;
*data_length = 0;
while (len_count-- > 0) {
*data_length = (*data_length << 8) | buf[used_length++];
}
}
if (*data_length > (length-used_length) ) {
*data_length = length-used_length;
return NULL;
}
if (includeTag) *data_length += used_length;
return (buf + (includeTag ? 0 : used_length));
}
static void SetTimeType(SECItem* item, unsigned char tagtype)
{
switch (tagtype) {
case SEC_ASN1_UTC_TIME:
item->type = siUTCTime;
break;
case SEC_ASN1_GENERALIZED_TIME:
item->type = siGeneralizedTime;
break;
default:
PORT_Assert(0);
break;
}
}
static int
nsslowcert_GetValidityFields(unsigned char *buf,int buf_length,
SECItem *notBefore, SECItem *notAfter)
{
unsigned char tagtype;
notBefore->data = nsslowcert_dataStart(buf,buf_length,
&notBefore->len,PR_FALSE, &tagtype);
if (notBefore->data == NULL) return SECFailure;
SetTimeType(notBefore, tagtype);
buf_length -= (notBefore->data-buf) + notBefore->len;
buf = notBefore->data + notBefore->len;
notAfter->data = nsslowcert_dataStart(buf,buf_length,
&notAfter->len,PR_FALSE, &tagtype);
if (notAfter->data == NULL) return SECFailure;
SetTimeType(notAfter, tagtype);
return SECSuccess;
}
static int
nsslowcert_GetCertFields(unsigned char *cert,int cert_length,
SECItem *issuer, SECItem *serial, SECItem *derSN, SECItem *subject,
SECItem *valid, SECItem *subjkey, SECItem *extensions)
{
unsigned char *buf;
unsigned int buf_length;
unsigned char *dummy;
unsigned int dummylen;
/* get past the signature wrap */
buf = nsslowcert_dataStart(cert,cert_length,&buf_length,PR_FALSE, NULL);
if (buf == NULL) return SECFailure;
/* get into the raw cert data */
buf = nsslowcert_dataStart(buf,buf_length,&buf_length,PR_FALSE, NULL);
if (buf == NULL) return SECFailure;
/* skip past any optional version number */
if ((buf[0] & 0xa0) == 0xa0) {
dummy = nsslowcert_dataStart(buf,buf_length,&dummylen,PR_FALSE, NULL);
if (dummy == NULL) return SECFailure;
buf_length -= (dummy-buf) + dummylen;
buf = dummy + dummylen;
}
/* serial number */
if (derSN) {
derSN->data=nsslowcert_dataStart(buf,buf_length,&derSN->len,PR_TRUE, NULL);
}
serial->data = nsslowcert_dataStart(buf,buf_length,&serial->len,PR_FALSE, NULL);
if (serial->data == NULL) return SECFailure;
buf_length -= (serial->data-buf) + serial->len;
buf = serial->data + serial->len;
/* skip the OID */
dummy = nsslowcert_dataStart(buf,buf_length,&dummylen,PR_FALSE, NULL);
if (dummy == NULL) return SECFailure;
buf_length -= (dummy-buf) + dummylen;
buf = dummy + dummylen;
/* issuer */
issuer->data = nsslowcert_dataStart(buf,buf_length,&issuer->len,PR_TRUE, NULL);
if (issuer->data == NULL) return SECFailure;
buf_length -= (issuer->data-buf) + issuer->len;
buf = issuer->data + issuer->len;
/* only wanted issuer/SN */
if (valid == NULL) {
return SECSuccess;
}
/* validity */
valid->data = nsslowcert_dataStart(buf,buf_length,&valid->len,PR_FALSE, NULL);
if (valid->data == NULL) return SECFailure;
buf_length -= (valid->data-buf) + valid->len;
buf = valid->data + valid->len;
/*subject */
subject->data=nsslowcert_dataStart(buf,buf_length,&subject->len,PR_TRUE, NULL);
if (subject->data == NULL) return SECFailure;
buf_length -= (subject->data-buf) + subject->len;
buf = subject->data + subject->len;
/* subject key info */
subjkey->data=nsslowcert_dataStart(buf,buf_length,&subjkey->len,PR_TRUE, NULL);
if (subjkey->data == NULL) return SECFailure;
buf_length -= (subjkey->data-buf) + subjkey->len;
buf = subjkey->data + subjkey->len;
extensions->data = NULL;
extensions->len = 0;
while (buf_length > 0) {
/* EXTENSIONS */
if (buf[0] == 0xa3) {
extensions->data = nsslowcert_dataStart(buf,buf_length,
&extensions->len, PR_FALSE, NULL);
break;
}
dummy = nsslowcert_dataStart(buf,buf_length,&dummylen,PR_FALSE,NULL);
if (dummy == NULL) return SECFailure;
buf_length -= (dummy - buf) + dummylen;
buf = dummy + dummylen;
}
return SECSuccess;
}
static SECStatus
nsslowcert_GetCertTimes(NSSLOWCERTCertificate *c, PRTime *notBefore, PRTime *notAfter)
{
int rv;
NSSLOWCERTValidity validity;
rv = nsslowcert_GetValidityFields(c->validity.data,c->validity.len,
&validity.notBefore,&validity.notAfter);
if (rv != SECSuccess) {
return rv;
}
/* convert DER not-before time */
rv = DER_DecodeTimeChoice(notBefore, &validity.notBefore);
if (rv) {
return(SECFailure);
}
/* convert DER not-after time */
rv = DER_DecodeTimeChoice(notAfter, &validity.notAfter);
if (rv) {
return(SECFailure);
}
return(SECSuccess);
}
/*
* is certa newer than certb? If one is expired, pick the other one.
*/
PRBool
nsslowcert_IsNewer(NSSLOWCERTCertificate *certa, NSSLOWCERTCertificate *certb)
{
PRTime notBeforeA, notAfterA, notBeforeB, notAfterB, now;
SECStatus rv;
PRBool newerbefore, newerafter;
rv = nsslowcert_GetCertTimes(certa, &notBeforeA, &notAfterA);
if ( rv != SECSuccess ) {
return(PR_FALSE);
}
rv = nsslowcert_GetCertTimes(certb, &notBeforeB, &notAfterB);
if ( rv != SECSuccess ) {
return(PR_TRUE);
}
newerbefore = PR_FALSE;
if ( LL_CMP(notBeforeA, >, notBeforeB) ) {
newerbefore = PR_TRUE;
}
newerafter = PR_FALSE;
if ( LL_CMP(notAfterA, >, notAfterB) ) {
newerafter = PR_TRUE;
}
if ( newerbefore && newerafter ) {
return(PR_TRUE);
}
if ( ( !newerbefore ) && ( !newerafter ) ) {
return(PR_FALSE);
}
/* get current time */
now = PR_Now();
if ( newerbefore ) {
/* cert A was issued after cert B, but expires sooner */
/* if A is expired, then pick B */
if ( LL_CMP(notAfterA, <, now ) ) {
return(PR_FALSE);
}
return(PR_TRUE);
} else {
/* cert B was issued after cert A, but expires sooner */
/* if B is expired, then pick A */
if ( LL_CMP(notAfterB, <, now ) ) {
return(PR_TRUE);
}
return(PR_FALSE);
}
}
#define SOFT_DEFAULT_CHUNKSIZE 2048
static SECStatus
nsslowcert_KeyFromIssuerAndSN(PRArenaPool *arena,
SECItem *issuer, SECItem *sn, SECItem *key)
{
unsigned int len = sn->len + issuer->len;
if (!arena) {
PORT_SetError(SEC_ERROR_INVALID_ARGS);
goto loser;
}
key->data = (unsigned char*)PORT_ArenaAlloc(arena, len);
if ( !key->data ) {
goto loser;
}
key->len = len;
/* copy the serialNumber */
PORT_Memcpy(key->data, sn->data, sn->len);
/* copy the issuer */
PORT_Memcpy(&key->data[sn->len], issuer->data, issuer->len);
return(SECSuccess);
loser:
return(SECFailure);
}
static SECStatus
nsslowcert_KeyFromIssuerAndSNStatic(unsigned char *space,
int spaceLen, SECItem *issuer, SECItem *sn, SECItem *key)
{
unsigned int len = sn->len + issuer->len;
key->data = pkcs11_allocStaticData(len, space, spaceLen);
if ( !key->data ) {
goto loser;
}
key->len = len;
/* copy the serialNumber */
PORT_Memcpy(key->data, sn->data, sn->len);
/* copy the issuer */
PORT_Memcpy(&key->data[sn->len], issuer->data, issuer->len);
return(SECSuccess);
loser:
return(SECFailure);
}
static char *
nsslowcert_EmailName(SECItem *derDN, char *space, unsigned int len)
{
unsigned char *buf;
unsigned int buf_length;
/* unwrap outer sequence */
buf=nsslowcert_dataStart(derDN->data,derDN->len,&buf_length,PR_FALSE,NULL);
if (buf == NULL) return NULL;
/* Walk each RDN */
while (buf_length > 0) {
unsigned char *rdn;
unsigned int rdn_length;
/* grab next rdn */
rdn=nsslowcert_dataStart(buf, buf_length, &rdn_length, PR_FALSE, NULL);
if (rdn == NULL) { return NULL; }
buf_length -= (rdn - buf) + rdn_length;
buf = rdn+rdn_length;
while (rdn_length > 0) {
unsigned char *ava;
unsigned int ava_length;
unsigned char *oid;
unsigned int oid_length;
unsigned char *name;
unsigned int name_length;
SECItem oidItem;
SECOidTag type;
/* unwrap the ava */
ava=nsslowcert_dataStart(rdn, rdn_length, &ava_length, PR_FALSE,
NULL);
if (ava == NULL) return NULL;
rdn_length -= (ava-rdn)+ava_length;
rdn = ava + ava_length;
oid=nsslowcert_dataStart(ava, ava_length, &oid_length, PR_FALSE,
NULL);
if (oid == NULL) { return NULL; }
ava_length -= (oid-ava)+oid_length;
ava = oid+oid_length;
name=nsslowcert_dataStart(ava, ava_length, &name_length, PR_FALSE,
NULL);
if (oid == NULL) { return NULL; }
ava_length -= (name-ava)+name_length;
ava = name+name_length;
oidItem.data = oid;
oidItem.len = oid_length;
type = SECOID_FindOIDTag(&oidItem);
if ((type == SEC_OID_PKCS9_EMAIL_ADDRESS) ||
(type == SEC_OID_RFC1274_MAIL)) {
/* Email is supposed to be IA5String, so no
* translation necessary */
char *emailAddr;
emailAddr = (char *)pkcs11_copyStaticData(name,name_length+1,
(unsigned char *)space,len);
if (emailAddr) {
emailAddr[name_length] = 0;
}
return emailAddr;
}
}
}
return NULL;
}
static char *
nsslowcert_EmailAltName(NSSLOWCERTCertificate *cert, char *space,
unsigned int len)
{
unsigned char *exts;
unsigned int exts_length;
/* unwrap the sequence */
exts = nsslowcert_dataStart(cert->extensions.data, cert->extensions.len,
&exts_length, PR_FALSE, NULL);
/* loop through extension */
while (exts && exts_length > 0) {
unsigned char * ext;
unsigned int ext_length;
unsigned char *oid;
unsigned int oid_length;
unsigned char *nameList;
unsigned int nameList_length;
SECItem oidItem;
SECOidTag type;
ext = nsslowcert_dataStart(exts, exts_length, &ext_length,
PR_FALSE, NULL);
if (ext == NULL) { break; }
exts_length -= (ext - exts) + ext_length;
exts = ext+ext_length;
oid=nsslowcert_dataStart(ext, ext_length, &oid_length, PR_FALSE, NULL);
if (oid == NULL) { break; }
ext_length -= (oid - ext) + oid_length;
ext = oid+oid_length;
oidItem.data = oid;
oidItem.len = oid_length;
type = SECOID_FindOIDTag(&oidItem);
/* get Alt Extension */
if (type != SEC_OID_X509_SUBJECT_ALT_NAME) {
continue;
}
/* skip passed the critical flag */
if (ext[0] == 0x01) { /* BOOLEAN */
unsigned char *dummy;
unsigned int dummy_length;
dummy = nsslowcert_dataStart(ext, ext_length, &dummy_length,
PR_FALSE, NULL);
if (dummy == NULL) { break; }
ext_length -= (dummy - ext) + dummy_length;
ext = dummy+dummy_length;
}
/* unwrap the name list */
nameList = nsslowcert_dataStart(ext, ext_length, &nameList_length,
PR_FALSE, NULL);
if (nameList == NULL) { break; }
ext_length -= (nameList - ext) + nameList_length;
ext = nameList+nameList_length;
nameList = nsslowcert_dataStart(nameList, nameList_length,
&nameList_length, PR_FALSE, NULL);
/* loop through the name list */
while (nameList && nameList_length > 0) {
unsigned char *thisName;
unsigned int thisName_length;
thisName = nsslowcert_dataStart(nameList, nameList_length,
&thisName_length, PR_FALSE, NULL);
if (thisName == NULL) { break; }
if (nameList[0] == 0xa2) { /* DNS Name */
SECItem dn;
char *emailAddr;
dn.data = thisName;
dn.len = thisName_length;
emailAddr = nsslowcert_EmailName(&dn, space, len);
if (emailAddr) {
return emailAddr;
}
}
if (nameList[0] == 0x81) { /* RFC 822name */
char *emailAddr;
emailAddr = (char *)pkcs11_copyStaticData(thisName,
thisName_length+1, (unsigned char *)space,len);
if (emailAddr) {
emailAddr[thisName_length] = 0;
}
return emailAddr;
}
nameList_length -= (thisName-nameList) + thisName_length;
nameList = thisName + thisName_length;
}
break;
}
return NULL;
}
static char *
nsslowcert_GetCertificateEmailAddress(NSSLOWCERTCertificate *cert)
{
char *emailAddr = NULL;
char *str;
emailAddr = nsslowcert_EmailName(&cert->derSubject,cert->emailAddrSpace,
sizeof(cert->emailAddrSpace));
/* couldn't find the email address in the DN, check the subject Alt name */
if (!emailAddr && cert->extensions.data) {
emailAddr = nsslowcert_EmailAltName(cert, cert->emailAddrSpace,
sizeof(cert->emailAddrSpace));
}
/* make it lower case */
str = emailAddr;
while ( str && *str ) {
*str = tolower( *str );
str++;
}
return emailAddr;
}
/*
* take a DER certificate and decode it into a certificate structure
*/
NSSLOWCERTCertificate *
nsslowcert_DecodeDERCertificate(SECItem *derSignedCert, char *nickname)
{
NSSLOWCERTCertificate *cert;
int rv;
/* allocate the certificate structure */
cert = nsslowcert_CreateCert();
if ( !cert ) {
goto loser;
}
/* point to passed in DER data */
cert->derCert = *derSignedCert;
cert->nickname = NULL;
cert->certKey.data = NULL;
cert->referenceCount = 1;
/* decode the certificate info */
rv = nsslowcert_GetCertFields(cert->derCert.data, cert->derCert.len,
&cert->derIssuer, &cert->serialNumber, &cert->derSN, &cert->derSubject,
&cert->validity, &cert->derSubjKeyInfo, &cert->extensions);
/* cert->subjectKeyID; x509v3 subject key identifier */
cert->subjectKeyID.data = NULL;
cert->subjectKeyID.len = 0;
cert->dbEntry = NULL;
cert ->trust = NULL;
cert ->dbhandle = NULL;
/* generate and save the database key for the cert */
rv = nsslowcert_KeyFromIssuerAndSNStatic(cert->certKeySpace,
sizeof(cert->certKeySpace), &cert->derIssuer,
&cert->serialNumber, &cert->certKey);
if ( rv ) {
goto loser;
}
/* set the nickname */
if ( nickname == NULL ) {
cert->nickname = NULL;
} else {
/* copy and install the nickname */
cert->nickname = pkcs11_copyNickname(nickname,cert->nicknameSpace,
sizeof(cert->nicknameSpace));
}
#ifdef FIXME
/* initialize the subjectKeyID */
rv = cert_GetKeyID(cert);
if ( rv != SECSuccess ) {
goto loser;
}
#endif
/* set the email address */
cert->emailAddr = nsslowcert_GetCertificateEmailAddress(cert);
cert->referenceCount = 1;
return(cert);
loser:
if (cert) {
nsslowcert_DestroyCertificate(cert);
}
return(0);
}
char *
nsslowcert_FixupEmailAddr(char *emailAddr)
{
char *retaddr;
char *str;
if ( emailAddr == NULL ) {
return(NULL);
}
/* copy the string */
str = retaddr = PORT_Strdup(emailAddr);
if ( str == NULL ) {
return(NULL);
}
/* make it lower case */
while ( *str ) {
*str = tolower( *str );
str++;
}
return(retaddr);
}
/*
* Generate a database key, based on serial number and issuer, from a
* DER certificate.
*/
SECStatus
nsslowcert_KeyFromDERCert(PRArenaPool *arena, SECItem *derCert, SECItem *key)
{
int rv;
NSSLOWCERTCertKey certkey;
PORT_Memset(&certkey, 0, sizeof(NSSLOWCERTCertKey));
rv = nsslowcert_GetCertFields(derCert->data, derCert->len,
&certkey.derIssuer, &certkey.serialNumber, NULL, NULL,
NULL, NULL, NULL);
if ( rv ) {
goto loser;
}
return(nsslowcert_KeyFromIssuerAndSN(arena, &certkey.derIssuer,
&certkey.serialNumber, key));
loser:
return(SECFailure);
}
NSSLOWKEYPublicKey *
nsslowcert_ExtractPublicKey(NSSLOWCERTCertificate *cert)
{
NSSLOWCERTSubjectPublicKeyInfo spki;
NSSLOWKEYPublicKey *pubk;
SECItem os;
SECStatus rv;
PRArenaPool *arena;
SECOidTag tag;
SECItem newDerSubjKeyInfo;
arena = PORT_NewArena (DER_DEFAULT_CHUNKSIZE);
if (arena == NULL)
return NULL;
pubk = (NSSLOWKEYPublicKey *)
PORT_ArenaZAlloc(arena, sizeof(NSSLOWKEYPublicKey));
if (pubk == NULL) {
PORT_FreeArena (arena, PR_FALSE);
return NULL;
}
pubk->arena = arena;
PORT_Memset(&spki,0,sizeof(spki));
/* copy the DER into the arena, since Quick DER returns data that points
into the DER input, which may get freed by the caller */
rv = SECITEM_CopyItem(arena, &newDerSubjKeyInfo, &cert->derSubjKeyInfo);
if ( rv != SECSuccess ) {
PORT_FreeArena (arena, PR_FALSE);
return NULL;
}
/* we haven't bothered decoding the spki struct yet, do it now */
rv = SEC_QuickDERDecodeItem(arena, &spki,
nsslowcert_SubjectPublicKeyInfoTemplate, &newDerSubjKeyInfo);
if (rv != SECSuccess) {
PORT_FreeArena (arena, PR_FALSE);
return NULL;
}
/* Convert bit string length from bits to bytes */
os = spki.subjectPublicKey;
DER_ConvertBitString (&os);
tag = SECOID_GetAlgorithmTag(&spki.algorithm);
switch ( tag ) {
case SEC_OID_X500_RSA_ENCRYPTION:
case SEC_OID_PKCS1_RSA_ENCRYPTION:
pubk->keyType = NSSLOWKEYRSAKey;
prepare_low_rsa_pub_key_for_asn1(pubk);
rv = SEC_QuickDERDecodeItem(arena, pubk,
nsslowcert_RSAPublicKeyTemplate, &os);
if (rv == SECSuccess)
return pubk;
break;
case SEC_OID_ANSIX9_DSA_SIGNATURE:
pubk->keyType = NSSLOWKEYDSAKey;
prepare_low_dsa_pub_key_for_asn1(pubk);
rv = SEC_QuickDERDecodeItem(arena, pubk,
nsslowcert_DSAPublicKeyTemplate, &os);
if (rv == SECSuccess) return pubk;
break;
case SEC_OID_X942_DIFFIE_HELMAN_KEY:
pubk->keyType = NSSLOWKEYDHKey;
prepare_low_dh_pub_key_for_asn1(pubk);
rv = SEC_QuickDERDecodeItem(arena, pubk,
nsslowcert_DHPublicKeyTemplate, &os);
if (rv == SECSuccess) return pubk;
break;
#ifdef NSS_ENABLE_ECC
case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
pubk->keyType = NSSLOWKEYECKey;
/* Since PKCS#11 directly takes the DER encoding of EC params
* and public value, we don't need any decoding here.
*/
rv = SECITEM_CopyItem(arena, &pubk->u.ec.ecParams.DEREncoding,
&spki.algorithm.parameters);
if ( rv != SECSuccess )
break;
/* Fill out the rest of the ecParams structure
* based on the encoded params
*/
if (LGEC_FillParams(arena, &pubk->u.ec.ecParams.DEREncoding,
&pubk->u.ec.ecParams) != SECSuccess)
break;
rv = SECITEM_CopyItem(arena, &pubk->u.ec.publicValue, &os);
if (rv == SECSuccess) return pubk;
break;
#endif /* NSS_ENABLE_ECC */
default:
rv = SECFailure;
break;
}
nsslowkey_DestroyPublicKey (pubk);
return NULL;
}

View File

@@ -1,462 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "lowkeyi.h"
#include "secoid.h"
#include "secitem.h"
#include "secder.h"
#include "secasn1.h"
#include "secerr.h"
static const SEC_ASN1Template nsslowkey_AttributeTemplate[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(NSSLOWKEYAttribute) },
{ SEC_ASN1_OBJECT_ID, offsetof(NSSLOWKEYAttribute, attrType) },
{ SEC_ASN1_SET_OF, offsetof(NSSLOWKEYAttribute, attrValue),
SEC_AnyTemplate },
{ 0 }
};
static const SEC_ASN1Template nsslowkey_SetOfAttributeTemplate[] = {
{ SEC_ASN1_SET_OF, 0, nsslowkey_AttributeTemplate },
};
/* ASN1 Templates for new decoder/encoder */
const SEC_ASN1Template nsslowkey_PrivateKeyInfoTemplate[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(NSSLOWKEYPrivateKeyInfo) },
{ SEC_ASN1_INTEGER,
offsetof(NSSLOWKEYPrivateKeyInfo,version) },
{ SEC_ASN1_INLINE,
offsetof(NSSLOWKEYPrivateKeyInfo,algorithm),
SECOID_AlgorithmIDTemplate },
{ SEC_ASN1_OCTET_STRING,
offsetof(NSSLOWKEYPrivateKeyInfo,privateKey) },
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
offsetof(NSSLOWKEYPrivateKeyInfo, attributes),
nsslowkey_SetOfAttributeTemplate },
{ 0 }
};
const SEC_ASN1Template nsslowkey_PQGParamsTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(PQGParams) },
{ SEC_ASN1_INTEGER, offsetof(PQGParams,prime) },
{ SEC_ASN1_INTEGER, offsetof(PQGParams,subPrime) },
{ SEC_ASN1_INTEGER, offsetof(PQGParams,base) },
{ 0, }
};
const SEC_ASN1Template nsslowkey_RSAPrivateKeyTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(NSSLOWKEYPrivateKey) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.version) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.modulus) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.publicExponent) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.privateExponent) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.prime1) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.prime2) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.exponent1) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.exponent2) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.coefficient) },
{ 0 }
};
const SEC_ASN1Template nsslowkey_DSAPrivateKeyTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(NSSLOWKEYPrivateKey) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dsa.publicValue) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dsa.privateValue) },
{ 0, }
};
const SEC_ASN1Template nsslowkey_DSAPrivateKeyExportTemplate[] = {
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dsa.privateValue) },
};
const SEC_ASN1Template nsslowkey_DHPrivateKeyTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(NSSLOWKEYPrivateKey) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dh.publicValue) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dh.privateValue) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dh.base) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dh.prime) },
{ 0, }
};
#ifdef NSS_ENABLE_ECC
/* XXX This is just a placeholder for later when we support
* generic curves and need full-blown support for parsing EC
* parameters. For now, we only support named curves in which
* EC params are simply encoded as an object ID and we don't
* use nsslowkey_ECParamsTemplate.
*/
const SEC_ASN1Template nsslowkey_ECParamsTemplate[] = {
{ SEC_ASN1_CHOICE, offsetof(ECParams,type), NULL, sizeof(ECParams) },
{ SEC_ASN1_OBJECT_ID, offsetof(ECParams,curveOID), NULL, ec_params_named },
{ 0, }
};
/* NOTE: The SECG specification allows the private key structure
* to contain curve parameters but recommends that they be stored
* in the PrivateKeyAlgorithmIdentifier field of the PrivateKeyInfo
* instead.
*/
const SEC_ASN1Template nsslowkey_ECPrivateKeyTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(NSSLOWKEYPrivateKey) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.ec.version) },
{ SEC_ASN1_OCTET_STRING,
offsetof(NSSLOWKEYPrivateKey,u.ec.privateValue) },
/* XXX The following template works for now since we only
* support named curves for which the parameters are
* encoded as an object ID. When we support generic curves,
* we'll need to define nsslowkey_ECParamsTemplate
*/
#if 1
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED |
SEC_ASN1_EXPLICIT | SEC_ASN1_CONTEXT_SPECIFIC | 0,
offsetof(NSSLOWKEYPrivateKey,u.ec.ecParams.curveOID),
SEC_ObjectIDTemplate },
#else
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED |
SEC_ASN1_EXPLICIT | SEC_ASN1_CONTEXT_SPECIFIC | 0,
offsetof(NSSLOWKEYPrivateKey,u.ec.ecParams),
nsslowkey_ECParamsTemplate },
#endif
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED |
SEC_ASN1_EXPLICIT | SEC_ASN1_CONTEXT_SPECIFIC | 1,
offsetof(NSSLOWKEYPrivateKey,u.ec.publicValue),
SEC_BitStringTemplate },
{ 0, }
};
/*
* smaller version of EC_FillParams. In this code, we only need
* oid and DER data.
*/
SECStatus
LGEC_FillParams(PRArenaPool *arena, const SECItem *encodedParams,
ECParams *params)
{
SECOidTag tag;
SECItem oid = { siBuffer, NULL, 0};
#if EC_DEBUG
int i;
printf("Encoded params in EC_DecodeParams: ");
for (i = 0; i < encodedParams->len; i++) {
printf("%02x:", encodedParams->data[i]);
}
printf("\n");
#endif
oid.len = encodedParams->len - 2;
oid.data = encodedParams->data + 2;
if ((encodedParams->data[0] != SEC_ASN1_OBJECT_ID) ||
((tag = SECOID_FindOIDTag(&oid)) == SEC_OID_UNKNOWN)) {
PORT_SetError(SEC_ERROR_UNSUPPORTED_ELLIPTIC_CURVE);
return SECFailure;
}
params->arena = arena;
/* For named curves, fill out curveOID */
params->curveOID.len = oid.len;
params->curveOID.data = (unsigned char *) PORT_ArenaAlloc(arena, oid.len);
if (params->curveOID.data == NULL) {
return SECFailure;
}
memcpy(params->curveOID.data, oid.data, oid.len);
return SECSuccess;
}
/* Copy all of the fields from srcParams into dstParams
*/
SECStatus
LGEC_CopyParams(PRArenaPool *arena, ECParams *dstParams,
const ECParams *srcParams)
{
SECStatus rv = SECFailure;
dstParams->arena = arena;
rv = SECITEM_CopyItem(arena, &dstParams->DEREncoding,
&srcParams->DEREncoding);
if (rv != SECSuccess) {
goto loser;
}
rv =SECITEM_CopyItem(arena, &dstParams->curveOID,
&srcParams->curveOID);
if (rv != SECSuccess) {
goto loser;
}
return SECSuccess;
loser:
return SECFailure;
}
#endif /* NSS_ENABLE_ECC */
/*
* See bugzilla bug 125359
* Since NSS (via PKCS#11) wants to handle big integers as unsigned ints,
* all of the templates above that en/decode into integers must be converted
* from ASN.1's signed integer type. This is done by marking either the
* source or destination (encoding or decoding, respectively) type as
* siUnsignedInteger.
*/
void
prepare_low_rsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key)
{
key->u.rsa.modulus.type = siUnsignedInteger;
key->u.rsa.publicExponent.type = siUnsignedInteger;
key->u.rsa.privateExponent.type = siUnsignedInteger;
key->u.rsa.prime1.type = siUnsignedInteger;
key->u.rsa.prime2.type = siUnsignedInteger;
key->u.rsa.exponent1.type = siUnsignedInteger;
key->u.rsa.exponent2.type = siUnsignedInteger;
key->u.rsa.coefficient.type = siUnsignedInteger;
}
void
prepare_low_pqg_params_for_asn1(PQGParams *params)
{
params->prime.type = siUnsignedInteger;
params->subPrime.type = siUnsignedInteger;
params->base.type = siUnsignedInteger;
}
void
prepare_low_dsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key)
{
key->u.dsa.publicValue.type = siUnsignedInteger;
key->u.dsa.privateValue.type = siUnsignedInteger;
key->u.dsa.params.prime.type = siUnsignedInteger;
key->u.dsa.params.subPrime.type = siUnsignedInteger;
key->u.dsa.params.base.type = siUnsignedInteger;
}
void
prepare_low_dsa_priv_key_export_for_asn1(NSSLOWKEYPrivateKey *key)
{
key->u.dsa.privateValue.type = siUnsignedInteger;
}
void
prepare_low_dh_priv_key_for_asn1(NSSLOWKEYPrivateKey *key)
{
key->u.dh.prime.type = siUnsignedInteger;
key->u.dh.base.type = siUnsignedInteger;
key->u.dh.publicValue.type = siUnsignedInteger;
key->u.dh.privateValue.type = siUnsignedInteger;
}
#ifdef NSS_ENABLE_ECC
void
prepare_low_ecparams_for_asn1(ECParams *params)
{
params->DEREncoding.type = siUnsignedInteger;
params->curveOID.type = siUnsignedInteger;
}
void
prepare_low_ec_priv_key_for_asn1(NSSLOWKEYPrivateKey *key)
{
key->u.ec.version.type = siUnsignedInteger;
key->u.ec.ecParams.DEREncoding.type = siUnsignedInteger;
key->u.ec.ecParams.curveOID.type = siUnsignedInteger;
key->u.ec.privateValue.type = siUnsignedInteger;
key->u.ec.publicValue.type = siUnsignedInteger;
}
#endif /* NSS_ENABLE_ECC */
void
nsslowkey_DestroyPrivateKey(NSSLOWKEYPrivateKey *privk)
{
if (privk && privk->arena) {
PORT_FreeArena(privk->arena, PR_TRUE);
}
}
void
nsslowkey_DestroyPublicKey(NSSLOWKEYPublicKey *pubk)
{
if (pubk && pubk->arena) {
PORT_FreeArena(pubk->arena, PR_FALSE);
}
}
unsigned
nsslowkey_PublicModulusLen(NSSLOWKEYPublicKey *pubk)
{
unsigned char b0;
/* interpret modulus length as key strength... in
* fortezza that's the public key length */
switch (pubk->keyType) {
case NSSLOWKEYRSAKey:
b0 = pubk->u.rsa.modulus.data[0];
return b0 ? pubk->u.rsa.modulus.len : pubk->u.rsa.modulus.len - 1;
default:
break;
}
return 0;
}
unsigned
nsslowkey_PrivateModulusLen(NSSLOWKEYPrivateKey *privk)
{
unsigned char b0;
switch (privk->keyType) {
case NSSLOWKEYRSAKey:
b0 = privk->u.rsa.modulus.data[0];
return b0 ? privk->u.rsa.modulus.len : privk->u.rsa.modulus.len - 1;
default:
break;
}
return 0;
}
NSSLOWKEYPublicKey *
nsslowkey_ConvertToPublicKey(NSSLOWKEYPrivateKey *privk)
{
NSSLOWKEYPublicKey *pubk;
PLArenaPool *arena;
arena = PORT_NewArena (DER_DEFAULT_CHUNKSIZE);
if (arena == NULL) {
PORT_SetError (SEC_ERROR_NO_MEMORY);
return NULL;
}
switch(privk->keyType) {
case NSSLOWKEYRSAKey:
case NSSLOWKEYNullKey:
pubk = (NSSLOWKEYPublicKey *)PORT_ArenaZAlloc(arena,
sizeof (NSSLOWKEYPublicKey));
if (pubk != NULL) {
SECStatus rv;
pubk->arena = arena;
pubk->keyType = privk->keyType;
if (privk->keyType == NSSLOWKEYNullKey) return pubk;
rv = SECITEM_CopyItem(arena, &pubk->u.rsa.modulus,
&privk->u.rsa.modulus);
if (rv == SECSuccess) {
rv = SECITEM_CopyItem (arena, &pubk->u.rsa.publicExponent,
&privk->u.rsa.publicExponent);
if (rv == SECSuccess)
return pubk;
}
} else {
PORT_SetError (SEC_ERROR_NO_MEMORY);
}
break;
case NSSLOWKEYDSAKey:
pubk = (NSSLOWKEYPublicKey *)PORT_ArenaZAlloc(arena,
sizeof(NSSLOWKEYPublicKey));
if (pubk != NULL) {
SECStatus rv;
pubk->arena = arena;
pubk->keyType = privk->keyType;
rv = SECITEM_CopyItem(arena, &pubk->u.dsa.publicValue,
&privk->u.dsa.publicValue);
if (rv != SECSuccess) break;
rv = SECITEM_CopyItem(arena, &pubk->u.dsa.params.prime,
&privk->u.dsa.params.prime);
if (rv != SECSuccess) break;
rv = SECITEM_CopyItem(arena, &pubk->u.dsa.params.subPrime,
&privk->u.dsa.params.subPrime);
if (rv != SECSuccess) break;
rv = SECITEM_CopyItem(arena, &pubk->u.dsa.params.base,
&privk->u.dsa.params.base);
if (rv == SECSuccess) return pubk;
}
break;
case NSSLOWKEYDHKey:
pubk = (NSSLOWKEYPublicKey *)PORT_ArenaZAlloc(arena,
sizeof(NSSLOWKEYPublicKey));
if (pubk != NULL) {
SECStatus rv;
pubk->arena = arena;
pubk->keyType = privk->keyType;
rv = SECITEM_CopyItem(arena, &pubk->u.dh.publicValue,
&privk->u.dh.publicValue);
if (rv != SECSuccess) break;
rv = SECITEM_CopyItem(arena, &pubk->u.dh.prime,
&privk->u.dh.prime);
if (rv != SECSuccess) break;
rv = SECITEM_CopyItem(arena, &pubk->u.dh.base,
&privk->u.dh.base);
if (rv == SECSuccess) return pubk;
}
break;
#ifdef NSS_ENABLE_ECC
case NSSLOWKEYECKey:
pubk = (NSSLOWKEYPublicKey *)PORT_ArenaZAlloc(arena,
sizeof(NSSLOWKEYPublicKey));
if (pubk != NULL) {
SECStatus rv;
pubk->arena = arena;
pubk->keyType = privk->keyType;
rv = SECITEM_CopyItem(arena, &pubk->u.ec.publicValue,
&privk->u.ec.publicValue);
if (rv != SECSuccess) break;
pubk->u.ec.ecParams.arena = arena;
/* Copy the rest of the params */
rv = LGEC_CopyParams(arena, &(pubk->u.ec.ecParams),
&(privk->u.ec.ecParams));
if (rv == SECSuccess) return pubk;
}
break;
#endif /* NSS_ENABLE_ECC */
/* No Fortezza in Low Key implementations (Fortezza keys aren't
* stored in our data base */
default:
break;
}
PORT_FreeArena (arena, PR_FALSE);
return NULL;
}

View File

@@ -1,198 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: lowkeyi.h,v 1.1.2.1 2007-04-03 22:50:02 rrelyea%redhat.com Exp $ */
#ifndef _LOWKEYI_H_
#define _LOWKEYI_H_
#include "prtypes.h"
#include "seccomon.h"
#include "secoidt.h"
#include "pcertt.h"
#include "lowkeyti.h"
#include "sdb.h"
SEC_BEGIN_PROTOS
/*
* See bugzilla bug 125359
* Since NSS (via PKCS#11) wants to handle big integers as unsigned ints,
* all of the templates above that en/decode into integers must be converted
* from ASN.1's signed integer type. This is done by marking either the
* source or destination (encoding or decoding, respectively) type as
* siUnsignedInteger.
*/
extern void prepare_low_rsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key);
extern void prepare_low_pqg_params_for_asn1(PQGParams *params);
extern void prepare_low_dsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key);
extern void prepare_low_dsa_priv_key_export_for_asn1(NSSLOWKEYPrivateKey *key);
extern void prepare_low_dh_priv_key_for_asn1(NSSLOWKEYPrivateKey *key);
#ifdef NSS_ENABLE_ECC
extern void prepare_low_ec_priv_key_for_asn1(NSSLOWKEYPrivateKey *key);
extern void prepare_low_ecparams_for_asn1(ECParams *params);
#endif /* NSS_ENABLE_ECC */
typedef char * (* NSSLOWKEYDBNameFunc)(void *arg, int dbVersion);
/*
** Open a key database.
*/
extern NSSLOWKEYDBHandle *nsslowkey_OpenKeyDB(PRBool readOnly,
const char *domain,
const char *prefix,
NSSLOWKEYDBNameFunc namecb,
void *cbarg);
/*
** Close the specified key database.
*/
extern void nsslowkey_CloseKeyDB(NSSLOWKEYDBHandle *handle);
/*
* Get the version number of the database
*/
extern int nsslowkey_GetKeyDBVersion(NSSLOWKEYDBHandle *handle);
/*
** Delete a key from the database
*/
extern SECStatus nsslowkey_DeleteKey(NSSLOWKEYDBHandle *handle,
const SECItem *pubkey);
/*
** Store a key in the database, indexed by its public key modulus.
** "pk" is the private key to store
** "f" is a the callback function for getting the password
** "arg" is the argument for the callback
*/
extern SECStatus nsslowkey_StoreKeyByPublicKey(NSSLOWKEYDBHandle *handle,
NSSLOWKEYPrivateKey *pk,
SECItem *pubKeyData,
char *nickname,
SDB *sdb);
/* does the key for this cert exist in the database filed by modulus */
extern PRBool nsslowkey_KeyForCertExists(NSSLOWKEYDBHandle *handle,
NSSLOWCERTCertificate *cert);
/* does a key with this ID already exist? */
extern PRBool nsslowkey_KeyForIDExists(NSSLOWKEYDBHandle *handle, SECItem *id);
/*
** Destroy a private key object.
** "key" the object
** "freeit" if PR_TRUE then free the object as well as its sub-objects
*/
extern void nsslowkey_DestroyPrivateKey(NSSLOWKEYPrivateKey *key);
/*
** Destroy a public key object.
** "key" the object
** "freeit" if PR_TRUE then free the object as well as its sub-objects
*/
extern void nsslowkey_DestroyPublicKey(NSSLOWKEYPublicKey *key);
/*
** Return the modulus length of "pubKey".
*/
extern unsigned int nsslowkey_PublicModulusLen(NSSLOWKEYPublicKey *pubKey);
/*
** Return the modulus length of "privKey".
*/
extern unsigned int nsslowkey_PrivateModulusLen(NSSLOWKEYPrivateKey *privKey);
/*
** Convert a low private key "privateKey" into a public low key
*/
extern NSSLOWKEYPublicKey
*nsslowkey_ConvertToPublicKey(NSSLOWKEYPrivateKey *privateKey);
SECStatus
nsslowkey_UpdateNickname(NSSLOWKEYDBHandle *handle,
NSSLOWKEYPrivateKey *privkey,
SECItem *pubKeyData,
char *nickname,
SDB *sdb);
/* Store key by modulus and specify an encryption algorithm to use.
* handle is the pointer to the key database,
* privkey is the private key to be stored,
* f and arg are the function and arguments to the callback
* to get a password,
* algorithm is the algorithm which the privKey is to be stored.
* A return of anything but SECSuccess indicates failure.
*/
extern SECStatus
nsslowkey_StoreKeyByPublicKeyAlg(NSSLOWKEYDBHandle *handle,
NSSLOWKEYPrivateKey *privkey,
SECItem *pubKeyData,
char *nickname,
SDB *sdb,
PRBool update);
/* Find key by modulus. This function is the inverse of store key
* by modulus. An attempt to locate the key with "modulus" is
* performed. If the key is found, the private key is returned,
* else NULL is returned.
* modulus is the modulus to locate
*/
extern NSSLOWKEYPrivateKey *
nsslowkey_FindKeyByPublicKey(NSSLOWKEYDBHandle *handle, SECItem *modulus,
SDB *sdb);
extern char *
nsslowkey_FindKeyNicknameByPublicKey(NSSLOWKEYDBHandle *handle,
SECItem *modulus, SDB *sdb);
#ifdef NSS_ENABLE_ECC
/*
* smaller version of EC_FillParams. In this code, we only need
* oid and DER data.
*/
SECStatus LGEC_FillParams(PRArenaPool *arena, const SECItem *encodedParams,
ECParams *params);
/* Copy all of the fields from srcParams into dstParams */
SECStatus LGEC_CopyParams(PRArenaPool *arena, ECParams *dstParams,
const ECParams *srcParams);
#endif
SEC_END_PROTOS
#endif /* _LOWKEYI_H_ */

View File

@@ -1,161 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _LOWKEYTI_H_
#define _LOWKEYTI_H_ 1
#include "blapit.h"
#include "prtypes.h"
#include "plarena.h"
#include "secitem.h"
#include "secasn1t.h"
#include "secoidt.h"
/*
* a key in/for the data base
*/
struct NSSLOWKEYDBKeyStr {
PLArenaPool *arena;
int version;
char *nickname;
SECItem salt;
SECItem derPK;
};
typedef struct NSSLOWKEYDBKeyStr NSSLOWKEYDBKey;
typedef struct NSSLOWKEYDBHandleStr NSSLOWKEYDBHandle;
#ifdef NSS_USE_KEY4_DB
#define NSSLOWKEY_DB_FILE_VERSION 4
#else
#define NSSLOWKEY_DB_FILE_VERSION 3
#endif
#define NSSLOWKEY_VERSION 0 /* what we *create* */
/*
** Typedef for callback to get a password "key".
*/
extern const SEC_ASN1Template nsslowkey_PQGParamsTemplate[];
extern const SEC_ASN1Template nsslowkey_RSAPrivateKeyTemplate[];
extern const SEC_ASN1Template nsslowkey_DSAPrivateKeyTemplate[];
extern const SEC_ASN1Template nsslowkey_DSAPrivateKeyExportTemplate[];
extern const SEC_ASN1Template nsslowkey_DHPrivateKeyTemplate[];
extern const SEC_ASN1Template nsslowkey_DHPrivateKeyExportTemplate[];
#ifdef NSS_ENABLE_ECC
#define NSSLOWKEY_EC_PRIVATE_KEY_VERSION 1 /* as per SECG 1 C.4 */
extern const SEC_ASN1Template nsslowkey_ECParamsTemplate[];
extern const SEC_ASN1Template nsslowkey_ECPrivateKeyTemplate[];
#endif /* NSS_ENABLE_ECC */
extern const SEC_ASN1Template nsslowkey_PrivateKeyInfoTemplate[];
extern const SEC_ASN1Template nsslowkey_EncryptedPrivateKeyInfoTemplate[];
/*
* PKCS #8 attributes
*/
struct NSSLOWKEYAttributeStr {
SECItem attrType;
SECItem *attrValue;
};
typedef struct NSSLOWKEYAttributeStr NSSLOWKEYAttribute;
/*
** A PKCS#8 private key info object
*/
struct NSSLOWKEYPrivateKeyInfoStr {
PLArenaPool *arena;
SECItem version;
SECAlgorithmID algorithm;
SECItem privateKey;
NSSLOWKEYAttribute **attributes;
};
typedef struct NSSLOWKEYPrivateKeyInfoStr NSSLOWKEYPrivateKeyInfo;
#define NSSLOWKEY_PRIVATE_KEY_INFO_VERSION 0 /* what we *create* */
/*
** A PKCS#8 private key info object
*/
struct NSSLOWKEYEncryptedPrivateKeyInfoStr {
PLArenaPool *arena;
SECAlgorithmID algorithm;
SECItem encryptedData;
};
typedef struct NSSLOWKEYEncryptedPrivateKeyInfoStr NSSLOWKEYEncryptedPrivateKeyInfo;
typedef enum {
NSSLOWKEYNullKey = 0,
NSSLOWKEYRSAKey = 1,
NSSLOWKEYDSAKey = 2,
NSSLOWKEYDHKey = 4,
NSSLOWKEYECKey = 5
} NSSLOWKEYType;
/*
** An RSA public key object.
*/
struct NSSLOWKEYPublicKeyStr {
PLArenaPool *arena;
NSSLOWKEYType keyType ;
union {
RSAPublicKey rsa;
DSAPublicKey dsa;
DHPublicKey dh;
ECPublicKey ec;
} u;
};
typedef struct NSSLOWKEYPublicKeyStr NSSLOWKEYPublicKey;
/*
** Low Level private key object
** This is only used by the raw Crypto engines (crypto), keydb (keydb),
** and PKCS #11. Everyone else uses the high level key structure.
*/
struct NSSLOWKEYPrivateKeyStr {
PLArenaPool *arena;
NSSLOWKEYType keyType;
union {
RSAPrivateKey rsa;
DSAPrivateKey dsa;
DHPrivateKey dh;
ECPrivateKey ec;
} u;
};
typedef struct NSSLOWKEYPrivateKeyStr NSSLOWKEYPrivateKey;
#endif /* _LOWKEYTI_H_ */

View File

@@ -1,68 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Netscape security libraries.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1994-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
CORE_DEPTH = ../../../..
MODULE = nss
REQUIRES = dbm
LIBRARY_NAME = lgdbm
LIBRARY_VERSION = 3
MAPFILE = $(OBJDIR)/lgdbm.def
DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" -DSOFTOKEN_LIB_NAME=\"$(notdir $(SHARED_LIBRARY))\"
CSRCS = \
dbmshim.c \
keydb.c \
lgattr.c \
lgcreate.c \
lgdestroy.c \
lgfind.c \
lginit.c \
lgutil.c \
lowcert.c \
lowkey.c \
pcertdb.c \
pk11db.c \
$(NULL)
ifdef NSS_ENABLE_ECC
DEFINES += -DNSS_ENABLE_ECC
endif

View File

@@ -1,261 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _PCERTDB_H_
#define _PCERTDB_H_
#include "plarena.h"
#include "prlong.h"
#include "pcertt.h"
#include "lowkeyti.h" /* for struct NSSLOWKEYPublicKeyStr */
SEC_BEGIN_PROTOS
/*
* initialize any global certificate locks
*/
SECStatus nsslowcert_InitLocks(void);
/*
** Add a DER encoded certificate to the permanent database.
** "derCert" is the DER encoded certificate.
** "nickname" is the nickname to use for the cert
** "trust" is the trust parameters for the cert
*/
SECStatus nsslowcert_AddPermCert(NSSLOWCERTCertDBHandle *handle,
NSSLOWCERTCertificate *cert,
char *nickname, NSSLOWCERTCertTrust *trust);
SECStatus nsslowcert_AddPermNickname(NSSLOWCERTCertDBHandle *dbhandle,
NSSLOWCERTCertificate *cert, char *nickname);
SECStatus nsslowcert_DeletePermCertificate(NSSLOWCERTCertificate *cert);
typedef SECStatus (PR_CALLBACK * PermCertCallback)(NSSLOWCERTCertificate *cert,
SECItem *k, void *pdata);
/*
** Traverse the entire permanent database, and pass the certs off to a
** user supplied function.
** "certfunc" is the user function to call for each certificate
** "udata" is the user's data, which is passed through to "certfunc"
*/
SECStatus
nsslowcert_TraversePermCerts(NSSLOWCERTCertDBHandle *handle,
PermCertCallback certfunc,
void *udata );
PRBool
nsslowcert_CertDBKeyConflict(SECItem *derCert, NSSLOWCERTCertDBHandle *handle);
certDBEntryRevocation *
nsslowcert_FindCrlByKey(NSSLOWCERTCertDBHandle *handle,
SECItem *crlKey, PRBool isKRL);
SECStatus
nsslowcert_DeletePermCRL(NSSLOWCERTCertDBHandle *handle,const SECItem *derName,
PRBool isKRL);
SECStatus
nsslowcert_AddCrl(NSSLOWCERTCertDBHandle *handle, SECItem *derCrl ,
SECItem *derKey, char *url, PRBool isKRL);
NSSLOWCERTCertDBHandle *nsslowcert_GetDefaultCertDB();
NSSLOWKEYPublicKey *nsslowcert_ExtractPublicKey(NSSLOWCERTCertificate *);
NSSLOWCERTCertificate *
nsslowcert_NewTempCertificate(NSSLOWCERTCertDBHandle *handle, SECItem *derCert,
char *nickname, PRBool isperm, PRBool copyDER);
NSSLOWCERTCertificate *
nsslowcert_DupCertificate(NSSLOWCERTCertificate *cert);
void nsslowcert_DestroyCertificate(NSSLOWCERTCertificate *cert);
void nsslowcert_DestroyTrust(NSSLOWCERTTrust *Trust);
/*
* Lookup a certificate in the databases without locking
* "certKey" is the database key to look for
*
* XXX - this should be internal, but pkcs 11 needs to call it during a
* traversal.
*/
NSSLOWCERTCertificate *
nsslowcert_FindCertByKey(NSSLOWCERTCertDBHandle *handle, const SECItem *certKey);
/*
* Lookup trust for a certificate in the databases without locking
* "certKey" is the database key to look for
*
* XXX - this should be internal, but pkcs 11 needs to call it during a
* traversal.
*/
NSSLOWCERTTrust *
nsslowcert_FindTrustByKey(NSSLOWCERTCertDBHandle *handle, const SECItem *certKey);
/*
** Generate a certificate key from the issuer and serialnumber, then look it
** up in the database. Return the cert if found.
** "issuerAndSN" is the issuer and serial number to look for
*/
extern NSSLOWCERTCertificate *
nsslowcert_FindCertByIssuerAndSN (NSSLOWCERTCertDBHandle *handle, NSSLOWCERTIssuerAndSN *issuerAndSN);
/*
** Generate a certificate key from the issuer and serialnumber, then look it
** up in the database. Return the cert if found.
** "issuerAndSN" is the issuer and serial number to look for
*/
extern NSSLOWCERTTrust *
nsslowcert_FindTrustByIssuerAndSN (NSSLOWCERTCertDBHandle *handle, NSSLOWCERTIssuerAndSN *issuerAndSN);
/*
** Find a certificate in the database by a DER encoded certificate
** "derCert" is the DER encoded certificate
*/
extern NSSLOWCERTCertificate *
nsslowcert_FindCertByDERCert(NSSLOWCERTCertDBHandle *handle, SECItem *derCert);
/* convert an email address to lower case */
char *nsslowcert_FixupEmailAddr(char *emailAddr);
/*
** Decode a DER encoded certificate into an NSSLOWCERTCertificate structure
** "derSignedCert" is the DER encoded signed certificate
** "copyDER" is true if the DER should be copied, false if the
** existing copy should be referenced
** "nickname" is the nickname to use in the database. If it is NULL
** then a temporary nickname is generated.
*/
extern NSSLOWCERTCertificate *
nsslowcert_DecodeDERCertificate (SECItem *derSignedCert, char *nickname);
SECStatus
nsslowcert_KeyFromDERCert(PRArenaPool *arena, SECItem *derCert, SECItem *key);
certDBEntrySMime *
nsslowcert_ReadDBSMimeEntry(NSSLOWCERTCertDBHandle *certHandle,
char *emailAddr);
void
nsslowcert_DestroyDBEntry(certDBEntry *entry);
SECStatus
nsslowcert_OpenCertDB(NSSLOWCERTCertDBHandle *handle, PRBool readOnly,
const char *domain, const char *prefix,
NSSLOWCERTDBNameFunc namecb, void *cbarg, PRBool openVolatile);
void
nsslowcert_ClosePermCertDB(NSSLOWCERTCertDBHandle *handle);
/*
* is certa newer than certb? If one is expired, pick the other one.
*/
PRBool
nsslowcert_IsNewer(NSSLOWCERTCertificate *certa, NSSLOWCERTCertificate *certb);
SECStatus
nsslowcert_TraverseDBEntries(NSSLOWCERTCertDBHandle *handle,
certDBEntryType type,
SECStatus (* callback)(SECItem *data, SECItem *key,
certDBEntryType type, void *pdata),
void *udata );
SECStatus
nsslowcert_TraversePermCertsForSubject(NSSLOWCERTCertDBHandle *handle,
SECItem *derSubject,
NSSLOWCERTCertCallback cb, void *cbarg);
int
nsslowcert_NumPermCertsForSubject(NSSLOWCERTCertDBHandle *handle,
SECItem *derSubject);
SECStatus
nsslowcert_TraversePermCertsForNickname(NSSLOWCERTCertDBHandle *handle,
char *nickname, NSSLOWCERTCertCallback cb, void *cbarg);
int
nsslowcert_NumPermCertsForNickname(NSSLOWCERTCertDBHandle *handle,
char *nickname);
SECStatus
nsslowcert_GetCertTrust(NSSLOWCERTCertificate *cert,
NSSLOWCERTCertTrust *trust);
SECStatus
nsslowcert_SaveSMimeProfile(NSSLOWCERTCertDBHandle *dbhandle, char *emailAddr,
SECItem *derSubject, SECItem *emailProfile, SECItem *profileTime);
/*
* Change the trust attributes of a certificate and make them permanent
* in the database.
*/
SECStatus
nsslowcert_ChangeCertTrust(NSSLOWCERTCertDBHandle *handle,
NSSLOWCERTCertificate *cert, NSSLOWCERTCertTrust *trust);
PRBool
nsslowcert_needDBVerify(NSSLOWCERTCertDBHandle *handle);
void
nsslowcert_setDBVerify(NSSLOWCERTCertDBHandle *handle, PRBool value);
PRBool
nsslowcert_hasTrust(NSSLOWCERTCertTrust *trust);
void
nsslowcert_DestroyFreeLists(void);
void
nsslowcert_DestroyGlobalLocks(void);
void
pkcs11_freeNickname(char *nickname, char *space);
char *
pkcs11_copyNickname(char *nickname, char *space, int spaceLen);
void
pkcs11_freeStaticData(unsigned char *data, unsigned char *space);
unsigned char *
pkcs11_allocStaticData(int datalen, unsigned char *space, int spaceLen);
unsigned char *
pkcs11_copyStaticData(unsigned char *data, int datalen, unsigned char *space,
int spaceLen);
NSSLOWCERTCertificate *
nsslowcert_CreateCert(void);
certDBEntry *
nsslowcert_DecodeAnyDBEntry(SECItem *dbData, const SECItem *dbKey,
certDBEntryType entryType, void *pdata);
SEC_END_PROTOS
#endif /* _PCERTDB_H_ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,450 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* certt.h - public data structures for the certificate library
*
* $Id: pcertt.h,v 1.1.2.2 2007-05-15 21:59:52 rrelyea%redhat.com Exp $
*/
#ifndef _PCERTT_H_
#define _PCERTT_H_
#include "prclist.h"
#include "pkcs11t.h"
#include "seccomon.h"
#include "secoidt.h"
#include "plarena.h"
#include "prcvar.h"
#include "nssilock.h"
#include "prio.h"
#include "prmon.h"
/* Non-opaque objects */
typedef struct NSSLOWCERTCertDBHandleStr NSSLOWCERTCertDBHandle;
typedef struct NSSLOWCERTCertKeyStr NSSLOWCERTCertKey;
typedef struct NSSLOWCERTTrustStr NSSLOWCERTTrust;
typedef struct NSSLOWCERTCertTrustStr NSSLOWCERTCertTrust;
typedef struct NSSLOWCERTCertificateStr NSSLOWCERTCertificate;
typedef struct NSSLOWCERTCertificateListStr NSSLOWCERTCertificateList;
typedef struct NSSLOWCERTIssuerAndSNStr NSSLOWCERTIssuerAndSN;
typedef struct NSSLOWCERTSignedDataStr NSSLOWCERTSignedData;
typedef struct NSSLOWCERTSubjectPublicKeyInfoStr NSSLOWCERTSubjectPublicKeyInfo;
typedef struct NSSLOWCERTValidityStr NSSLOWCERTValidity;
/*
** An X.509 validity object
*/
struct NSSLOWCERTValidityStr {
PRArenaPool *arena;
SECItem notBefore;
SECItem notAfter;
};
/*
* A serial number and issuer name, which is used as a database key
*/
struct NSSLOWCERTCertKeyStr {
SECItem serialNumber;
SECItem derIssuer;
};
/*
** A signed data object. Used to implement the "signed" macro used
** in the X.500 specs.
*/
struct NSSLOWCERTSignedDataStr {
SECItem data;
SECAlgorithmID signatureAlgorithm;
SECItem signature;
};
/*
** An X.509 subject-public-key-info object
*/
struct NSSLOWCERTSubjectPublicKeyInfoStr {
PRArenaPool *arena;
SECAlgorithmID algorithm;
SECItem subjectPublicKey;
};
typedef struct _certDBEntryCert certDBEntryCert;
typedef struct _certDBEntryRevocation certDBEntryRevocation;
struct NSSLOWCERTCertTrustStr {
unsigned int sslFlags;
unsigned int emailFlags;
unsigned int objectSigningFlags;
};
/*
** PKCS11 Trust representation
*/
struct NSSLOWCERTTrustStr {
NSSLOWCERTTrust *next;
NSSLOWCERTCertDBHandle *dbhandle;
SECItem dbKey; /* database key for this cert */
certDBEntryCert *dbEntry; /* database entry struct */
NSSLOWCERTCertTrust *trust;
SECItem *derCert; /* original DER for the cert */
unsigned char dbKeySpace[512];
};
/*
** An X.509 certificate object (the unsigned form)
*/
struct NSSLOWCERTCertificateStr {
/* the arena is used to allocate any data structures that have the same
* lifetime as the cert. This is all stuff that hangs off of the cert
* structure, and is all freed at the same time. I is used when the
* cert is decoded, destroyed, and at some times when it changes
* state
*/
NSSLOWCERTCertificate *next;
NSSLOWCERTCertDBHandle *dbhandle;
SECItem derCert; /* original DER for the cert */
SECItem derIssuer; /* DER for issuer name */
SECItem derSN;
SECItem serialNumber;
SECItem derSubject; /* DER for subject name */
SECItem derSubjKeyInfo;
NSSLOWCERTSubjectPublicKeyInfo *subjectPublicKeyInfo;
SECItem certKey; /* database key for this cert */
SECItem validity;
certDBEntryCert *dbEntry; /* database entry struct */
SECItem subjectKeyID; /* x509v3 subject key identifier */
SECItem extensions;
char *nickname;
char *emailAddr;
NSSLOWCERTCertTrust *trust;
/* the reference count is modified whenever someone looks up, dups
* or destroys a certificate
*/
int referenceCount;
char nicknameSpace[200];
char emailAddrSpace[200];
unsigned char certKeySpace[512];
};
#define SEC_CERTIFICATE_VERSION_1 0 /* default created */
#define SEC_CERTIFICATE_VERSION_2 1 /* v2 */
#define SEC_CERTIFICATE_VERSION_3 2 /* v3 extensions */
#define SEC_CRL_VERSION_1 0 /* default */
#define SEC_CRL_VERSION_2 1 /* v2 extensions */
struct NSSLOWCERTIssuerAndSNStr {
SECItem derIssuer;
SECItem serialNumber;
};
typedef SECStatus (* NSSLOWCERTCertCallback)(NSSLOWCERTCertificate *cert, void *arg);
/* This is the typedef for the callback passed to nsslowcert_OpenCertDB() */
/* callback to return database name based on version number */
typedef char * (*NSSLOWCERTDBNameFunc)(void *arg, int dbVersion);
/* XXX Lisa thinks the template declarations belong in cert.h, not here? */
#include "secasn1t.h" /* way down here because I expect template stuff to
* move out of here anyway */
/*
* Certificate Database related definitions and data structures
*/
/* version number of certificate database */
#define CERT_DB_FILE_VERSION 8
#define CERT_DB_V7_FILE_VERSION 7
#define CERT_DB_CONTENT_VERSION 2
#define SEC_DB_ENTRY_HEADER_LEN 3
#define SEC_DB_KEY_HEADER_LEN 1
/* All database entries have this form:
*
* byte offset field
* ----------- -----
* 0 version
* 1 type
* 2 flags
*/
/* database entry types */
typedef enum {
certDBEntryTypeVersion = 0,
certDBEntryTypeCert = 1,
certDBEntryTypeNickname = 2,
certDBEntryTypeSubject = 3,
certDBEntryTypeRevocation = 4,
certDBEntryTypeKeyRevocation = 5,
certDBEntryTypeSMimeProfile = 6,
certDBEntryTypeContentVersion = 7,
certDBEntryTypeBlob = 8
} certDBEntryType;
typedef struct {
certDBEntryType type;
unsigned int version;
unsigned int flags;
PRArenaPool *arena;
} certDBEntryCommon;
/*
* Certificate entry:
*
* byte offset field
* ----------- -----
* 0 sslFlags-msb
* 1 sslFlags-lsb
* 2 emailFlags-msb
* 3 emailFlags-lsb
* 4 objectSigningFlags-msb
* 5 objectSigningFlags-lsb
* 6 derCert-len-msb
* 7 derCert-len-lsb
* 8 nickname-len-msb
* 9 nickname-len-lsb
* ... derCert
* ... nickname
*
* NOTE: the nickname string as stored in the database is null terminated,
* in other words, the last byte of the db entry is always 0
* if a nickname is present.
* NOTE: if nickname is not present, then nickname-len-msb and
* nickname-len-lsb will both be zero.
*/
struct _certDBEntryCert {
certDBEntryCommon common;
certDBEntryCert *next;
NSSLOWCERTCertTrust trust;
SECItem derCert;
char *nickname;
char nicknameSpace[200];
unsigned char derCertSpace[2048];
};
/*
* Certificate Nickname entry:
*
* byte offset field
* ----------- -----
* 0 subjectname-len-msb
* 1 subjectname-len-lsb
* 2... subjectname
*
* The database key for this type of entry is a nickname string
* The "subjectname" value is the DER encoded DN of the identity
* that matches this nickname.
*/
typedef struct {
certDBEntryCommon common;
char *nickname;
SECItem subjectName;
} certDBEntryNickname;
#define DB_NICKNAME_ENTRY_HEADER_LEN 2
/*
* Certificate Subject entry:
*
* byte offset field
* ----------- -----
* 0 ncerts-msb
* 1 ncerts-lsb
* 2 nickname-msb
* 3 nickname-lsb
* 4 emailAddr-msb
* 5 emailAddr-lsb
* ... nickname
* ... emailAddr
* ...+2*i certkey-len-msb
* ...+1+2*i certkey-len-lsb
* ...+2*ncerts+2*i keyid-len-msb
* ...+1+2*ncerts+2*i keyid-len-lsb
* ... certkeys
* ... keyids
*
* The database key for this type of entry is the DER encoded subject name
* The "certkey" value is an array of certificate database lookup keys that
* points to the database entries for the certificates that matche
* this subject.
*
*/
typedef struct _certDBEntrySubject {
certDBEntryCommon common;
SECItem derSubject;
unsigned int ncerts;
char *nickname;
SECItem *certKeys;
SECItem *keyIDs;
char **emailAddrs;
unsigned int nemailAddrs;
} certDBEntrySubject;
#define DB_SUBJECT_ENTRY_HEADER_LEN 6
/*
* Certificate SMIME profile entry:
*
* byte offset field
* ----------- -----
* 0 subjectname-len-msb
* 1 subjectname-len-lsb
* 2 smimeoptions-len-msb
* 3 smimeoptions-len-lsb
* 4 options-date-len-msb
* 5 options-date-len-lsb
* 6... subjectname
* ... smimeoptions
* ... options-date
*
* The database key for this type of entry is the email address string
* The "subjectname" value is the DER encoded DN of the identity
* that matches this nickname.
* The "smimeoptions" value is a string that represents the algorithm
* capabilities on the remote user.
* The "options-date" is the date that the smime options value was created.
* This is generally the signing time of the signed message that contained
* the options. It is a UTCTime value.
*/
typedef struct {
certDBEntryCommon common;
char *emailAddr;
SECItem subjectName;
SECItem smimeOptions;
SECItem optionsDate;
} certDBEntrySMime;
#define DB_SMIME_ENTRY_HEADER_LEN 6
/*
* Crl/krl entry:
*
* byte offset field
* ----------- -----
* 0 derCert-len-msb
* 1 derCert-len-lsb
* 2 url-len-msb
* 3 url-len-lsb
* ... derCert
* ... url
*
* NOTE: the url string as stored in the database is null terminated,
* in other words, the last byte of the db entry is always 0
* if a nickname is present.
* NOTE: if url is not present, then url-len-msb and
* url-len-lsb will both be zero.
*/
#define DB_CRL_ENTRY_HEADER_LEN 4
struct _certDBEntryRevocation {
certDBEntryCommon common;
SECItem derCrl;
char *url; /* where to load the crl from */
};
/*
* Database Version Entry:
*
* byte offset field
* ----------- -----
* only the low level header...
*
* The database key for this type of entry is the string "Version"
*/
typedef struct {
certDBEntryCommon common;
} certDBEntryVersion;
#define SEC_DB_VERSION_KEY "Version"
#define SEC_DB_VERSION_KEY_LEN sizeof(SEC_DB_VERSION_KEY)
/*
* Database Content Version Entry:
*
* byte offset field
* ----------- -----
* 0 contentVersion
*
* The database key for this type of entry is the string "ContentVersion"
*/
typedef struct {
certDBEntryCommon common;
char contentVersion;
} certDBEntryContentVersion;
#define SEC_DB_CONTENT_VERSION_KEY "ContentVersion"
#define SEC_DB_CONTENT_VERSION_KEY_LEN sizeof(SEC_DB_CONTENT_VERSION_KEY)
typedef union {
certDBEntryCommon common;
certDBEntryCert cert;
certDBEntryContentVersion content;
certDBEntryNickname nickname;
certDBEntryRevocation revocation;
certDBEntrySMime smime;
certDBEntrySubject subject;
certDBEntryVersion version;
} certDBEntry;
/* length of the fixed part of a database entry */
#define DBCERT_V4_HEADER_LEN 7
#define DB_CERT_V5_ENTRY_HEADER_LEN 7
#define DB_CERT_V6_ENTRY_HEADER_LEN 7
#define DB_CERT_ENTRY_HEADER_LEN 10
/* common flags for all types of certificates */
#define CERTDB_VALID_PEER (1<<0)
#define CERTDB_TRUSTED (1<<1)
#define CERTDB_SEND_WARN (1<<2)
#define CERTDB_VALID_CA (1<<3)
#define CERTDB_TRUSTED_CA (1<<4) /* trusted for issuing server certs */
#define CERTDB_NS_TRUSTED_CA (1<<5)
#define CERTDB_USER (1<<6)
#define CERTDB_TRUSTED_CLIENT_CA (1<<7) /* trusted for issuing client certs */
#define CERTDB_INVISIBLE_CA (1<<8) /* don't show in UI */
#define CERTDB_GOVT_APPROVED_CA (1<<9) /* can do strong crypto in export ver */
#define CERTDB_NOT_TRUSTED (1<<10) /* explicitly don't trust this cert */
#define CERTDB_TRUSTED_UNKNOWN (1<<11) /* accept trust from another source */
/* bits not affected by the CKO_NETSCAPE_TRUST object */
#define CERTDB_PRESERVE_TRUST_BITS (CERTDB_USER | CERTDB_VALID_PEER | \
CERTDB_NS_TRUSTED_CA | CERTDB_VALID_CA | CERTDB_INVISIBLE_CA | \
CERTDB_GOVT_APPROVED_CA)
#endif /* _PCERTT_H_ */

View File

@@ -1,773 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* The following code handles the storage of PKCS 11 modules used by the
* NSS. This file is written to abstract away how the modules are
* stored so we can deside that later.
*/
#include "pk11pars.h"
#include "lgdb.h"
#include "mcom_db.h"
#include "secerr.h"
#define FREE_CLEAR(p) if (p) { PORT_Free(p); p = NULL; }
/* Construct a database key for a given module */
static SECStatus secmod_MakeKey(DBT *key, char * module) {
int len = 0;
char *commonName;
commonName = secmod_argGetParamValue("name",module);
if (commonName == NULL) {
commonName = secmod_argGetParamValue("library",module);
}
if (commonName == NULL) return SECFailure;
len = PORT_Strlen(commonName);
key->data = commonName;
key->size = len;
return SECSuccess;
}
/* free out constructed database key */
static void
secmod_FreeKey(DBT *key)
{
if (key->data) {
PORT_Free(key->data);
}
key->data = NULL;
key->size = 0;
}
typedef struct secmodDataStr secmodData;
typedef struct secmodSlotDataStr secmodSlotData;
struct secmodDataStr {
unsigned char major;
unsigned char minor;
unsigned char nameStart[2];
unsigned char slotOffset[2];
unsigned char internal;
unsigned char fips;
unsigned char ssl[8];
unsigned char trustOrder[4];
unsigned char cipherOrder[4];
unsigned char reserved1;
unsigned char isModuleDB;
unsigned char isModuleDBOnly;
unsigned char isCritical;
unsigned char reserved[4];
unsigned char names[6]; /* enough space for the length fields */
};
struct secmodSlotDataStr {
unsigned char slotID[4];
unsigned char defaultFlags[4];
unsigned char timeout[4];
unsigned char askpw;
unsigned char hasRootCerts;
unsigned char reserved[18]; /* this makes it a round 32 bytes */
};
#define SECMOD_DB_VERSION_MAJOR 0
#define SECMOD_DB_VERSION_MINOR 6
#define SECMOD_DB_EXT1_VERSION_MAJOR 0
#define SECMOD_DB_EXT1_VERSION_MINOR 6
#define SECMOD_DB_NOUI_VERSION_MAJOR 0
#define SECMOD_DB_NOUI_VERSION_MINOR 4
#define SECMOD_PUTSHORT(dest,src) \
(dest)[1] = (unsigned char) ((src)&0xff); \
(dest)[0] = (unsigned char) (((src) >> 8) & 0xff);
#define SECMOD_PUTLONG(dest,src) \
(dest)[3] = (unsigned char) ((src)&0xff); \
(dest)[2] = (unsigned char) (((src) >> 8) & 0xff); \
(dest)[1] = (unsigned char) (((src) >> 16) & 0xff); \
(dest)[0] = (unsigned char) (((src) >> 24) & 0xff);
#define SECMOD_GETSHORT(src) \
((unsigned short) (((src)[0] << 8) | (src)[1]))
#define SECMOD_GETLONG(src) \
((unsigned long) (( (unsigned long) (src)[0] << 24) | \
( (unsigned long) (src)[1] << 16) | \
( (unsigned long) (src)[2] << 8) | \
(unsigned long) (src)[3]))
/*
* build a data base entry from a module
*/
static SECStatus
secmod_EncodeData(DBT *data, char * module)
{
secmodData *encoded = NULL;
secmodSlotData *slot;
unsigned char *dataPtr;
unsigned short len, len2 = 0, len3 = 0;
int count = 0;
unsigned short offset;
int dataLen, i;
unsigned long order;
unsigned long ssl[2];
char *commonName = NULL , *dllName = NULL, *param = NULL, *nss = NULL;
char *slotParams, *ciphers;
PK11PreSlotInfo *slotInfo = NULL;
SECStatus rv = SECFailure;
rv = secmod_argParseModuleSpec(module,&dllName,&commonName,&param,&nss);
if (rv != SECSuccess) return rv;
rv = SECFailure;
if (commonName == NULL) {
/* set error */
goto loser;
}
len = PORT_Strlen(commonName);
if (dllName) {
len2 = PORT_Strlen(dllName);
}
if (param) {
len3 = PORT_Strlen(param);
}
slotParams = secmod_argGetParamValue("slotParams",nss);
slotInfo = secmod_argParseSlotInfo(NULL,slotParams,&count);
if (slotParams) PORT_Free(slotParams);
if (count && slotInfo == NULL) {
/* set error */
goto loser;
}
dataLen = sizeof(secmodData) + len + len2 + len3 + sizeof(unsigned short) +
count*sizeof(secmodSlotData);
data->data = (unsigned char *) PORT_ZAlloc(dataLen);
encoded = (secmodData *)data->data;
dataPtr = (unsigned char *) data->data;
data->size = dataLen;
if (encoded == NULL) {
/* set error */
goto loser;
}
encoded->major = SECMOD_DB_VERSION_MAJOR;
encoded->minor = SECMOD_DB_VERSION_MINOR;
encoded->internal = (unsigned char)
(secmod_argHasFlag("flags","internal",nss) ? 1 : 0);
encoded->fips = (unsigned char)
(secmod_argHasFlag("flags","FIPS",nss) ? 1 : 0);
encoded->isModuleDB = (unsigned char)
(secmod_argHasFlag("flags","isModuleDB",nss) ? 1 : 0);
encoded->isModuleDBOnly = (unsigned char)
(secmod_argHasFlag("flags","isModuleDBOnly",nss) ? 1 : 0);
encoded->isCritical = (unsigned char)
(secmod_argHasFlag("flags","critical",nss) ? 1 : 0);
order = secmod_argReadLong("trustOrder", nss, SECMOD_DEFAULT_TRUST_ORDER,
NULL);
SECMOD_PUTLONG(encoded->trustOrder,order);
order = secmod_argReadLong("cipherOrder", nss, SECMOD_DEFAULT_CIPHER_ORDER,
NULL);
SECMOD_PUTLONG(encoded->cipherOrder,order);
ciphers = secmod_argGetParamValue("ciphers",nss);
secmod_argSetNewCipherFlags(&ssl[0], ciphers);
SECMOD_PUTLONG(encoded->ssl,ssl[0]);
SECMOD_PUTLONG(&encoded->ssl[4],ssl[1]);
if (ciphers) PORT_Free(ciphers);
offset = (unsigned short) &(((secmodData *)0)->names[0]);
SECMOD_PUTSHORT(encoded->nameStart,offset);
offset = offset + len + len2 + len3 + 3*sizeof(unsigned short);
SECMOD_PUTSHORT(encoded->slotOffset,offset);
SECMOD_PUTSHORT(&dataPtr[offset],((unsigned short)count));
slot = (secmodSlotData *)(dataPtr+offset+sizeof(unsigned short));
offset = 0;
SECMOD_PUTSHORT(encoded->names,len);
offset += sizeof(unsigned short);
PORT_Memcpy(&encoded->names[offset],commonName,len);
offset += len;
SECMOD_PUTSHORT(&encoded->names[offset],len2);
offset += sizeof(unsigned short);
if (len2) PORT_Memcpy(&encoded->names[offset],dllName,len2);
offset += len2;
SECMOD_PUTSHORT(&encoded->names[offset],len3);
offset += sizeof(unsigned short);
if (len3) PORT_Memcpy(&encoded->names[offset],param,len3);
offset += len3;
if (count) {
for (i=0; i < count; i++) {
SECMOD_PUTLONG(slot[i].slotID, slotInfo[i].slotID);
SECMOD_PUTLONG(slot[i].defaultFlags,
slotInfo[i].defaultFlags);
SECMOD_PUTLONG(slot[i].timeout,slotInfo[i].timeout);
slot[i].askpw = slotInfo[i].askpw;
slot[i].hasRootCerts = slotInfo[i].hasRootCerts;
PORT_Memset(slot[i].reserved, 0, sizeof(slot[i].reserved));
}
}
rv = SECSuccess;
loser:
if (commonName) PORT_Free(commonName);
if (dllName) PORT_Free(dllName);
if (param) PORT_Free(param);
if (slotInfo) PORT_Free(slotInfo);
if (nss) PORT_Free(nss);
return rv;
}
static void
secmod_FreeData(DBT *data)
{
if (data->data) {
PORT_Free(data->data);
}
}
static void
secmod_FreeSlotStrings(char **slotStrings, int count)
{
int i;
for (i=0; i < count; i++) {
if (slotStrings[i]) {
PR_smprintf_free(slotStrings[i]);
slotStrings[i] = NULL;
}
}
}
/*
* build a module from the data base entry.
*/
static char *
secmod_DecodeData(char *defParams, DBT *data, PRBool *retInternal)
{
secmodData *encoded;
secmodSlotData *slots;
PLArenaPool *arena;
char *commonName = NULL;
char *dllName = NULL;
char *parameters = NULL;
char *nss;
char *moduleSpec;
char **slotStrings = NULL;
unsigned char *names;
unsigned long slotCount;
unsigned long ssl0 =0;
unsigned long ssl1 =0;
unsigned long slotID;
unsigned long defaultFlags;
unsigned long timeout;
unsigned long trustOrder =SECMOD_DEFAULT_TRUST_ORDER;
unsigned long cipherOrder =SECMOD_DEFAULT_CIPHER_ORDER;
unsigned short len;
unsigned short namesOffset = 0; /* start of the names block */
unsigned long namesRunningOffset; /* offset to name we are
* currently processing */
unsigned short slotOffset;
PRBool isOldVersion = PR_FALSE;
PRBool internal;
PRBool isFIPS;
PRBool isModuleDB =PR_FALSE;
PRBool isModuleDBOnly =PR_FALSE;
PRBool extended =PR_FALSE;
int i;
arena = PORT_NewArena(SEC_ASN1_DEFAULT_ARENA_SIZE);
if (arena == NULL)
return NULL;
#define CHECK_SIZE(x) \
if ((unsigned int) data->size < (unsigned int)(x)) goto db_loser
/* -------------------------------------------------------------
** Process the buffer header, which is the secmodData struct.
** It may be an old or new version. Check the length for each.
*/
CHECK_SIZE( offsetof(secmodData, trustOrder[0]) );
encoded = (secmodData *)data->data;
internal = (encoded->internal != 0) ? PR_TRUE: PR_FALSE;
isFIPS = (encoded->fips != 0) ? PR_TRUE: PR_FALSE;
if (retInternal)
*retInternal = internal;
if (internal) {
parameters = PORT_ArenaStrdup(arena,defParams);
if (parameters == NULL)
goto loser;
}
if (internal && (encoded->major == SECMOD_DB_NOUI_VERSION_MAJOR) &&
(encoded->minor <= SECMOD_DB_NOUI_VERSION_MINOR)) {
isOldVersion = PR_TRUE;
}
if ((encoded->major == SECMOD_DB_EXT1_VERSION_MAJOR) &&
(encoded->minor >= SECMOD_DB_EXT1_VERSION_MINOR)) {
CHECK_SIZE( sizeof(secmodData));
trustOrder = SECMOD_GETLONG(encoded->trustOrder);
cipherOrder = SECMOD_GETLONG(encoded->cipherOrder);
isModuleDB = (encoded->isModuleDB != 0) ? PR_TRUE: PR_FALSE;
isModuleDBOnly = (encoded->isModuleDBOnly != 0) ? PR_TRUE: PR_FALSE;
extended = PR_TRUE;
}
if (internal && !extended) {
trustOrder = 0;
cipherOrder = 100;
}
/* decode SSL cipher enable flags */
ssl0 = SECMOD_GETLONG(encoded->ssl);
ssl1 = SECMOD_GETLONG(encoded->ssl + 4);
slotOffset = SECMOD_GETSHORT(encoded->slotOffset);
namesOffset = SECMOD_GETSHORT(encoded->nameStart);
/*--------------------------------------------------------------
** Now process the variable length set of names.
** The names have this structure:
** struct {
** BYTE commonNameLen[ 2 ];
** BYTE commonName [ commonNameLen ];
** BTTE libNameLen [ 2 ];
** BYTE libName [ libNameLen ];
** If it is "extended" it also has these members:
** BYTE initStringLen[ 2 ];
** BYTE initString [ initStringLen ];
** }
*/
namesRunningOffset = namesOffset;
/* copy the module's common name */
CHECK_SIZE( namesRunningOffset + 2);
names = (unsigned char *)data->data;
len = SECMOD_GETSHORT(names+namesRunningOffset);
CHECK_SIZE( namesRunningOffset + 2 + len);
commonName = (char*)PORT_ArenaAlloc(arena,len+1);
if (commonName == NULL)
goto loser;
PORT_Memcpy(commonName, names + namesRunningOffset + 2, len);
commonName[len] = 0;
namesRunningOffset += len + 2;
/* copy the module's shared library file name. */
CHECK_SIZE( namesRunningOffset + 2);
len = SECMOD_GETSHORT(names + namesRunningOffset);
if (len) {
CHECK_SIZE( namesRunningOffset + 2 + len);
dllName = (char*)PORT_ArenaAlloc(arena,len + 1);
if (dllName == NULL)
goto loser;
PORT_Memcpy(dllName, names + namesRunningOffset + 2, len);
dllName[len] = 0;
}
namesRunningOffset += len + 2;
/* copy the module's initialization string, if present. */
if (!internal && extended) {
CHECK_SIZE( namesRunningOffset + 2);
len = SECMOD_GETSHORT(names+namesRunningOffset);
if (len) {
CHECK_SIZE( namesRunningOffset + 2 + len );
parameters = (char*)PORT_ArenaAlloc(arena,len + 1);
if (parameters == NULL)
goto loser;
PORT_Memcpy(parameters,names + namesRunningOffset + 2, len);
parameters[len] = 0;
}
namesRunningOffset += len + 2;
}
/*
* Consistency check: Make sure the slot and names blocks don't
* overlap. These blocks can occur in any order, so this check is made
* in 2 parts. First we check the case where the slot block starts
* after the name block. Later, when we have the slot block length,
* we check the case where slot block starts before the name block.
* NOTE: in most cases any overlap will likely be detected by invalid
* data read from the blocks, but it's better to find out sooner
* than later.
*/
if (slotOffset >= namesOffset) { /* slot block starts after name block */
if (slotOffset < namesRunningOffset) {
goto db_loser;
}
}
/* ------------------------------------------------------------------
** Part 3, process the slot table.
** This part has this structure:
** struct {
** BYTE slotCount [ 2 ];
** secmodSlotData [ slotCount ];
** {
*/
CHECK_SIZE( slotOffset + 2 );
slotCount = SECMOD_GETSHORT((unsigned char *)data->data + slotOffset);
/*
* Consistency check: Part 2. We now have the slot block length, we can
* check the case where the slotblock procedes the name block.
*/
if (slotOffset < namesOffset) { /* slot block starts before name block */
if (namesOffset < slotOffset + 2 + slotCount*sizeof(secmodSlotData)) {
goto db_loser;
}
}
CHECK_SIZE( (slotOffset + 2 + slotCount * sizeof(secmodSlotData)));
slots = (secmodSlotData *) ((unsigned char *)data->data + slotOffset + 2);
/* slotCount; */
slotStrings = (char **)PORT_ArenaZAlloc(arena, slotCount * sizeof(char *));
if (slotStrings == NULL)
goto loser;
for (i=0; i < (int) slotCount; i++, slots++) {
PRBool hasRootCerts =PR_FALSE;
PRBool hasRootTrust =PR_FALSE;
slotID = SECMOD_GETLONG(slots->slotID);
defaultFlags = SECMOD_GETLONG(slots->defaultFlags);
timeout = SECMOD_GETLONG(slots->timeout);
hasRootCerts = slots->hasRootCerts;
if (isOldVersion && internal && (slotID != 2)) {
unsigned long internalFlags=
secmod_argSlotFlags("slotFlags",SECMOD_SLOT_FLAGS);
defaultFlags |= internalFlags;
}
if (hasRootCerts && !extended) {
trustOrder = 100;
}
slotStrings[i] = secmod_mkSlotString(slotID, defaultFlags, timeout,
(unsigned char)slots->askpw,
hasRootCerts, hasRootTrust);
if (slotStrings[i] == NULL) {
secmod_FreeSlotStrings(slotStrings,i);
goto loser;
}
}
nss = secmod_mkNSS(slotStrings, slotCount, internal, isFIPS, isModuleDB,
isModuleDBOnly, internal, trustOrder, cipherOrder,
ssl0, ssl1);
secmod_FreeSlotStrings(slotStrings,slotCount);
/* it's permissible (and normal) for nss to be NULL. it simply means
* there are no NSS specific parameters in the database */
moduleSpec = secmod_mkNewModuleSpec(dllName,commonName,parameters,nss);
PR_smprintf_free(nss);
PORT_FreeArena(arena,PR_TRUE);
return moduleSpec;
db_loser:
PORT_SetError(SEC_ERROR_BAD_DATABASE);
loser:
PORT_FreeArena(arena,PR_TRUE);
return NULL;
}
static DB *
secmod_OpenDB(const char *appName, const char *filename, const char *dbName,
PRBool readOnly, PRBool update)
{
DB *pkcs11db = NULL;
if (appName) {
char *secname = PORT_Strdup(filename);
int len = strlen(secname);
int status = RDB_FAIL;
if (len >= 3 && PORT_Strcmp(&secname[len-3],".db") == 0) {
secname[len-3] = 0;
}
pkcs11db=
rdbopen(appName, "", secname, readOnly ? NO_RDONLY:NO_RDWR, NULL);
if (update && !pkcs11db) {
DB *updatedb;
pkcs11db = rdbopen(appName, "", secname, NO_CREATE, &status);
if (!pkcs11db) {
if (status == RDB_RETRY) {
pkcs11db= rdbopen(appName, "", secname,
readOnly ? NO_RDONLY:NO_RDWR, NULL);
}
PORT_Free(secname);
return pkcs11db;
}
updatedb = dbopen(dbName, NO_RDONLY, 0600, DB_HASH, 0);
if (updatedb) {
db_Copy(pkcs11db,updatedb);
(*updatedb->close)(updatedb);
} else {
(*pkcs11db->close)(pkcs11db);
PORT_Free(secname);
return NULL;
}
}
PORT_Free(secname);
return pkcs11db;
}
/* I'm sure we should do more checks here sometime... */
pkcs11db = dbopen(dbName, readOnly ? NO_RDONLY : NO_RDWR, 0600, DB_HASH, 0);
/* didn't exist? create it */
if (pkcs11db == NULL) {
if (readOnly)
return NULL;
pkcs11db = dbopen( dbName, NO_CREATE, 0600, DB_HASH, 0 );
if (pkcs11db)
(* pkcs11db->sync)(pkcs11db, 0);
}
return pkcs11db;
}
static void
secmod_CloseDB(DB *pkcs11db)
{
(*pkcs11db->close)(pkcs11db);
}
static char *
secmod_addEscape(const char *string, char quote)
{
char *newString = 0;
int escapes = 0, size = 0;
const char *src;
char *dest;
for (src=string; *src ; src++) {
if ((*src == quote) || (*src == '\\')) escapes++;
size++;
}
newString = PORT_ZAlloc(escapes+size+1);
if (newString == NULL) {
return NULL;
}
for (src=string, dest=newString; *src; src++,dest++) {
if ((*src == '\\') || (*src == quote)) {
*dest++ = '\\';
}
*dest = *src;
}
return newString;
}
SECStatus legacy_AddSecmodDB(const char *appName, const char *filename,
const char *dbname, char *module, PRBool rw);
#define SECMOD_STEP 10
#define SFTK_DEFAULT_INTERNAL_INIT "library= name=\"NSS Internal PKCS #11 Module\" parameters=\"%s\" NSS=\"Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={%s askpw=any timeout=30})\""
/*
* Read all the existing modules in
*/
char **
legacy_ReadSecmodDB(const char *appName, const char *filename,
const char *dbname, char *params, PRBool rw)
{
DBT key,data;
int ret;
DB *pkcs11db = NULL;
char **moduleList = NULL, **newModuleList = NULL;
int moduleCount = 1;
int useCount = SECMOD_STEP;
moduleList = (char **) PORT_ZAlloc(useCount*sizeof(char **));
if (moduleList == NULL) return NULL;
pkcs11db = secmod_OpenDB(appName,filename,dbname,PR_TRUE,rw);
if (pkcs11db == NULL) goto done;
/* read and parse the file or data base */
ret = (*pkcs11db->seq)(pkcs11db, &key, &data, R_FIRST);
if (ret) goto done;
do {
char *moduleString;
PRBool internal = PR_FALSE;
if ((moduleCount+1) >= useCount) {
useCount += SECMOD_STEP;
newModuleList =
(char **)PORT_Realloc(moduleList,useCount*sizeof(char *));
if (newModuleList == NULL) goto done;
moduleList = newModuleList;
PORT_Memset(&moduleList[moduleCount+1],0,
sizeof(char *)*SECMOD_STEP);
}
moduleString = secmod_DecodeData(params,&data,&internal);
if (internal) {
moduleList[0] = moduleString;
} else {
moduleList[moduleCount] = moduleString;
moduleCount++;
}
} while ( (*pkcs11db->seq)(pkcs11db, &key, &data, R_NEXT) == 0);
done:
if (!moduleList[0]) {
char * newparams = secmod_addEscape(params,'"');
if (newparams) {
moduleList[0] = PR_smprintf(SFTK_DEFAULT_INTERNAL_INIT,newparams,
SECMOD_SLOT_FLAGS);
PORT_Free(newparams);
}
}
/* deal with trust cert db here */
if (pkcs11db) {
secmod_CloseDB(pkcs11db);
} else if (moduleList[0] && rw) {
legacy_AddSecmodDB(appName,filename,dbname,moduleList[0], rw) ;
}
if (!moduleList[0]) {
PORT_Free(moduleList);
moduleList = NULL;
}
return moduleList;
}
SECStatus
legacy_ReleaseSecmodDBData(const char *appName, const char *filename,
const char *dbname, char **moduleSpecList, PRBool rw)
{
if (moduleSpecList) {
char **index;
for(index = moduleSpecList; *index; index++) {
PR_smprintf_free(*index);
}
PORT_Free(moduleSpecList);
}
return SECSuccess;
}
/*
* Delete a module from the Data Base
*/
SECStatus
legacy_DeleteSecmodDB(const char *appName, const char *filename,
const char *dbname, char *args, PRBool rw)
{
DBT key;
SECStatus rv = SECFailure;
DB *pkcs11db = NULL;
int ret;
if (!rw) return SECFailure;
/* make sure we have a db handle */
pkcs11db = secmod_OpenDB(appName,filename,dbname,PR_FALSE,PR_FALSE);
if (pkcs11db == NULL) {
return SECFailure;
}
rv = secmod_MakeKey(&key,args);
if (rv != SECSuccess) goto done;
rv = SECFailure;
ret = (*pkcs11db->del)(pkcs11db, &key, 0);
secmod_FreeKey(&key);
if (ret != 0) goto done;
ret = (*pkcs11db->sync)(pkcs11db, 0);
if (ret == 0) rv = SECSuccess;
done:
secmod_CloseDB(pkcs11db);
return rv;
}
/*
* Add a module to the Data base
*/
SECStatus
legacy_AddSecmodDB(const char *appName, const char *filename,
const char *dbname, char *module, PRBool rw)
{
DBT key,data;
SECStatus rv = SECFailure;
DB *pkcs11db = NULL;
int ret;
if (!rw) return SECFailure;
/* make sure we have a db handle */
pkcs11db = secmod_OpenDB(appName,filename,dbname,PR_FALSE,PR_FALSE);
if (pkcs11db == NULL) {
return SECFailure;
}
rv = secmod_MakeKey(&key,module);
if (rv != SECSuccess) goto done;
rv = secmod_EncodeData(&data,module);
if (rv != SECSuccess) {
secmod_FreeKey(&key);
goto done;
}
rv = SECFailure;
ret = (*pkcs11db->put)(pkcs11db, &key, &data, 0);
secmod_FreeKey(&key);
secmod_FreeData(&data);
if (ret != 0) goto done;
ret = (*pkcs11db->sync)(pkcs11db, 0);
if (ret == 0) rv = SECSuccess;
done:
secmod_CloseDB(pkcs11db);
return rv;
}

View File

@@ -1,341 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* The following code handles the storage of PKCS 11 modules used by the
* NSS. This file is written to abstract away how the modules are
* stored so we can deside that later.
*/
#include "sftkdb.h"
#include "sdb.h"
#include "prsystem.h"
#include "prprf.h"
#include "lgglue.h"
#include "secerr.h"
static LGOpenFunc legacy_glue_open = NULL;
static LGReadSecmodFunc legacy_glue_readSecmod = NULL;
static LGReleaseSecmodFunc legacy_glue_releaseSecmod = NULL;
static LGDeleteSecmodFunc legacy_glue_deleteSecmod = NULL;
static LGAddSecmodFunc legacy_glue_addSecmod = NULL;
static LGShutdownFunc legacy_glue_shutdown = NULL;
/*
* The following 3 functions duplicate the work done by bl_LoadLibrary.
* We should make bl_LoadLibrary a global and replace the call to
* sftkdb_LoadLibrary(const char *libname) with it.
*/
#ifdef XP_UNIX
#include <unistd.h>
#define LG_MAX_LINKS 20
static char *
sftkdb_resolvePath(const char *orig)
{
int count = 0;
int len =0;
int ret = -1;
char *resolved = NULL;
char *source = NULL;
len = 1025; /* MAX PATH +1*/
if (strlen(orig)+1 > len) {
/* PATH TOO LONG */
return NULL;
}
resolved = PORT_Alloc(len);
if (!resolved) {
return NULL;
}
source = PORT_Alloc(len);
if (!source) {
goto loser;
}
PORT_Strcpy(source, orig);
/* Walk down all the links */
while ( count++ < LG_MAX_LINKS) {
char *tmp;
/* swap our previous sorce out with resolved */
/* read it */
ret = readlink(source, resolved, len-1);
if (ret < 0) {
break;
}
resolved[ret] = 0;
tmp = source; source = resolved; resolved = tmp;
}
if (count > 1) {
ret = 0;
}
loser:
if (resolved) {
PORT_Free(resolved);
}
if (ret < 0) {
if (source) {
PORT_Free(source);
source = NULL;
}
}
return source;
}
#endif
static PRLibrary *
sftkdb_LoadFromPath(const char *path, const char *libname)
{
char *c;
int pathLen, nameLen, fullPathLen;
char *fullPathName = NULL;
PRLibSpec libSpec;
PRLibrary *lib = NULL;
/* strip of our parent's library name */
c = strrchr(path, PR_GetDirectorySeparator());
if (!c) {
return NULL; /* invalid path */
}
pathLen = (c-path)+1;
nameLen = strlen(libname);
fullPathLen = pathLen + nameLen +1;
fullPathName = (char *)PORT_Alloc(fullPathLen);
if (fullPathName == NULL) {
return NULL; /* memory allocation error */
}
PORT_Memcpy(fullPathName, path, pathLen);
PORT_Memcpy(fullPathName+pathLen, libname, nameLen);
fullPathName[fullPathLen-1] = 0;
libSpec.type = PR_LibSpec_Pathname;
libSpec.value.pathname = fullPathName;
lib = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL);
PORT_Free(fullPathName);
return lib;
}
static PRLibrary *
sftkdb_LoadLibrary(const char *libname)
{
PRLibrary *lib = NULL;
PRFuncPtr fn_addr;
char *parentLibPath = NULL;
fn_addr = (PRFuncPtr) &sftkdb_LoadLibrary;
parentLibPath = PR_GetLibraryFilePathname(SOFTOKEN_LIB_NAME, fn_addr);
if (!parentLibPath) {
goto done;
}
lib = sftkdb_LoadFromPath(parentLibPath, libname);
#ifdef XP_UNIX
/* handle symbolic link case */
if (!lib) {
char *trueParentLibPath = sftkdb_resolvePath(parentLibPath);
if (!trueParentLibPath) {
goto done;
}
lib = sftkdb_LoadFromPath(trueParentLibPath, libname);
PORT_Free(trueParentLibPath);
}
#endif
PORT_Free(parentLibPath);
done:
/* still couldn't load it, try the generic path */
if (!lib) {
PRLibSpec libSpec;
libSpec.type = PR_LibSpec_Pathname;
libSpec.value.pathname = libname;
lib = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL);
}
return lib;
}
static PRLibrary *legacy_glue_lib = NULL;
static SECStatus
sftkdbLoad_Legacy()
{
PRLibrary *lib = NULL;
LGSetCryptFunc setCryptFunction = NULL;
if (legacy_glue_lib) {
return SECSuccess;
}
lib = sftkdb_LoadLibrary(SHLIB_PREFIX"lgdbm"SHLIB_VERSION"."SHLIB_SUFFIX);
if (lib == NULL) {
return SECFailure;
}
legacy_glue_open = (LGOpenFunc)PR_FindFunctionSymbol(lib, "legacy_Open");
legacy_glue_readSecmod = (LGReadSecmodFunc) PR_FindFunctionSymbol(lib,
"legacy_ReadSecmodDB");
legacy_glue_releaseSecmod = (LGReleaseSecmodFunc) PR_FindFunctionSymbol(lib,
"legacy_ReleaseSecmodDBData");
legacy_glue_deleteSecmod = (LGDeleteSecmodFunc) PR_FindFunctionSymbol(lib,
"legacy_DeleteSecmodDB");
legacy_glue_addSecmod = (LGAddSecmodFunc)PR_FindFunctionSymbol(lib,
"legacy_AddSecmodDB");
legacy_glue_shutdown = (LGShutdownFunc) PR_FindFunctionSymbol(lib,
"legacy_Shutdown");
setCryptFunction = (LGSetCryptFunc) PR_FindFunctionSymbol(lib,
"legacy_SetCryptFunctions");
if (!legacy_glue_open || !legacy_glue_readSecmod ||
!legacy_glue_releaseSecmod || !legacy_glue_deleteSecmod ||
!legacy_glue_addSecmod || !setCryptFunction) {
PR_UnloadLibrary(lib);
return SECFailure;
}
setCryptFunction(sftkdb_encrypt_stub,sftkdb_decrypt_stub);
legacy_glue_lib = lib;
return SECSuccess;
}
CK_RV
sftkdbCall_open(const char *dir, const char *certPrefix, const char *keyPrefix,
int certVersion, int keyVersion, int flags,
SDB **certDB, SDB **keyDB)
{
SECStatus rv;
rv = sftkdbLoad_Legacy();
if (rv != SECSuccess) {
return CKR_GENERAL_ERROR;
}
if (!legacy_glue_open) {
PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
return SECFailure;
}
return (*legacy_glue_open)(dir, certPrefix, keyPrefix,
certVersion, keyVersion,
flags, certDB, keyDB);
}
char **
sftkdbCall_ReadSecmodDB(const char *appName, const char *filename,
const char *dbname, char *params, PRBool rw)
{
SECStatus rv;
rv = sftkdbLoad_Legacy();
if (rv != SECSuccess) {
return NULL;
}
if (!legacy_glue_readSecmod) {
PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
return NULL;
}
return (*legacy_glue_readSecmod)(appName, filename, dbname, params, rw);
}
SECStatus
sftkdbCall_ReleaseSecmodDBData(const char *appName,
const char *filename, const char *dbname,
char **moduleSpecList, PRBool rw)
{
SECStatus rv;
rv = sftkdbLoad_Legacy();
if (rv != SECSuccess) {
return rv;
}
if (!legacy_glue_releaseSecmod) {
PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
return SECFailure;
}
return (*legacy_glue_releaseSecmod)(appName, filename, dbname,
moduleSpecList, rw);
}
SECStatus
sftkdbCall_DeleteSecmodDB(const char *appName,
const char *filename, const char *dbname,
char *args, PRBool rw)
{
SECStatus rv;
rv = sftkdbLoad_Legacy();
if (rv != SECSuccess) {
return rv;
}
if (!legacy_glue_deleteSecmod) {
PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
return SECFailure;
}
return (*legacy_glue_deleteSecmod)(appName, filename, dbname, args, rw);
}
SECStatus
sftkdbCall_AddSecmodDB(const char *appName,
const char *filename, const char *dbname,
char *module, PRBool rw)
{
SECStatus rv;
rv = sftkdbLoad_Legacy();
if (rv != SECSuccess) {
return rv;
}
if (!legacy_glue_addSecmod) {
PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
return SECFailure;
}
return (*legacy_glue_addSecmod)(appName, filename, dbname, module, rw);
}
CK_RV
sftkdbCall_Shutdown(void)
{
CK_RV crv = CKR_OK;
if (legacy_glue_lib) {
return CKR_OK;
}
if (legacy_glue_shutdown) {
crv = (*legacy_glue_shutdown)();
}
PR_UnloadLibrary(legacy_glue_lib);
legacy_glue_lib = NULL;
legacy_glue_open = NULL;
legacy_glue_readSecmod = NULL;
legacy_glue_releaseSecmod = NULL;
legacy_glue_deleteSecmod = NULL;
legacy_glue_addSecmod = NULL;
return crv;
}

View File

@@ -1,92 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* This code defines the glue layer between softoken and the legacy DB library
*/
#include "sdb.h"
/*
* function prototypes for the callbacks into softoken from the legacyDB
*/
typedef SECStatus (*LGEncryptFunc)(PRArenaPool *arena, SDB *sdb,
SECItem *plainText, SECItem **cipherText);
typedef SECStatus (*LGDecryptFunc)(SDB *sdb, SECItem *cipherText,
SECItem **plainText);
/*
* function prototypes for the exported functions.
*/
typedef CK_RV (*LGOpenFunc) (const char *dir, const char *certPrefix,
const char *keyPrefix,
int certVersion, int keyVersion, int flags,
SDB **certDB, SDB **keyDB);
typedef char ** (*LGReadSecmodFunc)(const char *appName,
const char *filename,
const char *dbname, char *params, PRBool rw);
typedef SECStatus (*LGReleaseSecmodFunc)(const char *appName,
const char *filename,
const char *dbname, char **params, PRBool rw);
typedef SECStatus (*LGDeleteSecmodFunc)(const char *appName,
const char *filename,
const char *dbname, char *params, PRBool rw);
typedef SECStatus (*LGAddSecmodFunc)(const char *appName,
const char *filename,
const char *dbname, char *params, PRBool rw);
typedef SECStatus (*LGShutdownFunc)(void);
typedef void (*LGSetCryptFunc)(LGEncryptFunc, LGDecryptFunc);
/*
* Softoken Glue Functions
*/
CK_RV sftkdbCall_open(const char *dir, const char *certPrefix,
const char *keyPrefix,
int certVersion, int keyVersion, int flags,
SDB **certDB, SDB **keyDB);
char ** sftkdbCall_ReadSecmodDB(const char *appName, const char *filename,
const char *dbname, char *params, PRBool rw);
SECStatus sftkdbCall_ReleaseSecmodDBData(const char *appName,
const char *filename, const char *dbname,
char **moduleSpecList, PRBool rw);
SECStatus sftkdbCall_DeleteSecmodDB(const char *appName,
const char *filename, const char *dbname,
char *args, PRBool rw);
SECStatus sftkdbCall_AddSecmodDB(const char *appName,
const char *filename, const char *dbname,
char *module, PRBool rw);
CK_RV sftkdbCall_Shutdown(void);

View File

@@ -1,517 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "lowkeyi.h"
#include "secoid.h"
#include "secitem.h"
#include "secder.h"
#include "base64.h"
#include "secasn1.h"
#include "secerr.h"
#ifdef NSS_ENABLE_ECC
#include "softoken.h"
#endif
const SEC_ASN1Template nsslowkey_AttributeTemplate[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(NSSLOWKEYAttribute) },
{ SEC_ASN1_OBJECT_ID, offsetof(NSSLOWKEYAttribute, attrType) },
{ SEC_ASN1_SET_OF, offsetof(NSSLOWKEYAttribute, attrValue),
SEC_AnyTemplate },
{ 0 }
};
const SEC_ASN1Template nsslowkey_SetOfAttributeTemplate[] = {
{ SEC_ASN1_SET_OF, 0, nsslowkey_AttributeTemplate },
};
/* ASN1 Templates for new decoder/encoder */
const SEC_ASN1Template nsslowkey_PrivateKeyInfoTemplate[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(NSSLOWKEYPrivateKeyInfo) },
{ SEC_ASN1_INTEGER,
offsetof(NSSLOWKEYPrivateKeyInfo,version) },
{ SEC_ASN1_INLINE,
offsetof(NSSLOWKEYPrivateKeyInfo,algorithm),
SECOID_AlgorithmIDTemplate },
{ SEC_ASN1_OCTET_STRING,
offsetof(NSSLOWKEYPrivateKeyInfo,privateKey) },
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
offsetof(NSSLOWKEYPrivateKeyInfo, attributes),
nsslowkey_SetOfAttributeTemplate },
{ 0 }
};
const SEC_ASN1Template nsslowkey_PQGParamsTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(PQGParams) },
{ SEC_ASN1_INTEGER, offsetof(PQGParams,prime) },
{ SEC_ASN1_INTEGER, offsetof(PQGParams,subPrime) },
{ SEC_ASN1_INTEGER, offsetof(PQGParams,base) },
{ 0, }
};
const SEC_ASN1Template nsslowkey_RSAPrivateKeyTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(NSSLOWKEYPrivateKey) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.version) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.modulus) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.publicExponent) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.privateExponent) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.prime1) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.prime2) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.exponent1) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.exponent2) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.rsa.coefficient) },
{ 0 }
};
const SEC_ASN1Template nsslowkey_DSAPrivateKeyTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(NSSLOWKEYPrivateKey) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dsa.publicValue) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dsa.privateValue) },
{ 0, }
};
const SEC_ASN1Template nsslowkey_DSAPrivateKeyExportTemplate[] = {
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dsa.privateValue) },
};
const SEC_ASN1Template nsslowkey_DHPrivateKeyTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(NSSLOWKEYPrivateKey) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dh.publicValue) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dh.privateValue) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dh.base) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.dh.prime) },
{ 0, }
};
#ifdef NSS_ENABLE_ECC
/* XXX This is just a placeholder for later when we support
* generic curves and need full-blown support for parsing EC
* parameters. For now, we only support named curves in which
* EC params are simply encoded as an object ID and we don't
* use nsslowkey_ECParamsTemplate.
*/
const SEC_ASN1Template nsslowkey_ECParamsTemplate[] = {
{ SEC_ASN1_CHOICE, offsetof(ECParams,type), NULL, sizeof(ECParams) },
{ SEC_ASN1_OBJECT_ID, offsetof(ECParams,curveOID), NULL, ec_params_named },
{ 0, }
};
/* NOTE: The SECG specification allows the private key structure
* to contain curve parameters but recommends that they be stored
* in the PrivateKeyAlgorithmIdentifier field of the PrivateKeyInfo
* instead.
*/
const SEC_ASN1Template nsslowkey_ECPrivateKeyTemplate[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof(NSSLOWKEYPrivateKey) },
{ SEC_ASN1_INTEGER, offsetof(NSSLOWKEYPrivateKey,u.ec.version) },
{ SEC_ASN1_OCTET_STRING,
offsetof(NSSLOWKEYPrivateKey,u.ec.privateValue) },
/* XXX The following template works for now since we only
* support named curves for which the parameters are
* encoded as an object ID. When we support generic curves,
* we'll need to define nsslowkey_ECParamsTemplate
*/
#if 1
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED |
SEC_ASN1_EXPLICIT | SEC_ASN1_CONTEXT_SPECIFIC | 0,
offsetof(NSSLOWKEYPrivateKey,u.ec.ecParams.curveOID),
SEC_ObjectIDTemplate },
#else
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED |
SEC_ASN1_EXPLICIT | SEC_ASN1_CONTEXT_SPECIFIC | 0,
offsetof(NSSLOWKEYPrivateKey,u.ec.ecParams),
nsslowkey_ECParamsTemplate },
#endif
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED |
SEC_ASN1_EXPLICIT | SEC_ASN1_CONTEXT_SPECIFIC | 1,
offsetof(NSSLOWKEYPrivateKey,u.ec.publicValue),
SEC_BitStringTemplate },
{ 0, }
};
#endif /* NSS_ENABLE_ECC */
/*
* See bugzilla bug 125359
* Since NSS (via PKCS#11) wants to handle big integers as unsigned ints,
* all of the templates above that en/decode into integers must be converted
* from ASN.1's signed integer type. This is done by marking either the
* source or destination (encoding or decoding, respectively) type as
* siUnsignedInteger.
*/
void
prepare_low_rsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key)
{
key->u.rsa.modulus.type = siUnsignedInteger;
key->u.rsa.publicExponent.type = siUnsignedInteger;
key->u.rsa.privateExponent.type = siUnsignedInteger;
key->u.rsa.prime1.type = siUnsignedInteger;
key->u.rsa.prime2.type = siUnsignedInteger;
key->u.rsa.exponent1.type = siUnsignedInteger;
key->u.rsa.exponent2.type = siUnsignedInteger;
key->u.rsa.coefficient.type = siUnsignedInteger;
}
void
prepare_low_pqg_params_for_asn1(PQGParams *params)
{
params->prime.type = siUnsignedInteger;
params->subPrime.type = siUnsignedInteger;
params->base.type = siUnsignedInteger;
}
void
prepare_low_dsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key)
{
key->u.dsa.publicValue.type = siUnsignedInteger;
key->u.dsa.privateValue.type = siUnsignedInteger;
key->u.dsa.params.prime.type = siUnsignedInteger;
key->u.dsa.params.subPrime.type = siUnsignedInteger;
key->u.dsa.params.base.type = siUnsignedInteger;
}
void
prepare_low_dsa_priv_key_export_for_asn1(NSSLOWKEYPrivateKey *key)
{
key->u.dsa.privateValue.type = siUnsignedInteger;
}
void
prepare_low_dh_priv_key_for_asn1(NSSLOWKEYPrivateKey *key)
{
key->u.dh.prime.type = siUnsignedInteger;
key->u.dh.base.type = siUnsignedInteger;
key->u.dh.publicValue.type = siUnsignedInteger;
key->u.dh.privateValue.type = siUnsignedInteger;
}
#ifdef NSS_ENABLE_ECC
void
prepare_low_ecparams_for_asn1(ECParams *params)
{
params->DEREncoding.type = siUnsignedInteger;
params->curveOID.type = siUnsignedInteger;
}
void
prepare_low_ec_priv_key_for_asn1(NSSLOWKEYPrivateKey *key)
{
key->u.ec.version.type = siUnsignedInteger;
key->u.ec.ecParams.DEREncoding.type = siUnsignedInteger;
key->u.ec.ecParams.curveOID.type = siUnsignedInteger;
key->u.ec.privateValue.type = siUnsignedInteger;
key->u.ec.publicValue.type = siUnsignedInteger;
}
#endif /* NSS_ENABLE_ECC */
void
nsslowkey_DestroyPrivateKey(NSSLOWKEYPrivateKey *privk)
{
if (privk && privk->arena) {
PORT_FreeArena(privk->arena, PR_TRUE);
}
}
void
nsslowkey_DestroyPublicKey(NSSLOWKEYPublicKey *pubk)
{
if (pubk && pubk->arena) {
PORT_FreeArena(pubk->arena, PR_FALSE);
}
}
unsigned
nsslowkey_PublicModulusLen(NSSLOWKEYPublicKey *pubk)
{
unsigned char b0;
/* interpret modulus length as key strength... in
* fortezza that's the public key length */
switch (pubk->keyType) {
case NSSLOWKEYRSAKey:
b0 = pubk->u.rsa.modulus.data[0];
return b0 ? pubk->u.rsa.modulus.len : pubk->u.rsa.modulus.len - 1;
default:
break;
}
return 0;
}
unsigned
nsslowkey_PrivateModulusLen(NSSLOWKEYPrivateKey *privk)
{
unsigned char b0;
switch (privk->keyType) {
case NSSLOWKEYRSAKey:
b0 = privk->u.rsa.modulus.data[0];
return b0 ? privk->u.rsa.modulus.len : privk->u.rsa.modulus.len - 1;
default:
break;
}
return 0;
}
NSSLOWKEYPublicKey *
nsslowkey_ConvertToPublicKey(NSSLOWKEYPrivateKey *privk)
{
NSSLOWKEYPublicKey *pubk;
PLArenaPool *arena;
arena = PORT_NewArena (DER_DEFAULT_CHUNKSIZE);
if (arena == NULL) {
PORT_SetError (SEC_ERROR_NO_MEMORY);
return NULL;
}
switch(privk->keyType) {
case NSSLOWKEYRSAKey:
case NSSLOWKEYNullKey:
pubk = (NSSLOWKEYPublicKey *)PORT_ArenaZAlloc(arena,
sizeof (NSSLOWKEYPublicKey));
if (pubk != NULL) {
SECStatus rv;
pubk->arena = arena;
pubk->keyType = privk->keyType;
if (privk->keyType == NSSLOWKEYNullKey) return pubk;
rv = SECITEM_CopyItem(arena, &pubk->u.rsa.modulus,
&privk->u.rsa.modulus);
if (rv == SECSuccess) {
rv = SECITEM_CopyItem (arena, &pubk->u.rsa.publicExponent,
&privk->u.rsa.publicExponent);
if (rv == SECSuccess)
return pubk;
}
} else {
PORT_SetError (SEC_ERROR_NO_MEMORY);
}
break;
case NSSLOWKEYDSAKey:
pubk = (NSSLOWKEYPublicKey *)PORT_ArenaZAlloc(arena,
sizeof(NSSLOWKEYPublicKey));
if (pubk != NULL) {
SECStatus rv;
pubk->arena = arena;
pubk->keyType = privk->keyType;
rv = SECITEM_CopyItem(arena, &pubk->u.dsa.publicValue,
&privk->u.dsa.publicValue);
if (rv != SECSuccess) break;
rv = SECITEM_CopyItem(arena, &pubk->u.dsa.params.prime,
&privk->u.dsa.params.prime);
if (rv != SECSuccess) break;
rv = SECITEM_CopyItem(arena, &pubk->u.dsa.params.subPrime,
&privk->u.dsa.params.subPrime);
if (rv != SECSuccess) break;
rv = SECITEM_CopyItem(arena, &pubk->u.dsa.params.base,
&privk->u.dsa.params.base);
if (rv == SECSuccess) return pubk;
}
break;
case NSSLOWKEYDHKey:
pubk = (NSSLOWKEYPublicKey *)PORT_ArenaZAlloc(arena,
sizeof(NSSLOWKEYPublicKey));
if (pubk != NULL) {
SECStatus rv;
pubk->arena = arena;
pubk->keyType = privk->keyType;
rv = SECITEM_CopyItem(arena, &pubk->u.dh.publicValue,
&privk->u.dh.publicValue);
if (rv != SECSuccess) break;
rv = SECITEM_CopyItem(arena, &pubk->u.dh.prime,
&privk->u.dh.prime);
if (rv != SECSuccess) break;
rv = SECITEM_CopyItem(arena, &pubk->u.dh.base,
&privk->u.dh.base);
if (rv == SECSuccess) return pubk;
}
break;
#ifdef NSS_ENABLE_ECC
case NSSLOWKEYECKey:
pubk = (NSSLOWKEYPublicKey *)PORT_ArenaZAlloc(arena,
sizeof(NSSLOWKEYPublicKey));
if (pubk != NULL) {
SECStatus rv;
pubk->arena = arena;
pubk->keyType = privk->keyType;
rv = SECITEM_CopyItem(arena, &pubk->u.ec.publicValue,
&privk->u.ec.publicValue);
if (rv != SECSuccess) break;
pubk->u.ec.ecParams.arena = arena;
/* Copy the rest of the params */
rv = EC_CopyParams(arena, &(pubk->u.ec.ecParams),
&(privk->u.ec.ecParams));
if (rv == SECSuccess) return pubk;
}
break;
#endif /* NSS_ENABLE_ECC */
/* No Fortezza in Low Key implementations (Fortezza keys aren't
* stored in our data base */
default:
break;
}
PORT_FreeArena (arena, PR_FALSE);
return NULL;
}
NSSLOWKEYPrivateKey *
nsslowkey_CopyPrivateKey(NSSLOWKEYPrivateKey *privKey)
{
NSSLOWKEYPrivateKey *returnKey = NULL;
SECStatus rv = SECFailure;
PLArenaPool *poolp;
if(!privKey) {
return NULL;
}
poolp = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
if(!poolp) {
return NULL;
}
returnKey = (NSSLOWKEYPrivateKey*)PORT_ArenaZAlloc(poolp, sizeof(NSSLOWKEYPrivateKey));
if(!returnKey) {
rv = SECFailure;
goto loser;
}
returnKey->keyType = privKey->keyType;
returnKey->arena = poolp;
switch(privKey->keyType) {
case NSSLOWKEYRSAKey:
rv = SECITEM_CopyItem(poolp, &(returnKey->u.rsa.modulus),
&(privKey->u.rsa.modulus));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.rsa.version),
&(privKey->u.rsa.version));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.rsa.publicExponent),
&(privKey->u.rsa.publicExponent));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.rsa.privateExponent),
&(privKey->u.rsa.privateExponent));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.rsa.prime1),
&(privKey->u.rsa.prime1));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.rsa.prime2),
&(privKey->u.rsa.prime2));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.rsa.exponent1),
&(privKey->u.rsa.exponent1));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.rsa.exponent2),
&(privKey->u.rsa.exponent2));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.rsa.coefficient),
&(privKey->u.rsa.coefficient));
if(rv != SECSuccess) break;
break;
case NSSLOWKEYDSAKey:
rv = SECITEM_CopyItem(poolp, &(returnKey->u.dsa.publicValue),
&(privKey->u.dsa.publicValue));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.dsa.privateValue),
&(privKey->u.dsa.privateValue));
if(rv != SECSuccess) break;
returnKey->u.dsa.params.arena = poolp;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.dsa.params.prime),
&(privKey->u.dsa.params.prime));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.dsa.params.subPrime),
&(privKey->u.dsa.params.subPrime));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.dsa.params.base),
&(privKey->u.dsa.params.base));
if(rv != SECSuccess) break;
break;
case NSSLOWKEYDHKey:
rv = SECITEM_CopyItem(poolp, &(returnKey->u.dh.publicValue),
&(privKey->u.dh.publicValue));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.dh.privateValue),
&(privKey->u.dh.privateValue));
if(rv != SECSuccess) break;
returnKey->u.dsa.params.arena = poolp;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.dh.prime),
&(privKey->u.dh.prime));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.dh.base),
&(privKey->u.dh.base));
if(rv != SECSuccess) break;
break;
#ifdef NSS_ENABLE_ECC
case NSSLOWKEYECKey:
rv = SECITEM_CopyItem(poolp, &(returnKey->u.ec.version),
&(privKey->u.ec.version));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.ec.publicValue),
&(privKey->u.ec.publicValue));
if(rv != SECSuccess) break;
rv = SECITEM_CopyItem(poolp, &(returnKey->u.ec.privateValue),
&(privKey->u.ec.privateValue));
if(rv != SECSuccess) break;
returnKey->u.ec.ecParams.arena = poolp;
/* Copy the rest of the params */
rv = EC_CopyParams(poolp, &(returnKey->u.ec.ecParams),
&(privKey->u.ec.ecParams));
if (rv != SECSuccess) break;
break;
#endif /* NSS_ENABLE_ECC */
default:
rv = SECFailure;
}
loser:
if(rv != SECSuccess) {
PORT_FreeArena(poolp, PR_TRUE);
returnKey = NULL;
}
return returnKey;
}

View File

@@ -1,108 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: lowkeyi.h,v 1.10.70.3 2007-02-28 20:44:54 rrelyea%redhat.com Exp $ */
#ifndef _LOWKEYI_H_
#define _LOWKEYI_H_
#include "prtypes.h"
#include "seccomon.h"
#include "secoidt.h"
#include "lowkeyti.h"
SEC_BEGIN_PROTOS
/*
* See bugzilla bug 125359
* Since NSS (via PKCS#11) wants to handle big integers as unsigned ints,
* all of the templates above that en/decode into integers must be converted
* from ASN.1's signed integer type. This is done by marking either the
* source or destination (encoding or decoding, respectively) type as
* siUnsignedInteger.
*/
extern void prepare_low_rsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key);
extern void prepare_low_pqg_params_for_asn1(PQGParams *params);
extern void prepare_low_dsa_priv_key_for_asn1(NSSLOWKEYPrivateKey *key);
extern void prepare_low_dsa_priv_key_export_for_asn1(NSSLOWKEYPrivateKey *key);
extern void prepare_low_dh_priv_key_for_asn1(NSSLOWKEYPrivateKey *key);
#ifdef NSS_ENABLE_ECC
extern void prepare_low_ec_priv_key_for_asn1(NSSLOWKEYPrivateKey *key);
extern void prepare_low_ecparams_for_asn1(ECParams *params);
#endif /* NSS_ENABLE_ECC */
/*
** Destroy a private key object.
** "key" the object
** "freeit" if PR_TRUE then free the object as well as its sub-objects
*/
extern void nsslowkey_DestroyPrivateKey(NSSLOWKEYPrivateKey *key);
/*
** Destroy a public key object.
** "key" the object
** "freeit" if PR_TRUE then free the object as well as its sub-objects
*/
extern void nsslowkey_DestroyPublicKey(NSSLOWKEYPublicKey *key);
/*
** Return the modulus length of "pubKey".
*/
extern unsigned int nsslowkey_PublicModulusLen(NSSLOWKEYPublicKey *pubKey);
/*
** Return the modulus length of "privKey".
*/
extern unsigned int nsslowkey_PrivateModulusLen(NSSLOWKEYPrivateKey *privKey);
/*
** Convert a low private key "privateKey" into a public low key
*/
extern NSSLOWKEYPublicKey
*nsslowkey_ConvertToPublicKey(NSSLOWKEYPrivateKey *privateKey);
/* Make a copy of a low private key in it's own arena.
* a return of NULL indicates an error.
*/
extern NSSLOWKEYPrivateKey *
nsslowkey_CopyPrivateKey(NSSLOWKEYPrivateKey *privKey);
SEC_END_PROTOS
#endif /* _LOWKEYI_H_ */

View File

@@ -1,127 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _LOWKEYTI_H_
#define _LOWKEYTI_H_ 1
#include "blapit.h"
#include "prtypes.h"
#include "plarena.h"
#include "secitem.h"
#include "secasn1t.h"
#include "secoidt.h"
/*
** Typedef for callback to get a password "key".
*/
extern const SEC_ASN1Template nsslowkey_PQGParamsTemplate[];
extern const SEC_ASN1Template nsslowkey_RSAPrivateKeyTemplate[];
extern const SEC_ASN1Template nsslowkey_DSAPrivateKeyTemplate[];
extern const SEC_ASN1Template nsslowkey_DSAPrivateKeyExportTemplate[];
extern const SEC_ASN1Template nsslowkey_DHPrivateKeyTemplate[];
extern const SEC_ASN1Template nsslowkey_DHPrivateKeyExportTemplate[];
#ifdef NSS_ENABLE_ECC
#define NSSLOWKEY_EC_PRIVATE_KEY_VERSION 1 /* as per SECG 1 C.4 */
extern const SEC_ASN1Template nsslowkey_ECParamsTemplate[];
extern const SEC_ASN1Template nsslowkey_ECPrivateKeyTemplate[];
#endif /* NSS_ENABLE_ECC */
extern const SEC_ASN1Template nsslowkey_PrivateKeyInfoTemplate[];
extern const SEC_ASN1Template nsslowkey_EncryptedPrivateKeyInfoTemplate[];
/*
* PKCS #8 attributes
*/
struct NSSLOWKEYAttributeStr {
SECItem attrType;
SECItem *attrValue;
};
typedef struct NSSLOWKEYAttributeStr NSSLOWKEYAttribute;
/*
** A PKCS#8 private key info object
*/
struct NSSLOWKEYPrivateKeyInfoStr {
PLArenaPool *arena;
SECItem version;
SECAlgorithmID algorithm;
SECItem privateKey;
NSSLOWKEYAttribute **attributes;
};
typedef struct NSSLOWKEYPrivateKeyInfoStr NSSLOWKEYPrivateKeyInfo;
#define NSSLOWKEY_PRIVATE_KEY_INFO_VERSION 0 /* what we *create* */
typedef enum {
NSSLOWKEYNullKey = 0,
NSSLOWKEYRSAKey = 1,
NSSLOWKEYDSAKey = 2,
NSSLOWKEYDHKey = 4,
NSSLOWKEYECKey = 5
} NSSLOWKEYType;
/*
** An RSA public key object.
*/
struct NSSLOWKEYPublicKeyStr {
PLArenaPool *arena;
NSSLOWKEYType keyType ;
union {
RSAPublicKey rsa;
DSAPublicKey dsa;
DHPublicKey dh;
ECPublicKey ec;
} u;
};
typedef struct NSSLOWKEYPublicKeyStr NSSLOWKEYPublicKey;
/*
** Low Level private key object
** This is only used by the raw Crypto engines (crypto), keydb (keydb),
** and PKCS #11. Everyone else uses the high level key structure.
*/
struct NSSLOWKEYPrivateKeyStr {
PLArenaPool *arena;
NSSLOWKEYType keyType;
union {
RSAPrivateKey rsa;
DSAPrivateKey dsa;
DHPrivateKey dh;
ECPrivateKey ec;
} u;
};
typedef struct NSSLOWKEYPrivateKeyStr NSSLOWKEYPrivateKey;
#endif /* _LOWKEYTI_H_ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,135 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _SECPKCS5_H_
#define _SECPKCS5_H_
#include "plarena.h"
#include "secitem.h"
#include "seccomon.h"
#include "secoidt.h"
#include "hasht.h"
typedef SECItem * (* SEC_PKCS5GetPBEPassword)(void *arg);
/* used for V2 PKCS 12 Draft Spec */
typedef enum {
pbeBitGenIDNull = 0,
pbeBitGenCipherKey = 0x01,
pbeBitGenCipherIV = 0x02,
pbeBitGenIntegrityKey = 0x03
} PBEBitGenID;
typedef enum {
NSSPKCS5_PBKDF1 = 0,
NSSPKCS5_PBKDF2 = 1,
NSSPKCS5_PKCS12_V2 = 2
} NSSPKCS5PBEType;
typedef struct NSSPKCS5PBEParameterStr NSSPKCS5PBEParameter;
struct NSSPKCS5PBEParameterStr {
PRArenaPool *poolp;
SECItem salt; /* octet string */
SECItem iteration; /* integer */
/* used locally */
int iter;
int keyLen;
int ivLen;
HASH_HashType hashType;
NSSPKCS5PBEType pbeType;
PBEBitGenID keyID;
SECOidTag encAlg;
PRBool is2KeyDES;
};
SEC_BEGIN_PROTOS
/* Create a PKCS5 Algorithm ID
* The algorithm ID is set up using the PKCS #5 parameter structure
* algorithm is the PBE algorithm ID for the desired algorithm
* pbe is a pbe param block with all the info needed to create the
* algorithm id.
* If an error occurs or the algorithm specified is not supported
* or is not a password based encryption algorithm, NULL is returned.
* Otherwise, a pointer to the algorithm id is returned.
*/
extern SECAlgorithmID *
nsspkcs5_CreateAlgorithmID(PRArenaPool *arena, SECOidTag algorithm,
NSSPKCS5PBEParameter *pbe);
/*
* Convert an Algorithm ID to a PBE Param.
* NOTE: this does not suppport PKCS 5 v2 because it's only used for the
* keyDB which only support PKCS 5 v1, PFX, and PKCS 12.
*/
NSSPKCS5PBEParameter *
nsspkcs5_AlgidToParam(SECAlgorithmID *algid);
/*
* Convert an Algorithm ID to a PBE Param.
* NOTE: this does not suppport PKCS 5 v2 because it's only used for the
* keyDB which only support PKCS 5 v1, PFX, and PKCS 12.
*/
NSSPKCS5PBEParameter *
nsspkcs5_NewParam(SECOidTag alg, SECItem *salt, int iterator);
/* Encrypt/Decrypt data using password based encryption.
* algid is the PBE algorithm identifier,
* pwitem is the password,
* src is the source for encryption/decryption,
* encrypt is PR_TRUE for encryption, PR_FALSE for decryption.
* The key and iv are generated based upon PKCS #5 then the src
* is either encrypted or decrypted. If an error occurs, NULL
* is returned, otherwise the ciphered contents is returned.
*/
extern SECItem *
nsspkcs5_CipherData(NSSPKCS5PBEParameter *, SECItem *pwitem,
SECItem *src, PRBool encrypt, PRBool *update);
extern SECItem *
nsspkcs5_ComputeKeyAndIV(NSSPKCS5PBEParameter *, SECItem *pwitem,
SECItem *iv, PRBool faulty3DES);
/* Destroys PBE parameter */
extern void
nsspkcs5_DestroyPBEParameter(NSSPKCS5PBEParameter *param);
SEC_END_PROTOS
#endif

View File

@@ -1,98 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Netscape security libraries.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1994-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
CORE_DEPTH = ../../..
MODULE = nss
DIRS = legacydb
REQUIRES = dbm
LIBRARY_NAME = softokn
LIBRARY_VERSION = 3
MAPFILE = $(OBJDIR)/softokn.def
DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" -DSOFTOKEN_LIB_NAME=\"$(notdir $(SHARED_LIBRARY))\" -DSHLIB_VERSION=\"$(LIBRARY_VERSION)\"
EXPORTS = \
pkcs11.h \
pkcs11f.h \
pkcs11p.h \
pkcs11t.h \
pkcs11n.h \
pkcs11u.h \
sdb.h \
sftkdbt.h \
$(NULL)
PRIVATE_EXPORTS = \
lgglue.h \
pk11pars.h \
pkcs11ni.h \
softoken.h \
softoknt.h \
softkver.h \
$(NULL)
CSRCS = \
ecdecode.c \
fipsaudt.c \
fipstest.c \
fipstokn.c \
lgglue.c \
lowkey.c \
lowpbe.c \
padbuf.c \
pkcs11.c \
pkcs11c.c \
pkcs11u.c \
rsawrapr.c \
sdb.c \
sftkdb.c \
sftkpars.c \
softkver.c \
tlsprf.c \
$(NULL)
ifdef NSS_ENABLE_ECC
DEFINES += -DNSS_ENABLE_ECC
endif
ifdef SQLITE_UNSAFE_THREADS
DEFINES += -DSQLITE_UNSAFE_THREADS
endif

View File

@@ -1,80 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "blapit.h"
#include "secport.h"
#include "secerr.h"
/*
* Prepare a buffer for DES encryption, growing to the appropriate boundary,
* filling with the appropriate padding.
*
* NOTE: If arena is non-NULL, we re-allocate from there, otherwise
* we assume (and use) XP memory (re)allocation.
*/
unsigned char *
DES_PadBuffer(PRArenaPool *arena, unsigned char *inbuf, unsigned int inlen,
unsigned int *outlen)
{
unsigned char *outbuf;
unsigned int des_len;
unsigned int i;
unsigned char des_pad_len;
/*
* We need from 1 to DES_KEY_LENGTH bytes -- we *always* grow.
* The extra bytes contain the value of the length of the padding:
* if we have 2 bytes of padding, then the padding is "0x02, 0x02".
*/
des_len = (inlen + DES_KEY_LENGTH) & ~(DES_KEY_LENGTH - 1);
if (arena != NULL) {
outbuf = (unsigned char*)PORT_ArenaGrow (arena, inbuf, inlen, des_len);
} else {
outbuf = (unsigned char*)PORT_Realloc (inbuf, des_len);
}
if (outbuf == NULL) {
PORT_SetError (SEC_ERROR_NO_MEMORY);
return NULL;
}
des_pad_len = des_len - inlen;
for (i = inlen; i < des_len; i++)
outbuf[i] = des_pad_len;
*outlen = des_len;
return outbuf;
}

View File

@@ -1,871 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* The following handles the loading, unloading and management of
* various PCKS #11 modules
*/
/*
* this header file contains routines for parsing PKCS #11 module spec
* strings. It contains 'C' code and should only be included in one module.
* Currently it is included in both softoken and the wrapper.
*/
#include <ctype.h>
#include "pkcs11.h"
#include "seccomon.h"
#include "prprf.h"
#include "secmodt.h"
#include "pk11init.h"
#define SECMOD_ARG_LIBRARY_PARAMETER "library="
#define SECMOD_ARG_NAME_PARAMETER "name="
#define SECMOD_ARG_MODULE_PARAMETER "parameters="
#define SECMOD_ARG_NSS_PARAMETER "NSS="
#define SECMOD_ARG_FORTEZZA_FLAG "FORTEZZA"
#define SECMOD_ARG_ESCAPE '\\'
struct secmodargSlotFlagTable {
char *name;
int len;
unsigned long value;
};
#define SECMOD_DEFAULT_CIPHER_ORDER 0
#define SECMOD_DEFAULT_TRUST_ORDER 50
#define SECMOD_ARG_ENTRY(arg,flag) \
{ #arg , sizeof(#arg)-1, flag }
static struct secmodargSlotFlagTable secmod_argSlotFlagTable[] = {
SECMOD_ARG_ENTRY(RSA,SECMOD_RSA_FLAG),
SECMOD_ARG_ENTRY(DSA,SECMOD_RSA_FLAG),
SECMOD_ARG_ENTRY(RC2,SECMOD_RC4_FLAG),
SECMOD_ARG_ENTRY(RC4,SECMOD_RC2_FLAG),
SECMOD_ARG_ENTRY(DES,SECMOD_DES_FLAG),
SECMOD_ARG_ENTRY(DH,SECMOD_DH_FLAG),
SECMOD_ARG_ENTRY(FORTEZZA,SECMOD_FORTEZZA_FLAG),
SECMOD_ARG_ENTRY(RC5,SECMOD_RC5_FLAG),
SECMOD_ARG_ENTRY(SHA1,SECMOD_SHA1_FLAG),
SECMOD_ARG_ENTRY(MD5,SECMOD_MD5_FLAG),
SECMOD_ARG_ENTRY(MD2,SECMOD_MD2_FLAG),
SECMOD_ARG_ENTRY(SSL,SECMOD_SSL_FLAG),
SECMOD_ARG_ENTRY(TLS,SECMOD_TLS_FLAG),
SECMOD_ARG_ENTRY(AES,SECMOD_AES_FLAG),
SECMOD_ARG_ENTRY(Camellia,SECMOD_CAMELLIA_FLAG),
SECMOD_ARG_ENTRY(PublicCerts,SECMOD_FRIENDLY_FLAG),
SECMOD_ARG_ENTRY(RANDOM,SECMOD_RANDOM_FLAG),
};
#define SECMOD_HANDLE_STRING_ARG(param,target,value,command) \
if (PORT_Strncasecmp(param,value,sizeof(value)-1) == 0) { \
param += sizeof(value)-1; \
if (target) PORT_Free(target); \
target = secmod_argFetchValue(param,&next); \
param += next; \
command ;\
} else
#define SECMOD_HANDLE_FINAL_ARG(param) \
{ param = secmod_argSkipParameter(param); } param = secmod_argStrip(param);
static int secmod_argSlotFlagTableSize =
sizeof(secmod_argSlotFlagTable)/sizeof(secmod_argSlotFlagTable[0]);
static PRBool secmod_argGetPair(char c) {
switch (c) {
case '\'': return c;
case '\"': return c;
case '<': return '>';
case '{': return '}';
case '[': return ']';
case '(': return ')';
default: break;
}
return ' ';
}
static PRBool secmod_argIsBlank(char c) {
return isspace(c);
}
static PRBool secmod_argIsEscape(char c) {
return c == '\\';
}
static PRBool secmod_argIsQuote(char c) {
switch (c) {
case '\'':
case '\"':
case '<':
case '{': /* } end curly to keep vi bracket matching working */
case '(': /* ) */
case '[': /* ] */ return PR_TRUE;
default: break;
}
return PR_FALSE;
}
static PRBool secmod_argHasChar(char *v, char c)
{
for ( ;*v; v++) {
if (*v == c) return PR_TRUE;
}
return PR_FALSE;
}
static PRBool secmod_argHasBlanks(char *v)
{
for ( ;*v; v++) {
if (secmod_argIsBlank(*v)) return PR_TRUE;
}
return PR_FALSE;
}
static char *secmod_argStrip(char *c) {
while (*c && secmod_argIsBlank(*c)) c++;
return c;
}
static char *
secmod_argFindEnd(char *string) {
char endChar = ' ';
PRBool lastEscape = PR_FALSE;
if (secmod_argIsQuote(*string)) {
endChar = secmod_argGetPair(*string);
string++;
}
for (;*string; string++) {
if (lastEscape) {
lastEscape = PR_FALSE;
continue;
}
if (secmod_argIsEscape(*string) && !lastEscape) {
lastEscape = PR_TRUE;
continue;
}
if ((endChar == ' ') && secmod_argIsBlank(*string)) break;
if (*string == endChar) {
break;
}
}
return string;
}
static char *
secmod_argFetchValue(char *string, int *pcount)
{
char *end = secmod_argFindEnd(string);
char *retString, *copyString;
PRBool lastEscape = PR_FALSE;
int len;
len = end - string;
if (len == 0) {
*pcount = 0;
return NULL;
}
copyString = retString = (char *)PORT_Alloc(len+1);
if (*end) len++;
*pcount = len;
if (retString == NULL) return NULL;
if (secmod_argIsQuote(*string)) string++;
for (; string < end; string++) {
if (secmod_argIsEscape(*string) && !lastEscape) {
lastEscape = PR_TRUE;
continue;
}
lastEscape = PR_FALSE;
*copyString++ = *string;
}
*copyString = 0;
return retString;
}
static char *
secmod_argSkipParameter(char *string)
{
char *end;
/* look for the end of the <name>= */
for (;*string; string++) {
if (*string == '=') { string++; break; }
if (secmod_argIsBlank(*string)) return(string);
}
end = secmod_argFindEnd(string);
if (*end) end++;
return end;
}
static SECStatus
secmod_argParseModuleSpec(char *modulespec, char **lib, char **mod,
char **parameters, char **nss)
{
int next;
modulespec = secmod_argStrip(modulespec);
*lib = *mod = *parameters = *nss = 0;
while (*modulespec) {
SECMOD_HANDLE_STRING_ARG(modulespec,*lib,SECMOD_ARG_LIBRARY_PARAMETER,;)
SECMOD_HANDLE_STRING_ARG(modulespec,*mod,SECMOD_ARG_NAME_PARAMETER,;)
SECMOD_HANDLE_STRING_ARG(modulespec,*parameters,
SECMOD_ARG_MODULE_PARAMETER,;)
SECMOD_HANDLE_STRING_ARG(modulespec,*nss,SECMOD_ARG_NSS_PARAMETER,;)
SECMOD_HANDLE_FINAL_ARG(modulespec)
}
return SECSuccess;
}
static char *
secmod_argGetParamValue(char *paramName,char *parameters)
{
char searchValue[256];
int paramLen = strlen(paramName);
char *returnValue = NULL;
int next;
if ((parameters == NULL) || (*parameters == 0)) return NULL;
PORT_Assert(paramLen+2 < sizeof(searchValue));
PORT_Strcpy(searchValue,paramName);
PORT_Strcat(searchValue,"=");
while (*parameters) {
if (PORT_Strncasecmp(parameters,searchValue,paramLen+1) == 0) {
parameters += paramLen+1;
returnValue = secmod_argFetchValue(parameters,&next);
break;
} else {
parameters = secmod_argSkipParameter(parameters);
}
parameters = secmod_argStrip(parameters);
}
return returnValue;
}
static char *
secmod_argNextFlag(char *flags)
{
for (; *flags ; flags++) {
if (*flags == ',') {
flags++;
break;
}
}
return flags;
}
static PRBool
secmod_argHasFlag(char *label, char *flag, char *parameters)
{
char *flags,*index;
int len = strlen(flag);
PRBool found = PR_FALSE;
flags = secmod_argGetParamValue(label,parameters);
if (flags == NULL) return PR_FALSE;
for (index=flags; *index; index=secmod_argNextFlag(index)) {
if (PORT_Strncasecmp(index,flag,len) == 0) {
found=PR_TRUE;
break;
}
}
PORT_Free(flags);
return found;
}
static void
secmod_argSetNewCipherFlags(unsigned long *newCiphers,char *cipherList)
{
newCiphers[0] = newCiphers[1] = 0;
if ((cipherList == NULL) || (*cipherList == 0)) return;
for (;*cipherList; cipherList=secmod_argNextFlag(cipherList)) {
if (PORT_Strncasecmp(cipherList,SECMOD_ARG_FORTEZZA_FLAG,
sizeof(SECMOD_ARG_FORTEZZA_FLAG)-1) == 0) {
newCiphers[0] |= SECMOD_FORTEZZA_FLAG;
}
/* add additional flags here as necessary */
/* direct bit mapping escape */
if (*cipherList == 0) {
if (cipherList[1] == 'l') {
newCiphers[1] |= atoi(&cipherList[2]);
} else {
newCiphers[0] |= atoi(&cipherList[2]);
}
}
}
}
/*
* decode a number. handle octal (leading '0'), hex (leading '0x') or decimal
*/
static long
secmod_argDecodeNumber(char *num)
{
int radix = 10;
unsigned long value = 0;
long retValue = 0;
int sign = 1;
int digit;
if (num == NULL) return retValue;
num = secmod_argStrip(num);
if (*num == '-') {
sign = -1;
num++;
}
if (*num == '0') {
radix = 8;
num++;
if ((*num == 'x') || (*num == 'X')) {
radix = 16;
num++;
}
}
for ( ;*num; num++ ) {
if (isdigit(*num)) {
digit = *num - '0';
} else if ((*num >= 'a') && (*num <= 'f')) {
digit = *num - 'a' + 10;
} else if ((*num >= 'A') && (*num <= 'F')) {
digit = *num - 'A' + 10;
} else {
break;
}
if (digit >= radix) break;
value = value*radix + digit;
}
retValue = ((int) value) * sign;
return retValue;
}
static long
secmod_argReadLong(char *label,char *params, long defValue, PRBool *isdefault)
{
char *value;
long retValue;
if (isdefault) *isdefault = PR_FALSE;
value = secmod_argGetParamValue(label,params);
if (value == NULL) {
if (isdefault) *isdefault = PR_TRUE;
return defValue;
}
retValue = secmod_argDecodeNumber(value);
if (value) PORT_Free(value);
return retValue;
}
static unsigned long
secmod_argSlotFlags(char *label,char *params)
{
char *flags,*index;
unsigned long retValue = 0;
int i;
PRBool all = PR_FALSE;
flags = secmod_argGetParamValue(label,params);
if (flags == NULL) return 0;
if (PORT_Strcasecmp(flags,"all") == 0) all = PR_TRUE;
for (index=flags; *index; index=secmod_argNextFlag(index)) {
for (i=0; i < secmod_argSlotFlagTableSize; i++) {
if (all || (PORT_Strncasecmp(index, secmod_argSlotFlagTable[i].name,
secmod_argSlotFlagTable[i].len) == 0)) {
retValue |= secmod_argSlotFlagTable[i].value;
}
}
}
PORT_Free(flags);
return retValue;
}
static void
secmod_argDecodeSingleSlotInfo(char *name, char *params,
PK11PreSlotInfo *slotInfo)
{
char *askpw;
slotInfo->slotID=secmod_argDecodeNumber(name);
slotInfo->defaultFlags=secmod_argSlotFlags("slotFlags",params);
slotInfo->timeout=secmod_argReadLong("timeout",params, 0, NULL);
askpw = secmod_argGetParamValue("askpw",params);
slotInfo->askpw = 0;
if (askpw) {
if (PORT_Strcasecmp(askpw,"every") == 0) {
slotInfo->askpw = -1;
} else if (PORT_Strcasecmp(askpw,"timeout") == 0) {
slotInfo->askpw = 1;
}
PORT_Free(askpw);
slotInfo->defaultFlags |= PK11_OWN_PW_DEFAULTS;
}
slotInfo->hasRootCerts = secmod_argHasFlag("rootFlags", "hasRootCerts",
params);
slotInfo->hasRootTrust = secmod_argHasFlag("rootFlags", "hasRootTrust",
params);
}
static char *
secmod_argGetName(char *inString, int *next)
{
char *name=NULL;
char *string;
int len;
/* look for the end of the <name>= */
for (string = inString;*string; string++) {
if (*string == '=') { break; }
if (secmod_argIsBlank(*string)) break;
}
len = string - inString;
*next = len;
if (*string == '=') (*next) += 1;
if (len > 0) {
name = PORT_Alloc(len+1);
PORT_Strncpy(name,inString,len);
name[len] = 0;
}
return name;
}
static PK11PreSlotInfo *
secmod_argParseSlotInfo(PRArenaPool *arena, char *slotParams, int *retCount)
{
char *slotIndex;
PK11PreSlotInfo *slotInfo = NULL;
int i=0,count = 0,next;
*retCount = 0;
if ((slotParams == NULL) || (*slotParams == 0)) return NULL;
/* first count the number of slots */
for (slotIndex = secmod_argStrip(slotParams); *slotIndex;
slotIndex = secmod_argStrip(secmod_argSkipParameter(slotIndex))) {
count++;
}
/* get the data structures */
if (arena) {
slotInfo = (PK11PreSlotInfo *)
PORT_ArenaAlloc(arena,count*sizeof(PK11PreSlotInfo));
PORT_Memset(slotInfo,0,count*sizeof(PK11PreSlotInfo));
} else {
slotInfo = (PK11PreSlotInfo *)
PORT_ZAlloc(count*sizeof(PK11PreSlotInfo));
}
if (slotInfo == NULL) return NULL;
for (slotIndex = secmod_argStrip(slotParams), i = 0;
*slotIndex && i < count ; ) {
char *name;
name = secmod_argGetName(slotIndex,&next);
slotIndex += next;
if (!secmod_argIsBlank(*slotIndex)) {
char *args = secmod_argFetchValue(slotIndex,&next);
slotIndex += next;
if (args) {
secmod_argDecodeSingleSlotInfo(name,args,&slotInfo[i]);
i++;
PORT_Free(args);
}
}
if (name) PORT_Free(name);
slotIndex = secmod_argStrip(slotIndex);
}
*retCount = i;
return slotInfo;
}
static char *secmod_nullString = "";
static char *
secmod_formatValue(PRArenaPool *arena, char *value, char quote)
{
char *vp,*vp2,*retval;
int size = 0, escapes = 0;
for (vp=value; *vp ;vp++) {
if ((*vp == quote) || (*vp == SECMOD_ARG_ESCAPE)) escapes++;
size++;
}
if (arena) {
retval = PORT_ArenaZAlloc(arena,size+escapes+1);
} else {
retval = PORT_ZAlloc(size+escapes+1);
}
if (retval == NULL) return NULL;
vp2 = retval;
for (vp=value; *vp; vp++) {
if ((*vp == quote) || (*vp == SECMOD_ARG_ESCAPE))
*vp2++ = SECMOD_ARG_ESCAPE;
*vp2++ = *vp;
}
return retval;
}
static char *secmod_formatPair(char *name,char *value, char quote)
{
char openQuote = quote;
char closeQuote = secmod_argGetPair(quote);
char *newValue = NULL;
char *returnValue;
PRBool need_quote = PR_FALSE;
if (!value || (*value == 0)) return secmod_nullString;
if (secmod_argHasBlanks(value) || secmod_argIsQuote(value[0]))
need_quote=PR_TRUE;
if ((need_quote && secmod_argHasChar(value,closeQuote))
|| secmod_argHasChar(value,SECMOD_ARG_ESCAPE)) {
value = newValue = secmod_formatValue(NULL, value,quote);
if (newValue == NULL) return secmod_nullString;
}
if (need_quote) {
returnValue = PR_smprintf("%s=%c%s%c",name,openQuote,value,closeQuote);
} else {
returnValue = PR_smprintf("%s=%s",name,value);
}
if (returnValue == NULL) returnValue = secmod_nullString;
if (newValue) PORT_Free(newValue);
return returnValue;
}
static char *secmod_formatIntPair(char *name, unsigned long value,
unsigned long def)
{
char *returnValue;
if (value == def) return secmod_nullString;
returnValue = PR_smprintf("%s=%d",name,value);
return returnValue;
}
static void
secmod_freePair(char *pair)
{
if (pair && pair != secmod_nullString) {
PR_smprintf_free(pair);
}
}
#define MAX_FLAG_SIZE sizeof("internal")+sizeof("FIPS")+sizeof("moduleDB")+\
sizeof("moduleDBOnly")+sizeof("critical")
static char *
secmod_mkNSSFlags(PRBool internal, PRBool isFIPS,
PRBool isModuleDB, PRBool isModuleDBOnly, PRBool isCritical)
{
char *flags = (char *)PORT_ZAlloc(MAX_FLAG_SIZE);
PRBool first = PR_TRUE;
PORT_Memset(flags,0,MAX_FLAG_SIZE);
if (internal) {
PORT_Strcat(flags,"internal");
first = PR_FALSE;
}
if (isFIPS) {
if (!first) PORT_Strcat(flags,",");
PORT_Strcat(flags,"FIPS");
first = PR_FALSE;
}
if (isModuleDB) {
if (!first) PORT_Strcat(flags,",");
PORT_Strcat(flags,"moduleDB");
first = PR_FALSE;
}
if (isModuleDBOnly) {
if (!first) PORT_Strcat(flags,",");
PORT_Strcat(flags,"moduleDBOnly");
first = PR_FALSE;
}
if (isCritical) {
if (!first) PORT_Strcat(flags,",");
PORT_Strcat(flags,"critical");
first = PR_FALSE;
}
return flags;
}
static char *
secmod_mkCipherFlags(unsigned long ssl0, unsigned long ssl1)
{
char *cipher = NULL;
int i;
for (i=0; i < sizeof(ssl0)*8; i++) {
if (ssl0 & (1<<i)) {
char *string;
if ((1<<i) == SECMOD_FORTEZZA_FLAG) {
string = PR_smprintf("%s","FORTEZZA");
} else {
string = PR_smprintf("0h0x%08x",1<<i);
}
if (cipher) {
char *tmp;
tmp = PR_smprintf("%s,%s",cipher,string);
PR_smprintf_free(cipher);
PR_smprintf_free(string);
cipher = tmp;
} else {
cipher = string;
}
}
}
for (i=0; i < sizeof(ssl0)*8; i++) {
if (ssl1 & (1<<i)) {
if (cipher) {
char *tmp;
tmp = PR_smprintf("%s,0l0x%08x",cipher,1<<i);
PR_smprintf_free(cipher);
cipher = tmp;
} else {
cipher = PR_smprintf("0l0x%08x",1<<i);
}
}
}
return cipher;
}
static char *
secmod_mkSlotFlags(unsigned long defaultFlags)
{
char *flags=NULL;
int i,j;
for (i=0; i < sizeof(defaultFlags)*8; i++) {
if (defaultFlags & (1<<i)) {
char *string = NULL;
for (j=0; j < secmod_argSlotFlagTableSize; j++) {
if (secmod_argSlotFlagTable[j].value == ( 1UL << i )) {
string = secmod_argSlotFlagTable[j].name;
break;
}
}
if (string) {
if (flags) {
char *tmp;
tmp = PR_smprintf("%s,%s",flags,string);
PR_smprintf_free(flags);
flags = tmp;
} else {
flags = PR_smprintf("%s",string);
}
}
}
}
return flags;
}
#define SECMOD_MAX_ROOT_FLAG_SIZE sizeof("hasRootCerts")+sizeof("hasRootTrust")
static char *
secmod_mkRootFlags(PRBool hasRootCerts, PRBool hasRootTrust)
{
char *flags= (char *)PORT_ZAlloc(SECMOD_MAX_ROOT_FLAG_SIZE);
PRBool first = PR_TRUE;
PORT_Memset(flags,0,SECMOD_MAX_ROOT_FLAG_SIZE);
if (hasRootCerts) {
PORT_Strcat(flags,"hasRootCerts");
first = PR_FALSE;
}
if (hasRootTrust) {
if (!first) PORT_Strcat(flags,",");
PORT_Strcat(flags,"hasRootTrust");
first = PR_FALSE;
}
return flags;
}
static char *
secmod_mkSlotString(unsigned long slotID, unsigned long defaultFlags,
unsigned long timeout, unsigned char askpw_in,
PRBool hasRootCerts, PRBool hasRootTrust) {
char *askpw,*flags,*rootFlags,*slotString;
char *flagPair,*rootFlagsPair;
switch (askpw_in) {
case 0xff:
askpw = "every";
break;
case 1:
askpw = "timeout";
break;
default:
askpw = "any";
break;
}
flags = secmod_mkSlotFlags(defaultFlags);
rootFlags = secmod_mkRootFlags(hasRootCerts,hasRootTrust);
flagPair=secmod_formatPair("slotFlags",flags,'\'');
rootFlagsPair=secmod_formatPair("rootFlags",rootFlags,'\'');
if (flags) PR_smprintf_free(flags);
if (rootFlags) PORT_Free(rootFlags);
if (defaultFlags & PK11_OWN_PW_DEFAULTS) {
slotString = PR_smprintf("0x%08lx=[%s askpw=%s timeout=%d %s]",
(PRUint32)slotID,flagPair,askpw,timeout,
rootFlagsPair);
} else {
slotString = PR_smprintf("0x%08lx=[%s %s]",
(PRUint32)slotID,flagPair,rootFlagsPair);
}
secmod_freePair(flagPair);
secmod_freePair(rootFlagsPair);
return slotString;
}
static char *
secmod_mkNSS(char **slotStrings, int slotCount, PRBool internal, PRBool isFIPS,
PRBool isModuleDB, PRBool isModuleDBOnly, PRBool isCritical,
unsigned long trustOrder, unsigned long cipherOrder,
unsigned long ssl0, unsigned long ssl1) {
int slotLen, i;
char *slotParams, *ciphers, *nss, *nssFlags, *tmp;
char *trustOrderPair,*cipherOrderPair,*slotPair,*cipherPair,*flagPair;
/* now let's build up the string
* first the slot infos
*/
slotLen=0;
for (i=0; i < (int)slotCount; i++) {
slotLen += PORT_Strlen(slotStrings[i])+1;
}
slotLen += 1; /* space for the final NULL */
slotParams = (char *)PORT_ZAlloc(slotLen);
PORT_Memset(slotParams,0,slotLen);
for (i=0; i < (int)slotCount; i++) {
PORT_Strcat(slotParams,slotStrings[i]);
PORT_Strcat(slotParams," ");
PR_smprintf_free(slotStrings[i]);
slotStrings[i]=NULL;
}
/*
* now the NSS structure
*/
nssFlags = secmod_mkNSSFlags(internal,isFIPS,isModuleDB,isModuleDBOnly,
isCritical);
/* for now only the internal module is critical */
ciphers = secmod_mkCipherFlags(ssl0, ssl1);
trustOrderPair=secmod_formatIntPair("trustOrder",trustOrder,
SECMOD_DEFAULT_TRUST_ORDER);
cipherOrderPair=secmod_formatIntPair("cipherOrder",cipherOrder,
SECMOD_DEFAULT_CIPHER_ORDER);
slotPair=secmod_formatPair("slotParams",slotParams,'{'); /* } */
if (slotParams) PORT_Free(slotParams);
cipherPair=secmod_formatPair("ciphers",ciphers,'\'');
if (ciphers) PR_smprintf_free(ciphers);
flagPair=secmod_formatPair("Flags",nssFlags,'\'');
if (nssFlags) PORT_Free(nssFlags);
nss = PR_smprintf("%s %s %s %s %s",trustOrderPair,
cipherOrderPair,slotPair,cipherPair,flagPair);
secmod_freePair(trustOrderPair);
secmod_freePair(cipherOrderPair);
secmod_freePair(slotPair);
secmod_freePair(cipherPair);
secmod_freePair(flagPair);
tmp = secmod_argStrip(nss);
if (*tmp == '\0') {
PR_smprintf_free(nss);
nss = NULL;
}
return nss;
}
static char *
secmod_mkNewModuleSpec(char *dllName, char *commonName, char *parameters,
char *NSS) {
char *moduleSpec;
char *lib,*name,*param,*nss;
/*
* now the final spec
*/
lib = secmod_formatPair("library",dllName,'\"');
name = secmod_formatPair("name",commonName,'\"');
param = secmod_formatPair("parameters",parameters,'\"');
nss = secmod_formatPair("NSS",NSS,'\"');
moduleSpec = PR_smprintf("%s %s %s %s", lib,name,param,nss);
secmod_freePair(lib);
secmod_freePair(name);
secmod_freePair(param);
secmod_freePair(nss);
return (moduleSpec);
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,323 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* RSA Labs
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* Copyright (C) 1994-1999 RSA Security Inc. Licence to copy this document
* is granted provided that it is identified as "RSA Security In.c Public-Key
* Cryptography Standards (PKCS)" in all material mentioning or referencing
* this document.
*
* The latest version of this header can be found at:
* http://www.rsalabs.com/pkcs/pkcs-11/index.html
*/
#ifndef _PKCS11_H_
#define _PKCS11_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/* Before including this file (pkcs11.h) (or pkcs11t.h by
* itself), 6 platform-specific macros must be defined. These
* macros are described below, and typical definitions for them
* are also given. Be advised that these definitions can depend
* on both the platform and the compiler used (and possibly also
* on whether a PKCS #11 library is linked statically or
* dynamically).
*
* In addition to defining these 6 macros, the packing convention
* for PKCS #11 structures should be set. The PKCS #11
* convention on packing is that structures should be 1-byte
* aligned.
*
* In a Win32 environment, this might be done by using the
* following preprocessor directive before including pkcs11.h
* or pkcs11t.h:
*
* #pragma pack(push, cryptoki, 1)
*
* and using the following preprocessor directive after including
* pkcs11.h or pkcs11t.h:
*
* #pragma pack(pop, cryptoki)
*
* In a Win16 environment, this might be done by using the
* following preprocessor directive before including pkcs11.h
* or pkcs11t.h:
*
* #pragma pack(1)
*
* In a UNIX environment, you're on your own here. You might
* not need to do anything.
*
*
* Now for the macros:
*
*
* 1. CK_PTR: The indirection string for making a pointer to an
* object. It can be used like this:
*
* typedef CK_BYTE CK_PTR CK_BYTE_PTR;
*
* In a Win32 environment, it might be defined by
*
* #define CK_PTR *
*
* In a Win16 environment, it might be defined by
*
* #define CK_PTR far *
*
* In a UNIX environment, it might be defined by
*
* #define CK_PTR *
*
*
* 2. CK_DEFINE_FUNCTION(returnType, name): A macro which makes
* an exportable PKCS #11 library function definition out of a
* return type and a function name. It should be used in the
* following fashion to define the exposed PKCS #11 functions in
* a PKCS #11 library:
*
* CK_DEFINE_FUNCTION(CK_RV, C_Initialize)(
* CK_VOID_PTR pReserved
* )
* {
* ...
* }
*
* For defining a function in a Win32 PKCS #11 .dll, it might be
* defined by
*
* #define CK_DEFINE_FUNCTION(returnType, name) \
* returnType __declspec(dllexport) name
*
* For defining a function in a Win16 PKCS #11 .dll, it might be
* defined by
*
* #define CK_DEFINE_FUNCTION(returnType, name) \
* returnType __export _far _pascal name
*
* In a UNIX environment, it might be defined by
*
* #define CK_DEFINE_FUNCTION(returnType, name) \
* returnType name
*
*
* 3. CK_DECLARE_FUNCTION(returnType, name): A macro which makes
* an importable PKCS #11 library function declaration out of a
* return type and a function name. It should be used in the
* following fashion:
*
* extern CK_DECLARE_FUNCTION(CK_RV, C_Initialize)(
* CK_VOID_PTR pReserved
* );
*
* For declaring a function in a Win32 PKCS #11 .dll, it might
* be defined by
*
* #define CK_DECLARE_FUNCTION(returnType, name) \
* returnType __declspec(dllimport) name
*
* For declaring a function in a Win16 PKCS #11 .dll, it might
* be defined by
*
* #define CK_DECLARE_FUNCTION(returnType, name) \
* returnType __export _far _pascal name
*
* In a UNIX environment, it might be defined by
*
* #define CK_DECLARE_FUNCTION(returnType, name) \
* returnType name
*
*
* 4. CK_DECLARE_FUNCTION_POINTER(returnType, name): A macro
* which makes a PKCS #11 API function pointer declaration or
* function pointer type declaration out of a return type and a
* function name. It should be used in the following fashion:
*
* // Define funcPtr to be a pointer to a PKCS #11 API function
* // taking arguments args and returning CK_RV.
* CK_DECLARE_FUNCTION_POINTER(CK_RV, funcPtr)(args);
*
* or
*
* // Define funcPtrType to be the type of a pointer to a
* // PKCS #11 API function taking arguments args and returning
* // CK_RV, and then define funcPtr to be a variable of type
* // funcPtrType.
* typedef CK_DECLARE_FUNCTION_POINTER(CK_RV, funcPtrType)(args);
* funcPtrType funcPtr;
*
* For accessing functions in a Win32 PKCS #11 .dll, in might be
* defined by
*
* #define CK_DECLARE_FUNCTION_POINTER(returnType, name) \
* returnType __declspec(dllimport) (* name)
*
* For accessing functions in a Win16 PKCS #11 .dll, it might be
* defined by
*
* #define CK_DECLARE_FUNCTION_POINTER(returnType, name) \
* returnType __export _far _pascal (* name)
*
* In a UNIX environment, it might be defined by
*
* #define CK_DECLARE_FUNCTION_POINTER(returnType, name) \
* returnType (* name)
*
*
* 5. CK_CALLBACK_FUNCTION(returnType, name): A macro which makes
* a function pointer type for an application callback out of
* a return type for the callback and a name for the callback.
* It should be used in the following fashion:
*
* CK_CALLBACK_FUNCTION(CK_RV, myCallback)(args);
*
* to declare a function pointer, myCallback, to a callback
* which takes arguments args and returns a CK_RV. It can also
* be used like this:
*
* typedef CK_CALLBACK_FUNCTION(CK_RV, myCallbackType)(args);
* myCallbackType myCallback;
*
* In a Win32 environment, it might be defined by
*
* #define CK_CALLBACK_FUNCTION(returnType, name) \
* returnType (* name)
*
* In a Win16 environment, it might be defined by
*
* #define CK_CALLBACK_FUNCTION(returnType, name) \
* returnType _far _pascal (* name)
*
* In a UNIX environment, it might be defined by
*
* #define CK_CALLBACK_FUNCTION(returnType, name) \
* returnType (* name)
*
*
* 6. NULL_PTR: This macro is the value of a NULL pointer.
*
* In any ANSI/ISO C environment (and in many others as well),
* this should be defined by
*
* #ifndef NULL_PTR
* #define NULL_PTR 0
* #endif
*/
/* All the various PKCS #11 types and #define'd values are in the
* file pkcs11t.h. */
#include "pkcs11t.h"
#define __PASTE(x,y) x##y
/* packing defines */
#include "pkcs11p.h"
/* ==============================================================
* Define the "extern" form of all the entry points.
* ==============================================================
*/
#define CK_NEED_ARG_LIST 1
#define CK_PKCS11_FUNCTION_INFO(name) \
CK_DECLARE_FUNCTION(CK_RV, name)
/* pkcs11f.h has all the information about the PKCS #11
* function prototypes. */
#include "pkcs11f.h"
#undef CK_NEED_ARG_LIST
#undef CK_PKCS11_FUNCTION_INFO
/* ==============================================================
* Define the typedef form of all the entry points. That is, for
* each PKCS #11 function C_XXX, define a type CK_C_XXX which is
* a pointer to that kind of function.
* ==============================================================
*/
#define CK_NEED_ARG_LIST 1
#define CK_PKCS11_FUNCTION_INFO(name) \
typedef CK_DECLARE_FUNCTION_POINTER(CK_RV, __PASTE(CK_,name))
/* pkcs11f.h has all the information about the PKCS #11
* function prototypes. */
#include "pkcs11f.h"
#undef CK_NEED_ARG_LIST
#undef CK_PKCS11_FUNCTION_INFO
/* ==============================================================
* Define structed vector of entry points. A CK_FUNCTION_LIST
* contains a CK_VERSION indicating a library's PKCS #11 version
* and then a whole slew of function pointers to the routines in
* the library. This type was declared, but not defined, in
* pkcs11t.h.
* ==============================================================
*/
#define CK_PKCS11_FUNCTION_INFO(name) \
__PASTE(CK_,name) name;
struct CK_FUNCTION_LIST {
CK_VERSION version; /* PKCS #11 version */
/* Pile all the function pointers into the CK_FUNCTION_LIST. */
/* pkcs11f.h has all the information about the PKCS #11
* function prototypes. */
#include "pkcs11f.h"
};
#undef CK_PKCS11_FUNCTION_INFO
#undef __PASTE
/* unpack */
#include "pkcs11u.h"
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,937 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* RSA Security INC.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* Copyright (C) 1994-1999 RSA Security Inc. Licence to copy this document
* is granted provided that it is identified as "RSA Security In.c Public-Key
* Cryptography Standards (PKCS)" in all material mentioning or referencing
* this document.
*/
/* This function contains pretty much everything about all the */
/* PKCS #11 function prototypes. Because this information is */
/* used for more than just declaring function prototypes, the */
/* order of the functions appearing herein is important, and */
/* should not be altered. */
/* General-purpose */
/* C_Initialize initializes the PKCS #11 library. */
CK_PKCS11_FUNCTION_INFO(C_Initialize)
#ifdef CK_NEED_ARG_LIST
(
CK_VOID_PTR pInitArgs /* if this is not NULL_PTR, it gets
* cast to CK_C_INITIALIZE_ARGS_PTR
* and dereferenced */
);
#endif
/* C_Finalize indicates that an application is done with the
* PKCS #11 library. */
CK_PKCS11_FUNCTION_INFO(C_Finalize)
#ifdef CK_NEED_ARG_LIST
(
CK_VOID_PTR pReserved /* reserved. Should be NULL_PTR */
);
#endif
/* C_GetInfo returns general information about PKCS #11. */
CK_PKCS11_FUNCTION_INFO(C_GetInfo)
#ifdef CK_NEED_ARG_LIST
(
CK_INFO_PTR pInfo /* location that receives information */
);
#endif
/* C_GetFunctionList returns the function list. */
CK_PKCS11_FUNCTION_INFO(C_GetFunctionList)
#ifdef CK_NEED_ARG_LIST
(
CK_FUNCTION_LIST_PTR_PTR ppFunctionList /* receives pointer to
* function list */
);
#endif
/* Slot and token management */
/* C_GetSlotList obtains a list of slots in the system. */
CK_PKCS11_FUNCTION_INFO(C_GetSlotList)
#ifdef CK_NEED_ARG_LIST
(
CK_BBOOL tokenPresent, /* only slots with tokens? */
CK_SLOT_ID_PTR pSlotList, /* receives array of slot IDs */
CK_ULONG_PTR pulCount /* receives number of slots */
);
#endif
/* C_GetSlotInfo obtains information about a particular slot in
* the system. */
CK_PKCS11_FUNCTION_INFO(C_GetSlotInfo)
#ifdef CK_NEED_ARG_LIST
(
CK_SLOT_ID slotID, /* the ID of the slot */
CK_SLOT_INFO_PTR pInfo /* receives the slot information */
);
#endif
/* C_GetTokenInfo obtains information about a particular token
* in the system. */
CK_PKCS11_FUNCTION_INFO(C_GetTokenInfo)
#ifdef CK_NEED_ARG_LIST
(
CK_SLOT_ID slotID, /* ID of the token's slot */
CK_TOKEN_INFO_PTR pInfo /* receives the token information */
);
#endif
/* C_GetMechanismList obtains a list of mechanism types
* supported by a token. */
CK_PKCS11_FUNCTION_INFO(C_GetMechanismList)
#ifdef CK_NEED_ARG_LIST
(
CK_SLOT_ID slotID, /* ID of token's slot */
CK_MECHANISM_TYPE_PTR pMechanismList, /* gets mech. array */
CK_ULONG_PTR pulCount /* gets # of mechs. */
);
#endif
/* C_GetMechanismInfo obtains information about a particular
* mechanism possibly supported by a token. */
CK_PKCS11_FUNCTION_INFO(C_GetMechanismInfo)
#ifdef CK_NEED_ARG_LIST
(
CK_SLOT_ID slotID, /* ID of the token's slot */
CK_MECHANISM_TYPE type, /* type of mechanism */
CK_MECHANISM_INFO_PTR pInfo /* receives mechanism info */
);
#endif
/* C_InitToken initializes a token. */
CK_PKCS11_FUNCTION_INFO(C_InitToken)
#ifdef CK_NEED_ARG_LIST
/* pLabel changed from CK_CHAR_PTR to CK_UTF8CHAR_PTR for v2.10 */
(
CK_SLOT_ID slotID, /* ID of the token's slot */
CK_UTF8CHAR_PTR pPin, /* the SO's initial PIN */
CK_ULONG ulPinLen, /* length in bytes of the PIN */
CK_UTF8CHAR_PTR pLabel /* 32-byte token label (blank padded) */
);
#endif
/* C_InitPIN initializes the normal user's PIN. */
CK_PKCS11_FUNCTION_INFO(C_InitPIN)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_UTF8CHAR_PTR pPin, /* the normal user's PIN */
CK_ULONG ulPinLen /* length in bytes of the PIN */
);
#endif
/* C_SetPIN modifies the PIN of the user who is logged in. */
CK_PKCS11_FUNCTION_INFO(C_SetPIN)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_UTF8CHAR_PTR pOldPin, /* the old PIN */
CK_ULONG ulOldLen, /* length of the old PIN */
CK_UTF8CHAR_PTR pNewPin, /* the new PIN */
CK_ULONG ulNewLen /* length of the new PIN */
);
#endif
/* Session management */
/* C_OpenSession opens a session between an application and a
* token. */
CK_PKCS11_FUNCTION_INFO(C_OpenSession)
#ifdef CK_NEED_ARG_LIST
(
CK_SLOT_ID slotID, /* the slot's ID */
CK_FLAGS flags, /* from CK_SESSION_INFO */
CK_VOID_PTR pApplication, /* passed to callback */
CK_NOTIFY Notify, /* callback function */
CK_SESSION_HANDLE_PTR phSession /* gets session handle */
);
#endif
/* C_CloseSession closes a session between an application and a
* token. */
CK_PKCS11_FUNCTION_INFO(C_CloseSession)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession /* the session's handle */
);
#endif
/* C_CloseAllSessions closes all sessions with a token. */
CK_PKCS11_FUNCTION_INFO(C_CloseAllSessions)
#ifdef CK_NEED_ARG_LIST
(
CK_SLOT_ID slotID /* the token's slot */
);
#endif
/* C_GetSessionInfo obtains information about the session. */
CK_PKCS11_FUNCTION_INFO(C_GetSessionInfo)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_SESSION_INFO_PTR pInfo /* receives session info */
);
#endif
/* C_GetOperationState obtains the state of the cryptographic operation
* in a session. */
CK_PKCS11_FUNCTION_INFO(C_GetOperationState)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_BYTE_PTR pOperationState, /* gets state */
CK_ULONG_PTR pulOperationStateLen /* gets state length */
);
#endif
/* C_SetOperationState restores the state of the cryptographic
* operation in a session. */
CK_PKCS11_FUNCTION_INFO(C_SetOperationState)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_BYTE_PTR pOperationState, /* holds state */
CK_ULONG ulOperationStateLen, /* holds state length */
CK_OBJECT_HANDLE hEncryptionKey, /* en/decryption key */
CK_OBJECT_HANDLE hAuthenticationKey /* sign/verify key */
);
#endif
/* C_Login logs a user into a token. */
CK_PKCS11_FUNCTION_INFO(C_Login)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_USER_TYPE userType, /* the user type */
CK_UTF8CHAR_PTR pPin, /* the user's PIN */
CK_ULONG ulPinLen /* the length of the PIN */
);
#endif
/* C_Logout logs a user out from a token. */
CK_PKCS11_FUNCTION_INFO(C_Logout)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession /* the session's handle */
);
#endif
/* Object management */
/* C_CreateObject creates a new object. */
CK_PKCS11_FUNCTION_INFO(C_CreateObject)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_ATTRIBUTE_PTR pTemplate, /* the object's template */
CK_ULONG ulCount, /* attributes in template */
CK_OBJECT_HANDLE_PTR phObject /* gets new object's handle. */
);
#endif
/* C_CopyObject copies an object, creating a new object for the
* copy. */
CK_PKCS11_FUNCTION_INFO(C_CopyObject)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_OBJECT_HANDLE hObject, /* the object's handle */
CK_ATTRIBUTE_PTR pTemplate, /* template for new object */
CK_ULONG ulCount, /* attributes in template */
CK_OBJECT_HANDLE_PTR phNewObject /* receives handle of copy */
);
#endif
/* C_DestroyObject destroys an object. */
CK_PKCS11_FUNCTION_INFO(C_DestroyObject)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_OBJECT_HANDLE hObject /* the object's handle */
);
#endif
/* C_GetObjectSize gets the size of an object in bytes. */
CK_PKCS11_FUNCTION_INFO(C_GetObjectSize)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_OBJECT_HANDLE hObject, /* the object's handle */
CK_ULONG_PTR pulSize /* receives size of object */
);
#endif
/* C_GetAttributeValue obtains the value of one or more object
* attributes. */
CK_PKCS11_FUNCTION_INFO(C_GetAttributeValue)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_OBJECT_HANDLE hObject, /* the object's handle */
CK_ATTRIBUTE_PTR pTemplate, /* specifies attrs; gets vals */
CK_ULONG ulCount /* attributes in template */
);
#endif
/* C_SetAttributeValue modifies the value of one or more object
* attributes */
CK_PKCS11_FUNCTION_INFO(C_SetAttributeValue)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_OBJECT_HANDLE hObject, /* the object's handle */
CK_ATTRIBUTE_PTR pTemplate, /* specifies attrs and values */
CK_ULONG ulCount /* attributes in template */
);
#endif
/* C_FindObjectsInit initializes a search for token and session
* objects that match a template. */
CK_PKCS11_FUNCTION_INFO(C_FindObjectsInit)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_ATTRIBUTE_PTR pTemplate, /* attribute values to match */
CK_ULONG ulCount /* attrs in search template */
);
#endif
/* C_FindObjects continues a search for token and session
* objects that match a template, obtaining additional object
* handles. */
CK_PKCS11_FUNCTION_INFO(C_FindObjects)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_OBJECT_HANDLE_PTR phObject, /* gets obj. handles */
CK_ULONG ulMaxObjectCount, /* max handles to get */
CK_ULONG_PTR pulObjectCount /* actual # returned */
);
#endif
/* C_FindObjectsFinal finishes a search for token and session
* objects. */
CK_PKCS11_FUNCTION_INFO(C_FindObjectsFinal)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession /* the session's handle */
);
#endif
/* Encryption and decryption */
/* C_EncryptInit initializes an encryption operation. */
CK_PKCS11_FUNCTION_INFO(C_EncryptInit)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_MECHANISM_PTR pMechanism, /* the encryption mechanism */
CK_OBJECT_HANDLE hKey /* handle of encryption key */
);
#endif
/* C_Encrypt encrypts single-part data. */
CK_PKCS11_FUNCTION_INFO(C_Encrypt)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_BYTE_PTR pData, /* the plaintext data */
CK_ULONG ulDataLen, /* bytes of plaintext */
CK_BYTE_PTR pEncryptedData, /* gets ciphertext */
CK_ULONG_PTR pulEncryptedDataLen /* gets c-text size */
);
#endif
/* C_EncryptUpdate continues a multiple-part encryption
* operation. */
CK_PKCS11_FUNCTION_INFO(C_EncryptUpdate)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_BYTE_PTR pPart, /* the plaintext data */
CK_ULONG ulPartLen, /* plaintext data len */
CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */
CK_ULONG_PTR pulEncryptedPartLen /* gets c-text size */
);
#endif
/* C_EncryptFinal finishes a multiple-part encryption
* operation. */
CK_PKCS11_FUNCTION_INFO(C_EncryptFinal)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session handle */
CK_BYTE_PTR pLastEncryptedPart, /* last c-text */
CK_ULONG_PTR pulLastEncryptedPartLen /* gets last size */
);
#endif
/* C_DecryptInit initializes a decryption operation. */
CK_PKCS11_FUNCTION_INFO(C_DecryptInit)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_MECHANISM_PTR pMechanism, /* the decryption mechanism */
CK_OBJECT_HANDLE hKey /* handle of decryption key */
);
#endif
/* C_Decrypt decrypts encrypted data in a single part. */
CK_PKCS11_FUNCTION_INFO(C_Decrypt)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_BYTE_PTR pEncryptedData, /* ciphertext */
CK_ULONG ulEncryptedDataLen, /* ciphertext length */
CK_BYTE_PTR pData, /* gets plaintext */
CK_ULONG_PTR pulDataLen /* gets p-text size */
);
#endif
/* C_DecryptUpdate continues a multiple-part decryption
* operation. */
CK_PKCS11_FUNCTION_INFO(C_DecryptUpdate)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_BYTE_PTR pEncryptedPart, /* encrypted data */
CK_ULONG ulEncryptedPartLen, /* input length */
CK_BYTE_PTR pPart, /* gets plaintext */
CK_ULONG_PTR pulPartLen /* p-text size */
);
#endif
/* C_DecryptFinal finishes a multiple-part decryption
* operation. */
CK_PKCS11_FUNCTION_INFO(C_DecryptFinal)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pLastPart, /* gets plaintext */
CK_ULONG_PTR pulLastPartLen /* p-text size */
);
#endif
/* Message digesting */
/* C_DigestInit initializes a message-digesting operation. */
CK_PKCS11_FUNCTION_INFO(C_DigestInit)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_MECHANISM_PTR pMechanism /* the digesting mechanism */
);
#endif
/* C_Digest digests data in a single part. */
CK_PKCS11_FUNCTION_INFO(C_Digest)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pData, /* data to be digested */
CK_ULONG ulDataLen, /* bytes of data to digest */
CK_BYTE_PTR pDigest, /* gets the message digest */
CK_ULONG_PTR pulDigestLen /* gets digest length */
);
#endif
/* C_DigestUpdate continues a multiple-part message-digesting
* operation. */
CK_PKCS11_FUNCTION_INFO(C_DigestUpdate)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pPart, /* data to be digested */
CK_ULONG ulPartLen /* bytes of data to be digested */
);
#endif
/* C_DigestKey continues a multi-part message-digesting
* operation, by digesting the value of a secret key as part of
* the data already digested. */
CK_PKCS11_FUNCTION_INFO(C_DigestKey)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_OBJECT_HANDLE hKey /* secret key to digest */
);
#endif
/* C_DigestFinal finishes a multiple-part message-digesting
* operation. */
CK_PKCS11_FUNCTION_INFO(C_DigestFinal)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pDigest, /* gets the message digest */
CK_ULONG_PTR pulDigestLen /* gets byte count of digest */
);
#endif
/* Signing and MACing */
/* C_SignInit initializes a signature (private key encryption)
* operation, where the signature is (will be) an appendix to
* the data, and plaintext cannot be recovered from the
*signature. */
CK_PKCS11_FUNCTION_INFO(C_SignInit)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_MECHANISM_PTR pMechanism, /* the signature mechanism */
CK_OBJECT_HANDLE hKey /* handle of signature key */
);
#endif
/* C_Sign signs (encrypts with private key) data in a single
* part, where the signature is (will be) an appendix to the
* data, and plaintext cannot be recovered from the signature. */
CK_PKCS11_FUNCTION_INFO(C_Sign)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pData, /* the data to sign */
CK_ULONG ulDataLen, /* count of bytes to sign */
CK_BYTE_PTR pSignature, /* gets the signature */
CK_ULONG_PTR pulSignatureLen /* gets signature length */
);
#endif
/* C_SignUpdate continues a multiple-part signature operation,
* where the signature is (will be) an appendix to the data,
* and plaintext cannot be recovered from the signature. */
CK_PKCS11_FUNCTION_INFO(C_SignUpdate)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pPart, /* the data to sign */
CK_ULONG ulPartLen /* count of bytes to sign */
);
#endif
/* C_SignFinal finishes a multiple-part signature operation,
* returning the signature. */
CK_PKCS11_FUNCTION_INFO(C_SignFinal)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pSignature, /* gets the signature */
CK_ULONG_PTR pulSignatureLen /* gets signature length */
);
#endif
/* C_SignRecoverInit initializes a signature operation, where
* the data can be recovered from the signature. */
CK_PKCS11_FUNCTION_INFO(C_SignRecoverInit)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_MECHANISM_PTR pMechanism, /* the signature mechanism */
CK_OBJECT_HANDLE hKey /* handle of the signature key */
);
#endif
/* C_SignRecover signs data in a single operation, where the
* data can be recovered from the signature. */
CK_PKCS11_FUNCTION_INFO(C_SignRecover)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pData, /* the data to sign */
CK_ULONG ulDataLen, /* count of bytes to sign */
CK_BYTE_PTR pSignature, /* gets the signature */
CK_ULONG_PTR pulSignatureLen /* gets signature length */
);
#endif
/* Verifying signatures and MACs */
/* C_VerifyInit initializes a verification operation, where the
* signature is an appendix to the data, and plaintext cannot
* cannot be recovered from the signature (e.g. DSA). */
CK_PKCS11_FUNCTION_INFO(C_VerifyInit)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_MECHANISM_PTR pMechanism, /* the verification mechanism */
CK_OBJECT_HANDLE hKey /* verification key */
);
#endif
/* C_Verify verifies a signature in a single-part operation,
* where the signature is an appendix to the data, and plaintext
* cannot be recovered from the signature. */
CK_PKCS11_FUNCTION_INFO(C_Verify)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pData, /* signed data */
CK_ULONG ulDataLen, /* length of signed data */
CK_BYTE_PTR pSignature, /* signature */
CK_ULONG ulSignatureLen /* signature length*/
);
#endif
/* C_VerifyUpdate continues a multiple-part verification
* operation, where the signature is an appendix to the data,
* and plaintext cannot be recovered from the signature. */
CK_PKCS11_FUNCTION_INFO(C_VerifyUpdate)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pPart, /* signed data */
CK_ULONG ulPartLen /* length of signed data */
);
#endif
/* C_VerifyFinal finishes a multiple-part verification
* operation, checking the signature. */
CK_PKCS11_FUNCTION_INFO(C_VerifyFinal)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pSignature, /* signature to verify */
CK_ULONG ulSignatureLen /* signature length */
);
#endif
/* C_VerifyRecoverInit initializes a signature verification
* operation, where the data is recovered from the signature. */
CK_PKCS11_FUNCTION_INFO(C_VerifyRecoverInit)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_MECHANISM_PTR pMechanism, /* the verification mechanism */
CK_OBJECT_HANDLE hKey /* verification key */
);
#endif
/* C_VerifyRecover verifies a signature in a single-part
* operation, where the data is recovered from the signature. */
CK_PKCS11_FUNCTION_INFO(C_VerifyRecover)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pSignature, /* signature to verify */
CK_ULONG ulSignatureLen, /* signature length */
CK_BYTE_PTR pData, /* gets signed data */
CK_ULONG_PTR pulDataLen /* gets signed data len */
);
#endif
/* Dual-function cryptographic operations */
/* C_DigestEncryptUpdate continues a multiple-part digesting
* and encryption operation. */
CK_PKCS11_FUNCTION_INFO(C_DigestEncryptUpdate)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_BYTE_PTR pPart, /* the plaintext data */
CK_ULONG ulPartLen, /* plaintext length */
CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */
CK_ULONG_PTR pulEncryptedPartLen /* gets c-text length */
);
#endif
/* C_DecryptDigestUpdate continues a multiple-part decryption and
* digesting operation. */
CK_PKCS11_FUNCTION_INFO(C_DecryptDigestUpdate)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_BYTE_PTR pEncryptedPart, /* ciphertext */
CK_ULONG ulEncryptedPartLen, /* ciphertext length */
CK_BYTE_PTR pPart, /* gets plaintext */
CK_ULONG_PTR pulPartLen /* gets plaintext len */
);
#endif
/* C_SignEncryptUpdate continues a multiple-part signing and
* encryption operation. */
CK_PKCS11_FUNCTION_INFO(C_SignEncryptUpdate)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_BYTE_PTR pPart, /* the plaintext data */
CK_ULONG ulPartLen, /* plaintext length */
CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */
CK_ULONG_PTR pulEncryptedPartLen /* gets c-text length */
);
#endif
/* C_DecryptVerifyUpdate continues a multiple-part decryption and
* verify operation. */
CK_PKCS11_FUNCTION_INFO(C_DecryptVerifyUpdate)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_BYTE_PTR pEncryptedPart, /* ciphertext */
CK_ULONG ulEncryptedPartLen, /* ciphertext length */
CK_BYTE_PTR pPart, /* gets plaintext */
CK_ULONG_PTR pulPartLen /* gets p-text length */
);
#endif
/* Key management */
/* C_GenerateKey generates a secret key, creating a new key
* object. */
CK_PKCS11_FUNCTION_INFO(C_GenerateKey)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_MECHANISM_PTR pMechanism, /* key generation mech. */
CK_ATTRIBUTE_PTR pTemplate, /* template for new key */
CK_ULONG ulCount, /* # of attrs in template */
CK_OBJECT_HANDLE_PTR phKey /* gets handle of new key */
);
#endif
/* C_GenerateKeyPair generates a public-key/private-key pair,
* creating new key objects. */
CK_PKCS11_FUNCTION_INFO(C_GenerateKeyPair)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session
* handle */
CK_MECHANISM_PTR pMechanism, /* key-gen
* mech. */
CK_ATTRIBUTE_PTR pPublicKeyTemplate, /* template
* for pub.
* key */
CK_ULONG ulPublicKeyAttributeCount, /* # pub.
* attrs. */
CK_ATTRIBUTE_PTR pPrivateKeyTemplate, /* template
* for priv.
* key */
CK_ULONG ulPrivateKeyAttributeCount, /* # priv.
* attrs. */
CK_OBJECT_HANDLE_PTR phPublicKey, /* gets pub.
* key
* handle */
CK_OBJECT_HANDLE_PTR phPrivateKey /* gets
* priv. key
* handle */
);
#endif
/* C_WrapKey wraps (i.e., encrypts) a key. */
CK_PKCS11_FUNCTION_INFO(C_WrapKey)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_MECHANISM_PTR pMechanism, /* the wrapping mechanism */
CK_OBJECT_HANDLE hWrappingKey, /* wrapping key */
CK_OBJECT_HANDLE hKey, /* key to be wrapped */
CK_BYTE_PTR pWrappedKey, /* gets wrapped key */
CK_ULONG_PTR pulWrappedKeyLen /* gets wrapped key size */
);
#endif
/* C_UnwrapKey unwraps (decrypts) a wrapped key, creating a new
* key object. */
CK_PKCS11_FUNCTION_INFO(C_UnwrapKey)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_MECHANISM_PTR pMechanism, /* unwrapping mech. */
CK_OBJECT_HANDLE hUnwrappingKey, /* unwrapping key */
CK_BYTE_PTR pWrappedKey, /* the wrapped key */
CK_ULONG ulWrappedKeyLen, /* wrapped key len */
CK_ATTRIBUTE_PTR pTemplate, /* new key template */
CK_ULONG ulAttributeCount, /* template length */
CK_OBJECT_HANDLE_PTR phKey /* gets new handle */
);
#endif
/* C_DeriveKey derives a key from a base key, creating a new key
* object. */
CK_PKCS11_FUNCTION_INFO(C_DeriveKey)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* session's handle */
CK_MECHANISM_PTR pMechanism, /* key deriv. mech. */
CK_OBJECT_HANDLE hBaseKey, /* base key */
CK_ATTRIBUTE_PTR pTemplate, /* new key template */
CK_ULONG ulAttributeCount, /* template length */
CK_OBJECT_HANDLE_PTR phKey /* gets new handle */
);
#endif
/* Random number generation */
/* C_SeedRandom mixes additional seed material into the token's
* random number generator. */
CK_PKCS11_FUNCTION_INFO(C_SeedRandom)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR pSeed, /* the seed material */
CK_ULONG ulSeedLen /* length of seed material */
);
#endif
/* C_GenerateRandom generates random data. */
CK_PKCS11_FUNCTION_INFO(C_GenerateRandom)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession, /* the session's handle */
CK_BYTE_PTR RandomData, /* receives the random data */
CK_ULONG ulRandomLen /* # of bytes to generate */
);
#endif
/* Parallel function management */
/* C_GetFunctionStatus is a legacy function; it obtains an
* updated status of a function running in parallel with an
* application. */
CK_PKCS11_FUNCTION_INFO(C_GetFunctionStatus)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession /* the session's handle */
);
#endif
/* C_CancelFunction is a legacy function; it cancels a function
* running in parallel. */
CK_PKCS11_FUNCTION_INFO(C_CancelFunction)
#ifdef CK_NEED_ARG_LIST
(
CK_SESSION_HANDLE hSession /* the session's handle */
);
#endif
/* Functions added in for PKCS #11 Version 2.01 or later */
/* C_WaitForSlotEvent waits for a slot event (token insertion,
* removal, etc.) to occur. */
CK_PKCS11_FUNCTION_INFO(C_WaitForSlotEvent)
#ifdef CK_NEED_ARG_LIST
(
CK_FLAGS flags, /* blocking/nonblocking flag */
CK_SLOT_ID_PTR pSlot, /* location that receives the slot ID */
CK_VOID_PTR pRserved /* reserved. Should be NULL_PTR */
);
#endif

View File

@@ -1,687 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* Internal data structures and functions used by pkcs11.c
*/
#ifndef _PKCS11I_H_
#define _PKCS11I_H_ 1
#include "nssilock.h"
#include "seccomon.h"
#include "secoidt.h"
#include "lowkeyti.h"
#include "pkcs11t.h"
#include "sftkdbt.h"
/*
* Configuration Defines
*
* The following defines affect the space verse speed trade offs of
* the PKCS #11 module. For the most part the current settings are optimized
* for web servers, where we want faster speed and lower lock contention at
* the expense of space.
*/
/*
* The attribute allocation strategy is static allocation:
* Attributes are pre-allocated as part of the session object and used from
* the object array.
*/
#define MAX_OBJS_ATTRS 45 /* number of attributes to preallocate in
* the object (must me the absolute max) */
#define ATTR_SPACE 50 /* Maximum size of attribute data before extra
* data needs to be allocated. This is set to
* enough space to hold an SSL MASTER secret */
#define NSC_STRICT PR_FALSE /* forces the code to do strict template
* matching when doing C_FindObject on token
* objects. This will slow down search in
* NSS. */
/* default search block allocations and increments */
#define NSC_CERT_BLOCK_SIZE 50
#define NSC_SEARCH_BLOCK_SIZE 5
#define NSC_SLOT_LIST_BLOCK_SIZE 10
#define NSC_FIPS_MODULE 1
#define NSC_NON_FIPS_MODULE 0
/* these are data base storage hashes, not cryptographic hashes.. The define
* the effective size of the various object hash tables */
/* clients care more about memory usage than lookup performance on
* cyrptographic objects. Clients also have less objects around to play with
*
* we eventually should make this configurable at runtime! Especially now that
* NSS is a shared library.
*/
#define SPACE_ATTRIBUTE_HASH_SIZE 32
#define SPACE_SESSION_OBJECT_HASH_SIZE 32
#define SPACE_SESSION_HASH_SIZE 32
#define TIME_ATTRIBUTE_HASH_SIZE 32
#define TIME_SESSION_OBJECT_HASH_SIZE 1024
#define TIME_SESSION_HASH_SIZE 1024
#define MAX_OBJECT_LIST_SIZE 800
/* how many objects to keep on the free list
* before we start freeing them */
#define MAX_KEY_LEN 256 /* maximum symmetric key length in bytes */
#define MULTIACCESS "multiaccess:"
/*
* LOG2_BUCKETS_PER_SESSION_LOCK must be a prime number.
* With SESSION_HASH_SIZE=1024, LOG2 can be 9, 5, 1, or 0.
* With SESSION_HASH_SIZE=4096, LOG2 can be 11, 9, 5, 1, or 0.
*
* HASH_SIZE LOG2_BUCKETS_PER BUCKETS_PER_LOCK NUMBER_OF_BUCKETS
* 1024 9 512 2
* 1024 5 32 32
* 1024 1 2 512
* 1024 0 1 1024
* 4096 11 2048 2
* 4096 9 512 8
* 4096 5 32 128
* 4096 1 2 2048
* 4096 0 1 4096
*/
#define LOG2_BUCKETS_PER_SESSION_LOCK 1
#define BUCKETS_PER_SESSION_LOCK (1 << (LOG2_BUCKETS_PER_SESSION_LOCK))
/* NOSPREAD sessionID to hash table index macro has been slower. */
/* define typedefs, double as forward declarations as well */
typedef struct SFTKAttributeStr SFTKAttribute;
typedef struct SFTKObjectListStr SFTKObjectList;
typedef struct SFTKObjectFreeListStr SFTKObjectFreeList;
typedef struct SFTKObjectListElementStr SFTKObjectListElement;
typedef struct SFTKObjectStr SFTKObject;
typedef struct SFTKSessionObjectStr SFTKSessionObject;
typedef struct SFTKTokenObjectStr SFTKTokenObject;
typedef struct SFTKSessionStr SFTKSession;
typedef struct SFTKSlotStr SFTKSlot;
typedef struct SFTKSessionContextStr SFTKSessionContext;
typedef struct SFTKSearchResultsStr SFTKSearchResults;
typedef struct SFTKHashVerifyInfoStr SFTKHashVerifyInfo;
typedef struct SFTKHashSignInfoStr SFTKHashSignInfo;
typedef struct SFTKSSLMACInfoStr SFTKSSLMACInfo;
/* define function pointer typdefs for pointer tables */
typedef void (*SFTKDestroy)(void *, PRBool);
typedef void (*SFTKBegin)(void *);
typedef SECStatus (*SFTKCipher)(void *,void *,unsigned int *,unsigned int,
void *, unsigned int);
typedef SECStatus (*SFTKVerify)(void *,void *,unsigned int,void *,unsigned int);
typedef void (*SFTKHash)(void *,void *,unsigned int);
typedef void (*SFTKEnd)(void *,void *,unsigned int *,unsigned int);
typedef void (*SFTKFree)(void *);
/* Value to tell if an attribute is modifiable or not.
* NEVER: attribute is only set on creation.
* ONCOPY: attribute is set on creation and can only be changed on copy.
* SENSITIVE: attribute can only be changed to TRUE.
* ALWAYS: attribute can always be changed.
*/
typedef enum {
SFTK_NEVER = 0,
SFTK_ONCOPY = 1,
SFTK_SENSITIVE = 2,
SFTK_ALWAYS = 3
} SFTKModifyType;
/*
* Free Status Enum... tell us more information when we think we're
* deleting an object.
*/
typedef enum {
SFTK_DestroyFailure,
SFTK_Destroyed,
SFTK_Busy
} SFTKFreeStatus;
/*
* attribute values of an object.
*/
struct SFTKAttributeStr {
SFTKAttribute *next;
SFTKAttribute *prev;
PRBool freeAttr;
PRBool freeData;
/*must be called handle to make sftkqueue_find work */
CK_ATTRIBUTE_TYPE handle;
CK_ATTRIBUTE attrib;
unsigned char space[ATTR_SPACE];
};
/*
* doubly link list of objects
*/
struct SFTKObjectListStr {
SFTKObjectList *next;
SFTKObjectList *prev;
SFTKObject *parent;
};
struct SFTKObjectFreeListStr {
SFTKObject *head;
PZLock *lock;
int count;
};
/*
* PKCS 11 crypto object structure
*/
struct SFTKObjectStr {
SFTKObject *next;
SFTKObject *prev;
CK_OBJECT_CLASS objclass;
CK_OBJECT_HANDLE handle;
int refCount;
PZLock *refLock;
SFTKSlot *slot;
void *objectInfo;
SFTKFree infoFree;
};
struct SFTKTokenObjectStr {
SFTKObject obj;
SECItem dbKey;
};
struct SFTKSessionObjectStr {
SFTKObject obj;
SFTKObjectList sessionList;
PZLock *attributeLock;
SFTKSession *session;
PRBool wasDerived;
int nextAttr;
SFTKAttribute attrList[MAX_OBJS_ATTRS];
PRBool optimizeSpace;
unsigned int hashSize;
SFTKAttribute *head[1];
};
/*
* struct to deal with a temparary list of objects
*/
struct SFTKObjectListElementStr {
SFTKObjectListElement *next;
SFTKObject *object;
};
/*
* Area to hold Search results
*/
struct SFTKSearchResultsStr {
CK_OBJECT_HANDLE *handles;
int size;
int index;
int array_size;
};
/*
* the universal crypto/hash/sign/verify context structure
*/
typedef enum {
SFTK_ENCRYPT,
SFTK_DECRYPT,
SFTK_HASH,
SFTK_SIGN,
SFTK_SIGN_RECOVER,
SFTK_VERIFY,
SFTK_VERIFY_RECOVER
} SFTKContextType;
#define SFTK_MAX_BLOCK_SIZE 16
/* currently SHA512 is the biggest hash length */
#define SFTK_MAX_MAC_LENGTH 64
#define SFTK_INVALID_MAC_SIZE 0xffffffff
struct SFTKSessionContextStr {
SFTKContextType type;
PRBool multi; /* is multipart */
PRBool doPad; /* use PKCS padding for block ciphers */
unsigned int blockSize; /* blocksize for padding */
unsigned int padDataLength; /* length of the valid data in padbuf */
unsigned char padBuf[SFTK_MAX_BLOCK_SIZE];
unsigned char macBuf[SFTK_MAX_BLOCK_SIZE];
CK_ULONG macSize; /* size of a general block cipher mac*/
void *cipherInfo;
void *hashInfo;
unsigned int cipherInfoLen;
CK_MECHANISM_TYPE currentMech;
SFTKCipher update;
SFTKHash hashUpdate;
SFTKEnd end;
SFTKDestroy destroy;
SFTKDestroy hashdestroy;
SFTKVerify verify;
unsigned int maxLen;
SFTKObject *key;
};
/*
* Sessions (have objects)
*/
struct SFTKSessionStr {
SFTKSession *next;
SFTKSession *prev;
CK_SESSION_HANDLE handle;
int refCount;
PZLock *objectLock;
int objectIDCount;
CK_SESSION_INFO info;
CK_NOTIFY notify;
CK_VOID_PTR appData;
SFTKSlot *slot;
SFTKSearchResults *search;
SFTKSessionContext *enc_context;
SFTKSessionContext *hash_context;
SFTKSessionContext *sign_context;
SFTKObjectList *objects[1];
};
/*
* slots (have sessions and objects)
*
* The array of sessionLock's protect the session hash table (head[])
* as well as the reference count of session objects in that bucket
* (head[]->refCount), objectLock protects all elements of the slot's
* object hash tables (sessObjHashTable[] and tokObjHashTable), and
* sessionObjectHandleCount.
* slotLock protects the remaining protected elements:
* password, isLoggedIn, ssoLoggedIn, and sessionCount,
* and pwCheckLock serializes the key database password checks in
* NSC_SetPIN and NSC_Login.
*
* Each of the fields below has the following lifetime as commented
* next to the fields:
* invariant - This value is set when the slot is first created and
* never changed until it is destroyed.
* per load - This value is set when the slot is first created, or
* when the slot is used to open another directory. Between open and close
* this field does not change.
* variable - This value changes through the normal process of slot operation.
* - reset. The value of this variable is cleared during an open/close
* cycles.
* - preserved. The value of this variable is preserved over open/close
* cycles.
*/
struct SFTKSlotStr {
CK_SLOT_ID slotID; /* invariant */
PZLock *slotLock; /* invariant */
PZLock **sessionLock; /* invariant */
unsigned int numSessionLocks; /* invariant */
unsigned long sessionLockMask; /* invariant */
PZLock *objectLock; /* invariant */
PRLock *pwCheckLock; /* invariant */
PRBool present; /* variable -set */
PRBool hasTokens; /* per load */
PRBool isLoggedIn; /* variable - reset */
PRBool ssoLoggedIn; /* variable - reset */
PRBool needLogin; /* per load */
PRBool DB_loaded; /* per load */
PRBool readOnly; /* per load */
PRBool optimizeSpace; /* invariant */
SFTKDBHandle *certDB; /* per load */
SFTKDBHandle *keyDB; /* per load */
int minimumPinLen; /* per load */
PRInt32 sessionIDCount; /* atomically incremented */
/* (preserved) */
int sessionIDConflict; /* not protected by a lock */
/* (preserved) */
int sessionCount; /* variable - reset */
PRInt32 rwSessionCount; /* set by atomic operations */
/* (reset) */
int sessionObjectHandleCount;/* variable - perserved */
int index; /* invariant */
PLHashTable *tokObjHashTable; /* invariant */
SFTKObject **sessObjHashTable; /* variable - reset */
unsigned int sessObjHashSize; /* invariant */
SFTKSession **head; /* variable -reset */
unsigned int sessHashSize; /* invariant */
char tokDescription[33]; /* per load */
char slotDescription[64]; /* invariant */
};
/*
* special joint operations Contexts
*/
struct SFTKHashVerifyInfoStr {
SECOidTag hashOid;
NSSLOWKEYPublicKey *key;
};
struct SFTKHashSignInfoStr {
SECOidTag hashOid;
NSSLOWKEYPrivateKey *key;
};
/* context for the Final SSLMAC message */
struct SFTKSSLMACInfoStr {
void *hashContext;
SFTKBegin begin;
SFTKHash update;
SFTKEnd end;
CK_ULONG macSize;
int padSize;
unsigned char key[MAX_KEY_LEN];
unsigned int keySize;
};
/*
* session handle modifiers
*/
#define SFTK_SESSION_SLOT_MASK 0xff000000L
/*
* object handle modifiers
*/
#define SFTK_TOKEN_MASK 0x80000000L
#define SFTK_TOKEN_MAGIC 0x80000000L
#define SFTK_TOKEN_TYPE_MASK 0x70000000L
/* keydb (high bit == 0) */
#define SFTK_TOKEN_TYPE_PRIV 0x10000000L
#define SFTK_TOKEN_TYPE_PUB 0x20000000L
#define SFTK_TOKEN_TYPE_KEY 0x30000000L
/* certdb (high bit == 1) */
#define SFTK_TOKEN_TYPE_TRUST 0x40000000L
#define SFTK_TOKEN_TYPE_CRL 0x50000000L
#define SFTK_TOKEN_TYPE_SMIME 0x60000000L
#define SFTK_TOKEN_TYPE_CERT 0x70000000L
#define SFTK_TOKEN_KRL_HANDLE (SFTK_TOKEN_MAGIC|SFTK_TOKEN_TYPE_CRL|1)
/* how big (in bytes) a password/pin we can deal with */
#define SFTK_MAX_PIN 255
/* minimum password/pin length (in Unicode characters) in FIPS mode */
#define FIPS_MIN_PIN 7
/* slot ID's */
#define NETSCAPE_SLOT_ID 1
#define PRIVATE_KEY_SLOT_ID 2
#define FIPS_SLOT_ID 3
/* slot helper macros */
#define sftk_SlotFromSession(sp) ((sp)->slot)
#define sftk_isToken(id) (((id) & SFTK_TOKEN_MASK) == SFTK_TOKEN_MAGIC)
/* the session hash multiplier (see bug 201081) */
#define SHMULTIPLIER 1791398085
/* queueing helper macros */
#define sftk_hash(value,size) \
((PRUint32)((value) * SHMULTIPLIER) & (size-1))
#define sftkqueue_add(element,id,head,hash_size) \
{ int tmp = sftk_hash(id,hash_size); \
(element)->next = (head)[tmp]; \
(element)->prev = NULL; \
if ((head)[tmp]) (head)[tmp]->prev = (element); \
(head)[tmp] = (element); }
#define sftkqueue_find(element,id,head,hash_size) \
for( (element) = (head)[sftk_hash(id,hash_size)]; (element) != NULL; \
(element) = (element)->next) { \
if ((element)->handle == (id)) { break; } }
#define sftkqueue_is_queued(element,id,head,hash_size) \
( ((element)->next) || ((element)->prev) || \
((head)[sftk_hash(id,hash_size)] == (element)) )
#define sftkqueue_delete(element,id,head,hash_size) \
if ((element)->next) (element)->next->prev = (element)->prev; \
if ((element)->prev) (element)->prev->next = (element)->next; \
else (head)[sftk_hash(id,hash_size)] = ((element)->next); \
(element)->next = NULL; \
(element)->prev = NULL; \
#define sftkqueue_init_element(element) \
(element)->prev = NULL;
#define sftkqueue_add2(element, id, index, head) \
{ \
(element)->next = (head)[index]; \
if ((head)[index]) \
(head)[index]->prev = (element); \
(head)[index] = (element); \
}
#define sftkqueue_find2(element, id, index, head) \
for ( (element) = (head)[index]; \
(element) != NULL; \
(element) = (element)->next) { \
if ((element)->handle == (id)) { break; } \
}
#define sftkqueue_delete2(element, id, index, head) \
if ((element)->next) (element)->next->prev = (element)->prev; \
if ((element)->prev) (element)->prev->next = (element)->next; \
else (head)[index] = ((element)->next);
#define sftkqueue_clear_deleted_element(element) \
(element)->next = NULL; \
(element)->prev = NULL; \
/* sessionID (handle) is used to determine session lock bucket */
#ifdef NOSPREAD
/* NOSPREAD: (ID>>L2LPB) & (perbucket-1) */
#define SFTK_SESSION_LOCK(slot,handle) \
((slot)->sessionLock[((handle) >> LOG2_BUCKETS_PER_SESSION_LOCK) \
& (slot)->sessionLockMask])
#else
/* SPREAD: ID & (perbucket-1) */
#define SFTK_SESSION_LOCK(slot,handle) \
((slot)->sessionLock[(handle) & (slot)->sessionLockMask])
#endif
/* expand an attribute & secitem structures out */
#define sftk_attr_expand(ap) (ap)->type,(ap)->pValue,(ap)->ulValueLen
#define sftk_item_expand(ip) (ip)->data,(ip)->len
typedef struct sftk_token_parametersStr {
CK_SLOT_ID slotID;
char *configdir;
char *certPrefix;
char *keyPrefix;
char *tokdes;
char *slotdes;
int minPW;
PRBool readOnly;
PRBool noCertDB;
PRBool noKeyDB;
PRBool forceOpen;
PRBool pwRequired;
PRBool optimizeSpace;
} sftk_token_parameters;
typedef struct sftk_parametersStr {
char *configdir;
char *secmodName;
char *man;
char *libdes;
PRBool readOnly;
PRBool noModDB;
PRBool noCertDB;
PRBool forceOpen;
PRBool pwRequired;
PRBool optimizeSpace;
sftk_token_parameters *tokens;
int token_count;
} sftk_parameters;
/* machine dependent path stuff used by dbinit.c and pk11db.c */
#ifdef macintosh
#define PATH_SEPARATOR ":"
#define SECMOD_DB "Security Modules"
#define CERT_DB_FMT "%sCertificates%s"
#define KEY_DB_FMT "%sKey Database%s"
#else
#define PATH_SEPARATOR "/"
#define SECMOD_DB "secmod.db"
#define CERT_DB_FMT "%scert%s.db"
#define KEY_DB_FMT "%skey%s.db"
#endif
SEC_BEGIN_PROTOS
/* shared functions between pkcs11.c and fipstokn.c */
extern PRBool nsf_init;
extern CK_RV nsc_CommonInitialize(CK_VOID_PTR pReserved, PRBool isFIPS);
extern CK_RV nsc_CommonFinalize(CK_VOID_PTR pReserved, PRBool isFIPS);
extern CK_RV nsc_CommonGetSlotList(CK_BBOOL tokPresent,
CK_SLOT_ID_PTR pSlotList, CK_ULONG_PTR pulCount, int moduleIndex);
/* slot initialization, reinit, shutdown and destruction */
extern CK_RV SFTK_SlotInit(char *configdir,
sftk_token_parameters *params, int moduleIndex);
extern CK_RV SFTK_SlotReInit(SFTKSlot *slot, char *configdir,
sftk_token_parameters *params, int moduleIndex);
extern CK_RV SFTK_DestroySlotData(SFTKSlot *slot);
extern CK_RV SFTK_ShutdownSlot(SFTKSlot *slot);
/* internal utility functions used by pkcs11.c */
extern SFTKAttribute *sftk_FindAttribute(SFTKObject *object,
CK_ATTRIBUTE_TYPE type);
extern void sftk_FreeAttribute(SFTKAttribute *attribute);
extern CK_RV sftk_AddAttributeType(SFTKObject *object, CK_ATTRIBUTE_TYPE type,
void *valPtr,
CK_ULONG length);
extern CK_RV sftk_Attribute2SecItem(PLArenaPool *arena, SECItem *item,
SFTKObject *object, CK_ATTRIBUTE_TYPE type);
extern unsigned int sftk_GetLengthInBits(unsigned char *buf,
unsigned int bufLen);
extern CK_RV sftk_ConstrainAttribute(SFTKObject *object,
CK_ATTRIBUTE_TYPE type, int minLength, int maxLength, int minMultiple);
extern PRBool sftk_hasAttribute(SFTKObject *object, CK_ATTRIBUTE_TYPE type);
extern PRBool sftk_isTrue(SFTKObject *object, CK_ATTRIBUTE_TYPE type);
extern void sftk_DeleteAttributeType(SFTKObject *object,
CK_ATTRIBUTE_TYPE type);
extern CK_RV sftk_Attribute2SecItem(PLArenaPool *arena, SECItem *item,
SFTKObject *object, CK_ATTRIBUTE_TYPE type);
extern CK_RV sftk_Attribute2SSecItem(PLArenaPool *arena, SECItem *item,
SFTKObject *object,
CK_ATTRIBUTE_TYPE type);
extern SFTKModifyType sftk_modifyType(CK_ATTRIBUTE_TYPE type,
CK_OBJECT_CLASS inClass);
extern PRBool sftk_isSensitive(CK_ATTRIBUTE_TYPE type, CK_OBJECT_CLASS inClass);
extern char *sftk_getString(SFTKObject *object, CK_ATTRIBUTE_TYPE type);
extern void sftk_nullAttribute(SFTKObject *object,CK_ATTRIBUTE_TYPE type);
extern CK_RV sftk_GetULongAttribute(SFTKObject *object, CK_ATTRIBUTE_TYPE type,
CK_ULONG *longData);
extern CK_RV sftk_forceAttribute(SFTKObject *object, CK_ATTRIBUTE_TYPE type,
void *value, unsigned int len);
extern CK_RV sftk_defaultAttribute(SFTKObject *object, CK_ATTRIBUTE_TYPE type,
void *value, unsigned int len);
extern unsigned int sftk_MapTrust(CK_TRUST trust, PRBool clientAuth);
extern SFTKObject *sftk_NewObject(SFTKSlot *slot);
extern CK_RV sftk_CopyObject(SFTKObject *destObject, SFTKObject *srcObject);
extern SFTKFreeStatus sftk_FreeObject(SFTKObject *object);
extern CK_RV sftk_DeleteObject(SFTKSession *session, SFTKObject *object);
extern void sftk_ReferenceObject(SFTKObject *object);
extern SFTKObject *sftk_ObjectFromHandle(CK_OBJECT_HANDLE handle,
SFTKSession *session);
extern void sftk_AddSlotObject(SFTKSlot *slot, SFTKObject *object);
extern void sftk_AddObject(SFTKSession *session, SFTKObject *object);
/* clear out all the existing object ID to database key mappings.
* used to reinit a token */
extern CK_RV SFTK_ClearTokenKeyHashTable(SFTKSlot *slot);
extern CK_RV sftk_searchObjectList(SFTKSearchResults *search,
SFTKObject **head, unsigned int size,
PZLock *lock, CK_ATTRIBUTE_PTR inTemplate,
int count, PRBool isLoggedIn);
extern SFTKObjectListElement *sftk_FreeObjectListElement(
SFTKObjectListElement *objectList);
extern void sftk_FreeObjectList(SFTKObjectListElement *objectList);
extern void sftk_FreeSearch(SFTKSearchResults *search);
extern CK_RV sftk_handleObject(SFTKObject *object, SFTKSession *session);
extern SFTKSlot *sftk_SlotFromID(CK_SLOT_ID slotID, PRBool all);
extern SFTKSlot *sftk_SlotFromSessionHandle(CK_SESSION_HANDLE handle);
extern SFTKSession *sftk_SessionFromHandle(CK_SESSION_HANDLE handle);
extern void sftk_FreeSession(SFTKSession *session);
extern SFTKSession *sftk_NewSession(CK_SLOT_ID slotID, CK_NOTIFY notify,
CK_VOID_PTR pApplication, CK_FLAGS flags);
extern void sftk_update_state(SFTKSlot *slot,SFTKSession *session);
extern void sftk_update_all_states(SFTKSlot *slot);
extern void sftk_FreeContext(SFTKSessionContext *context);
extern void sftk_InitFreeLists(void);
extern void sftk_CleanupFreeLists(void);
extern NSSLOWKEYPublicKey *sftk_GetPubKey(SFTKObject *object,
CK_KEY_TYPE key_type, CK_RV *crvp);
extern NSSLOWKEYPrivateKey *sftk_GetPrivKey(SFTKObject *object,
CK_KEY_TYPE key_type, CK_RV *crvp);
extern void sftk_FormatDESKey(unsigned char *key, int length);
extern PRBool sftk_CheckDESKey(unsigned char *key);
extern PRBool sftk_IsWeakKey(unsigned char *key,CK_KEY_TYPE key_type);
/* mechanism allows this operation */
extern CK_RV sftk_MechAllowsOperation(CK_MECHANISM_TYPE type, CK_ATTRIBUTE_TYPE op);
/* helper function which calls nsslowkey_FindKeyByPublicKey after safely
* acquiring a reference to the keydb from the slot */
NSSLOWKEYPrivateKey *sftk_FindKeyByPublicKey(SFTKSlot *slot, SECItem *dbKey);
/*
* narrow objects
*/
SFTKSessionObject * sftk_narrowToSessionObject(SFTKObject *);
SFTKTokenObject * sftk_narrowToTokenObject(SFTKObject *);
/*
* token object utilities
*/
void sftk_addHandle(SFTKSearchResults *search, CK_OBJECT_HANDLE handle);
PRBool sftk_poisonHandle(SFTKSlot *slot, SECItem *dbkey,
CK_OBJECT_HANDLE handle);
SFTKObject * sftk_NewTokenObject(SFTKSlot *slot, SECItem *dbKey,
CK_OBJECT_HANDLE handle);
SFTKTokenObject *sftk_convertSessionToToken(SFTKObject *so);
/****************************************
* implement TLS Pseudo Random Function (PRF)
*/
extern CK_RV
sftk_TLSPRFInit(SFTKSessionContext *context,
SFTKObject * key,
CK_KEY_TYPE key_type);
SEC_END_PROTOS
#endif /* _PKCS11I_H_ */

View File

@@ -1,281 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Stephen Henson <stephen.henson@gemplus.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _PKCS11N_H_
#define _PKCS11N_H_
#ifdef DEBUG
static const char CKT_CVS_ID[] = "@(#) $RCSfile: pkcs11n.h,v $ $Revision: 1.15.22.1 $ $Date: 2007-05-17 01:08:18 $";
#endif /* DEBUG */
/*
* pkcs11n.h
*
* This file contains the NSS-specific type definitions for Cryptoki
* (PKCS#11).
*/
/*
* NSSCK_VENDOR_NSS
*
* Cryptoki reserves the high half of all the number spaces for
* vendor-defined use. I'd like to keep all of our NSS-
* specific values together, but not in the oh-so-obvious
* 0x80000001, 0x80000002, etc. area. So I've picked an offset,
* and constructed values for the beginnings of our spaces.
*
* Note that some "historical" Netscape values don't fall within
* this range.
*/
#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
/*
* NSS-defined object classes
*
*/
#define CKO_NSS (CKO_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
#define CKO_NSS_CRL (CKO_NSS + 1)
#define CKO_NSS_SMIME (CKO_NSS + 2)
#define CKO_NSS_TRUST (CKO_NSS + 3)
#define CKO_NSS_BUILTIN_ROOT_LIST (CKO_NSS + 4)
#define CKO_NSS_NEWSLOT (CKO_NSS + 5)
#define CKO_NSS_DELSLOT (CKO_NSS + 6)
/*
* NSS-defined key types
*
*/
#define CKK_NSS (CKK_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
#define CKK_NSS_PKCS8 (CKK_NSS + 1)
/*
* NSS-defined certificate types
*
*/
#define CKC_NSS (CKC_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
/*
* NSS-defined object attributes
*
*/
#define CKA_NSS (CKA_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
#define CKA_NSS_URL (CKA_NSS + 1)
#define CKA_NSS_EMAIL (CKA_NSS + 2)
#define CKA_NSS_SMIME_INFO (CKA_NSS + 3)
#define CKA_NSS_SMIME_TIMESTAMP (CKA_NSS + 4)
#define CKA_NSS_PKCS8_SALT (CKA_NSS + 5)
#define CKA_NSS_PASSWORD_CHECK (CKA_NSS + 6)
#define CKA_NSS_EXPIRES (CKA_NSS + 7)
#define CKA_NSS_KRL (CKA_NSS + 8)
#define CKA_NSS_PQG_COUNTER (CKA_NSS + 20)
#define CKA_NSS_PQG_SEED (CKA_NSS + 21)
#define CKA_NSS_PQG_H (CKA_NSS + 22)
#define CKA_NSS_PQG_SEED_BITS (CKA_NSS + 23)
#define CKA_NSS_MODULE_SPEC (CKA_NSS + 24)
#define CKA_NSS_OVERRIDE_EXTENSIONS (CKA_NSS + 25)
/*
* Trust attributes:
*
* If trust goes standard, these probably will too. So I'll
* put them all in one place.
*/
#define CKA_TRUST (CKA_NSS + 0x2000)
/* "Usage" key information */
#define CKA_TRUST_DIGITAL_SIGNATURE (CKA_TRUST + 1)
#define CKA_TRUST_NON_REPUDIATION (CKA_TRUST + 2)
#define CKA_TRUST_KEY_ENCIPHERMENT (CKA_TRUST + 3)
#define CKA_TRUST_DATA_ENCIPHERMENT (CKA_TRUST + 4)
#define CKA_TRUST_KEY_AGREEMENT (CKA_TRUST + 5)
#define CKA_TRUST_KEY_CERT_SIGN (CKA_TRUST + 6)
#define CKA_TRUST_CRL_SIGN (CKA_TRUST + 7)
/* "Purpose" trust information */
#define CKA_TRUST_SERVER_AUTH (CKA_TRUST + 8)
#define CKA_TRUST_CLIENT_AUTH (CKA_TRUST + 9)
#define CKA_TRUST_CODE_SIGNING (CKA_TRUST + 10)
#define CKA_TRUST_EMAIL_PROTECTION (CKA_TRUST + 11)
#define CKA_TRUST_IPSEC_END_SYSTEM (CKA_TRUST + 12)
#define CKA_TRUST_IPSEC_TUNNEL (CKA_TRUST + 13)
#define CKA_TRUST_IPSEC_USER (CKA_TRUST + 14)
#define CKA_TRUST_TIME_STAMPING (CKA_TRUST + 15)
#define CKA_TRUST_STEP_UP_APPROVED (CKA_TRUST + 16)
#define CKA_CERT_SHA1_HASH (CKA_TRUST + 100)
#define CKA_CERT_MD5_HASH (CKA_TRUST + 101)
/* NSS trust stuff */
/* XXX fgmr new ones here-- step-up, etc. */
/* HISTORICAL: define used to pass in the database key for DSA private keys */
#define CKA_NETSCAPE_DB 0xD5A0DB00L
#define CKA_NETSCAPE_TRUST 0x80000001L
/*
* NSS-defined crypto mechanisms
*
*/
#define CKM_NSS (CKM_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
#define CKM_NSS_AES_KEY_WRAP (CKM_NSS + 1)
#define CKM_NSS_AES_KEY_WRAP_PAD (CKM_NSS + 2)
/*
* HISTORICAL:
* Do not attempt to use these. They are only used by NETSCAPE's internal
* PKCS #11 interface. Most of these are place holders for other mechanism
* and will change in the future.
*/
#define CKM_NETSCAPE_PBE_SHA1_DES_CBC 0x80000002L
#define CKM_NETSCAPE_PBE_SHA1_TRIPLE_DES_CBC 0x80000003L
#define CKM_NETSCAPE_PBE_SHA1_40_BIT_RC2_CBC 0x80000004L
#define CKM_NETSCAPE_PBE_SHA1_128_BIT_RC2_CBC 0x80000005L
#define CKM_NETSCAPE_PBE_SHA1_40_BIT_RC4 0x80000006L
#define CKM_NETSCAPE_PBE_SHA1_128_BIT_RC4 0x80000007L
#define CKM_NETSCAPE_PBE_SHA1_FAULTY_3DES_CBC 0x80000008L
#define CKM_NETSCAPE_PBE_SHA1_HMAC_KEY_GEN 0x80000009L
#define CKM_NETSCAPE_PBE_MD5_HMAC_KEY_GEN 0x8000000aL
#define CKM_NETSCAPE_PBE_MD2_HMAC_KEY_GEN 0x8000000bL
#define CKM_TLS_PRF_GENERAL 0x80000373L
/*
* NSS-defined return values
*
*/
#define CKR_NSS (CKM_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
#define CKR_NSS_CERTDB_FAILED (CKR_NSS + 1)
#define CKR_NSS_KEYDB_FAILED (CKR_NSS + 2)
/*
* Trust info
*
* This isn't part of the Cryptoki standard (yet), so I'm putting
* all the definitions here. Some of this would move to nssckt.h
* if trust info were made part of the standard. In view of this
* possibility, I'm putting my (NSS) values in the NSS
* vendor space, like everything else.
*/
typedef CK_ULONG CK_TRUST;
/* The following trust types are defined: */
#define CKT_VENDOR_DEFINED 0x80000000
#define CKT_NSS (CKT_VENDOR_DEFINED|NSSCK_VENDOR_NSS)
/* If trust goes standard, these'll probably drop out of vendor space. */
#define CKT_NSS_TRUSTED (CKT_NSS + 1)
#define CKT_NSS_TRUSTED_DELEGATOR (CKT_NSS + 2)
#define CKT_NSS_UNTRUSTED (CKT_NSS + 3)
#define CKT_NSS_MUST_VERIFY (CKT_NSS + 4)
#define CKT_NSS_TRUST_UNKNOWN (CKT_NSS + 5) /* default */
/*
* These may well remain NSS-specific; I'm only using them
* to cache resolution data.
*/
#define CKT_NSS_VALID (CKT_NSS + 10)
#define CKT_NSS_VALID_DELEGATOR (CKT_NSS + 11)
/* don't leave old programs in a lurch just yet, give them the old NETSCAPE
* synonym */
#define CKO_NETSCAPE_CRL CKO_NSS_CRL
#define CKO_NETSCAPE_SMIME CKO_NSS_SMIME
#define CKO_NETSCAPE_TRUST CKO_NSS_TRUST
#define CKO_NETSCAPE_BUILTIN_ROOT_LIST CKO_NSS_BUILTIN_ROOT_LIST
#define CKO_NETSCAPE_NEWSLOT CKO_NSS_NEWSLOT
#define CKO_NETSCAPE_DELSLOT CKO_NSS_DELSLOT
#define CKK_NETSCAPE_PKCS8 CKK_NSS_PKCS8
#define CKA_NETSCAPE_URL CKA_NSS_URL
#define CKA_NETSCAPE_EMAIL CKA_NSS_EMAIL
#define CKA_NETSCAPE_SMIME_INFO CKA_NSS_SMIME_INFO
#define CKA_NETSCAPE_SMIME_TIMESTAMP CKA_NSS_SMIME_TIMESTAMP
#define CKA_NETSCAPE_PKCS8_SALT CKA_NSS_PKCS8_SALT
#define CKA_NETSCAPE_PASSWORD_CHECK CKA_NSS_PASSWORD_CHECK
#define CKA_NETSCAPE_EXPIRES CKA_NSS_EXPIRES
#define CKA_NETSCAPE_KRL CKA_NSS_KRL
#define CKA_NETSCAPE_PQG_COUNTER CKA_NSS_PQG_COUNTER
#define CKA_NETSCAPE_PQG_SEED CKA_NSS_PQG_SEED
#define CKA_NETSCAPE_PQG_H CKA_NSS_PQG_H
#define CKA_NETSCAPE_PQG_SEED_BITS CKA_NSS_PQG_SEED_BITS
#define CKA_NETSCAPE_MODULE_SPEC CKA_NSS_MODULE_SPEC
#define CKM_NETSCAPE_AES_KEY_WRAP CKM_NSS_AES_KEY_WRAP
#define CKM_NETSCAPE_AES_KEY_WRAP_PAD CKM_NSS_AES_KEY_WRAP_PAD
#define CKR_NETSCAPE_CERTDB_FAILED CKR_NSS_CERTDB_FAILED
#define CKR_NETSCAPE_KEYDB_FAILED CKR_NSS_KEYDB_FAILED
#define CKT_NETSCAPE_TRUSTED CKT_NSS_TRUSTED
#define CKT_NETSCAPE_TRUSTED_DELEGATOR CKT_NSS_TRUSTED_DELEGATOR
#define CKT_NETSCAPE_UNTRUSTED CKT_NSS_UNTRUSTED
#define CKT_NETSCAPE_MUST_VERIFY CKT_NSS_MUST_VERIFY
#define CKT_NETSCAPE_TRUST_UNKNOWN CKT_NSS_TRUST_UNKNOWN
#define CKT_NETSCAPE_VALID CKT_NSS_VALID
#define CKT_NETSCAPE_VALID_DELEGATOR CKT_NSS_VALID_DELEGATOR
/*
* These are not really PKCS #11 values specifically. They are the 'loadable'
* module spec NSS uses. The are available for others to use as well, but not
* part of the formal PKCS #11 spec.
*
* The function 'FIND' returns an array of PKCS #11 initialization strings
* The function 'ADD' takes a PKCS #11 initialization string and stores it.
* The function 'DEL' takes a 'name= library=' value and deletes the associated
* string.
* The function 'RELEASE' frees the array returned by 'FIND'
*/
#define SECMOD_MODULE_DB_FUNCTION_FIND 0
#define SECMOD_MODULE_DB_FUNCTION_ADD 1
#define SECMOD_MODULE_DB_FUNCTION_DEL 2
#define SECMOD_MODULE_DB_FUNCTION_RELEASE 3
typedef char ** (PR_CALLBACK *SECMODModuleDBFunc)(unsigned long function,
char *parameters, void *moduleSpec);
/* softoken slot ID's */
#define SFTK_MIN_USER_SLOT_ID 4
#define SFTK_MAX_USER_SLOT_ID 100
#define SFTK_MIN_FIPS_USER_SLOT_ID 101
#define SFTK_MAX_FIPS_USER_SLOT_ID 127
#endif /* _PKCS11N_H_ */

View File

@@ -1,52 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Red Hat, Inc.
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _PKCS11NI_H_
#define _PKCS11NI_H_
/*
* pkcs11ni.h
*
* This file contains softoken private exports for NSS
*/
/* softoken slot ID's */
#define SFTK_MIN_USER_SLOT_ID 4
#define SFTK_MAX_USER_SLOT_ID 100
#define SFTK_MIN_FIPS_USER_SLOT_ID 101
#define SFTK_MAX_FIPS_USER_SLOT_ID 127
#endif /* _PKCS11NI_H_ */

View File

@@ -1,54 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* Copyright (C) 1994-1999 RSA Security Inc. Licence to copy this document
* is granted provided that it is identified as "RSA Security Inc. Public-Key
* Cryptography Standards (PKCS)" in all material mentioning or referencing
* this document.
*/
/* these data types are platform/implementation dependent. */
/*
* Packing was removed from the shipped RSA header files, even
* though it's still needed. put in a central file to help merging..
*/
#if defined(_WIN32)
#ifdef _MSC_VER
#pragma warning(disable:4103)
#endif
#pragma pack(push, cryptoki, 1)
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,52 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* Copyright (C) 1994-1999 RSA Security Inc. Licence to copy this document
* is granted provided that it is identified as "RSA Security Inc. Public-Key
* Cryptography Standards (PKCS)" in all material mentioning or referencing
* this document.
*/
/*
* reset any packing set by pkcs11p.h
*/
#if defined (_WIN32)
#ifdef _MSC_VER
#pragma warning(disable:4103)
#endif
#pragma pack(pop, cryptoki)
#endif

View File

@@ -1,917 +0,0 @@
/*
* PKCS#1 encoding and decoding functions.
* This file is believed to contain no code licensed from other parties.
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: rsawrapr.c,v 1.11 2006-10-23 21:24:38 wtchang%redhat.com Exp $ */
#include "blapi.h"
#include "softoken.h"
#include "sechash.h"
#include "lowkeyi.h"
#include "secerr.h"
#define RSA_BLOCK_MIN_PAD_LEN 8
#define RSA_BLOCK_FIRST_OCTET 0x00
#define RSA_BLOCK_PRIVATE0_PAD_OCTET 0x00
#define RSA_BLOCK_PRIVATE_PAD_OCTET 0xff
#define RSA_BLOCK_AFTER_PAD_OCTET 0x00
#define OAEP_SALT_LEN 8
#define OAEP_PAD_LEN 8
#define OAEP_PAD_OCTET 0x00
#define FLAT_BUFSIZE 512 /* bytes to hold flattened SHA1Context. */
static SHA1Context *
SHA1_CloneContext(SHA1Context *original)
{
SHA1Context * clone = NULL;
unsigned char *pBuf;
int sha1ContextSize = SHA1_FlattenSize(original);
SECStatus frv;
unsigned char buf[FLAT_BUFSIZE];
PORT_Assert(sizeof buf >= sha1ContextSize);
if (sizeof buf >= sha1ContextSize) {
pBuf = buf;
} else {
pBuf = PORT_Alloc(sha1ContextSize);
if (!pBuf)
goto done;
}
frv = SHA1_Flatten(original, pBuf);
if (frv == SECSuccess) {
clone = SHA1_Resurrect(pBuf, NULL);
memset(pBuf, 0, sha1ContextSize);
}
done:
if (pBuf != buf)
PORT_Free(pBuf);
return clone;
}
/*
* Modify data by XORing it with a special hash of salt.
*/
static SECStatus
oaep_xor_with_h1(unsigned char *data, unsigned int datalen,
unsigned char *salt, unsigned int saltlen)
{
SHA1Context *sha1cx;
unsigned char *dp, *dataend;
unsigned char end_octet;
sha1cx = SHA1_NewContext();
if (sha1cx == NULL) {
return SECFailure;
}
/*
* Get a hash of salt started; we will use it several times,
* adding in a different end octet (x00, x01, x02, ...).
*/
SHA1_Begin (sha1cx);
SHA1_Update (sha1cx, salt, saltlen);
end_octet = 0;
dp = data;
dataend = data + datalen;
while (dp < dataend) {
SHA1Context *sha1cx_h1;
unsigned int sha1len, sha1off;
unsigned char sha1[SHA1_LENGTH];
/*
* Create hash of (salt || end_octet)
*/
sha1cx_h1 = SHA1_CloneContext (sha1cx);
SHA1_Update (sha1cx_h1, &end_octet, 1);
SHA1_End (sha1cx_h1, sha1, &sha1len, sizeof(sha1));
SHA1_DestroyContext (sha1cx_h1, PR_TRUE);
PORT_Assert (sha1len == SHA1_LENGTH);
/*
* XOR that hash with the data.
* When we have fewer than SHA1_LENGTH octets of data
* left to xor, use just the low-order ones of the hash.
*/
sha1off = 0;
if ((dataend - dp) < SHA1_LENGTH)
sha1off = SHA1_LENGTH - (dataend - dp);
while (sha1off < SHA1_LENGTH)
*dp++ ^= sha1[sha1off++];
/*
* Bump for next hash chunk.
*/
end_octet++;
}
SHA1_DestroyContext (sha1cx, PR_TRUE);
return SECSuccess;
}
/*
* Modify salt by XORing it with a special hash of data.
*/
static SECStatus
oaep_xor_with_h2(unsigned char *salt, unsigned int saltlen,
unsigned char *data, unsigned int datalen)
{
unsigned char sha1[SHA1_LENGTH];
unsigned char *psalt, *psha1, *saltend;
SECStatus rv;
/*
* Create a hash of data.
*/
rv = SHA1_HashBuf (sha1, data, datalen);
if (rv != SECSuccess) {
return rv;
}
/*
* XOR the low-order octets of that hash with salt.
*/
PORT_Assert (saltlen <= SHA1_LENGTH);
saltend = salt + saltlen;
psalt = salt;
psha1 = sha1 + SHA1_LENGTH - saltlen;
while (psalt < saltend) {
*psalt++ ^= *psha1++;
}
return SECSuccess;
}
/*
* Format one block of data for public/private key encryption using
* the rules defined in PKCS #1.
*/
static unsigned char *
rsa_FormatOneBlock(unsigned modulusLen, RSA_BlockType blockType,
SECItem *data)
{
unsigned char *block;
unsigned char *bp;
int padLen;
int i;
SECStatus rv;
block = (unsigned char *) PORT_Alloc(modulusLen);
if (block == NULL)
return NULL;
bp = block;
/*
* All RSA blocks start with two octets:
* 0x00 || BlockType
*/
*bp++ = RSA_BLOCK_FIRST_OCTET;
*bp++ = (unsigned char) blockType;
switch (blockType) {
/*
* Blocks intended for private-key operation.
*/
case RSA_BlockPrivate0: /* essentially unused */
case RSA_BlockPrivate: /* preferred method */
/*
* 0x00 || BT || Pad || 0x00 || ActualData
* 1 1 padLen 1 data->len
* Pad is either all 0x00 or all 0xff bytes, depending on blockType.
*/
padLen = modulusLen - data->len - 3;
PORT_Assert (padLen >= RSA_BLOCK_MIN_PAD_LEN);
if (padLen < RSA_BLOCK_MIN_PAD_LEN) {
PORT_Free (block);
return NULL;
}
PORT_Memset (bp,
blockType == RSA_BlockPrivate0
? RSA_BLOCK_PRIVATE0_PAD_OCTET
: RSA_BLOCK_PRIVATE_PAD_OCTET,
padLen);
bp += padLen;
*bp++ = RSA_BLOCK_AFTER_PAD_OCTET;
PORT_Memcpy (bp, data->data, data->len);
break;
/*
* Blocks intended for public-key operation.
*/
case RSA_BlockPublic:
/*
* 0x00 || BT || Pad || 0x00 || ActualData
* 1 1 padLen 1 data->len
* Pad is all non-zero random bytes.
*/
padLen = modulusLen - data->len - 3;
PORT_Assert (padLen >= RSA_BLOCK_MIN_PAD_LEN);
if (padLen < RSA_BLOCK_MIN_PAD_LEN) {
PORT_Free (block);
return NULL;
}
for (i = 0; i < padLen; i++) {
/* Pad with non-zero random data. */
do {
rv = RNG_GenerateGlobalRandomBytes(bp + i, 1);
} while (rv == SECSuccess && bp[i] == RSA_BLOCK_AFTER_PAD_OCTET);
if (rv != SECSuccess) {
sftk_fatalError = PR_TRUE;
PORT_Free (block);
return NULL;
}
}
bp += padLen;
*bp++ = RSA_BLOCK_AFTER_PAD_OCTET;
PORT_Memcpy (bp, data->data, data->len);
break;
/*
* Blocks intended for public-key operation, using
* Optimal Asymmetric Encryption Padding (OAEP).
*/
case RSA_BlockOAEP:
/*
* 0x00 || BT || Modified2(Salt) || Modified1(PaddedData)
* 1 1 OAEP_SALT_LEN OAEP_PAD_LEN + data->len [+ N]
*
* where:
* PaddedData is "Pad1 || ActualData [|| Pad2]"
* Salt is random data.
* Pad1 is all zeros.
* Pad2, if present, is random data.
* (The "modified" fields are all the same length as the original
* unmodified values; they are just xor'd with other values.)
*
* Modified1 is an XOR of PaddedData with a special octet
* string constructed of iterated hashing of Salt (see below).
* Modified2 is an XOR of Salt with the low-order octets of
* the hash of Modified1 (see farther below ;-).
*
* Whew!
*/
/*
* Salt
*/
rv = RNG_GenerateGlobalRandomBytes(bp, OAEP_SALT_LEN);
if (rv != SECSuccess) {
sftk_fatalError = PR_TRUE;
PORT_Free (block);
return NULL;
}
bp += OAEP_SALT_LEN;
/*
* Pad1
*/
PORT_Memset (bp, OAEP_PAD_OCTET, OAEP_PAD_LEN);
bp += OAEP_PAD_LEN;
/*
* Data
*/
PORT_Memcpy (bp, data->data, data->len);
bp += data->len;
/*
* Pad2
*/
if (bp < (block + modulusLen)) {
rv = RNG_GenerateGlobalRandomBytes(bp, block - bp + modulusLen);
if (rv != SECSuccess) {
sftk_fatalError = PR_TRUE;
PORT_Free (block);
return NULL;
}
}
/*
* Now we have the following:
* 0x00 || BT || Salt || PaddedData
* (From this point on, "Pad1 || Data [|| Pad2]" is treated
* as the one entity PaddedData.)
*
* We need to turn PaddedData into Modified1.
*/
if (oaep_xor_with_h1(block + 2 + OAEP_SALT_LEN,
modulusLen - 2 - OAEP_SALT_LEN,
block + 2, OAEP_SALT_LEN) != SECSuccess) {
PORT_Free (block);
return NULL;
}
/*
* Now we have:
* 0x00 || BT || Salt || Modified1(PaddedData)
*
* The remaining task is to turn Salt into Modified2.
*/
if (oaep_xor_with_h2(block + 2, OAEP_SALT_LEN,
block + 2 + OAEP_SALT_LEN,
modulusLen - 2 - OAEP_SALT_LEN) != SECSuccess) {
PORT_Free (block);
return NULL;
}
break;
default:
PORT_Assert (0);
PORT_Free (block);
return NULL;
}
return block;
}
static SECStatus
rsa_FormatBlock(SECItem *result, unsigned modulusLen,
RSA_BlockType blockType, SECItem *data)
{
/*
* XXX For now assume that the data length fits in a single
* XXX encryption block; the ASSERTs below force this.
* XXX To fix it, each case will have to loop over chunks whose
* XXX lengths satisfy the assertions, until all data is handled.
* XXX (Unless RSA has more to say about how to handle data
* XXX which does not fit in a single encryption block?)
* XXX And I do not know what the result is supposed to be,
* XXX so the interface to this function may need to change
* XXX to allow for returning multiple blocks, if they are
* XXX not wanted simply concatenated one after the other.
*/
switch (blockType) {
case RSA_BlockPrivate0:
case RSA_BlockPrivate:
case RSA_BlockPublic:
/*
* 0x00 || BT || Pad || 0x00 || ActualData
*
* The "3" below is the first octet + the second octet + the 0x00
* octet that always comes just before the ActualData.
*/
PORT_Assert (data->len <= (modulusLen - (3 + RSA_BLOCK_MIN_PAD_LEN)));
result->data = rsa_FormatOneBlock(modulusLen, blockType, data);
if (result->data == NULL) {
result->len = 0;
return SECFailure;
}
result->len = modulusLen;
break;
case RSA_BlockOAEP:
/*
* 0x00 || BT || M1(Salt) || M2(Pad1||ActualData[||Pad2])
*
* The "2" below is the first octet + the second octet.
* (The other fields do not contain the clear values, but are
* the same length as the clear values.)
*/
PORT_Assert (data->len <= (modulusLen - (2 + OAEP_SALT_LEN
+ OAEP_PAD_LEN)));
result->data = rsa_FormatOneBlock(modulusLen, blockType, data);
if (result->data == NULL) {
result->len = 0;
return SECFailure;
}
result->len = modulusLen;
break;
case RSA_BlockRaw:
/*
* Pad || ActualData
* Pad is zeros. The application is responsible for recovering
* the actual data.
*/
if (data->len > modulusLen ) {
return SECFailure;
}
result->data = (unsigned char*)PORT_ZAlloc(modulusLen);
result->len = modulusLen;
PORT_Memcpy(result->data+(modulusLen-data->len),data->data,data->len);
break;
default:
PORT_Assert (0);
result->data = NULL;
result->len = 0;
return SECFailure;
}
return SECSuccess;
}
/* XXX Doesn't set error code */
SECStatus
RSA_Sign(NSSLOWKEYPrivateKey *key,
unsigned char * output,
unsigned int * output_len,
unsigned int maxOutputLen,
unsigned char * input,
unsigned int input_len)
{
SECStatus rv = SECSuccess;
unsigned int modulus_len = nsslowkey_PrivateModulusLen(key);
SECItem formatted;
SECItem unformatted;
if (maxOutputLen < modulus_len)
return SECFailure;
PORT_Assert(key->keyType == NSSLOWKEYRSAKey);
if (key->keyType != NSSLOWKEYRSAKey)
return SECFailure;
unformatted.len = input_len;
unformatted.data = input;
formatted.data = NULL;
rv = rsa_FormatBlock(&formatted, modulus_len, RSA_BlockPrivate,
&unformatted);
if (rv != SECSuccess)
goto done;
rv = RSA_PrivateKeyOpDoubleChecked(&key->u.rsa, output, formatted.data);
if (rv != SECSuccess && PORT_GetError() == SEC_ERROR_LIBRARY_FAILURE) {
sftk_fatalError = PR_TRUE;
}
*output_len = modulus_len;
goto done;
done:
if (formatted.data != NULL)
PORT_ZFree(formatted.data, modulus_len);
return rv;
}
/* XXX Doesn't set error code */
SECStatus
RSA_CheckSign(NSSLOWKEYPublicKey *key,
unsigned char * sign,
unsigned int sign_len,
unsigned char * hash,
unsigned int hash_len)
{
SECStatus rv;
unsigned int modulus_len = nsslowkey_PublicModulusLen(key);
unsigned int i;
unsigned char * buffer;
modulus_len = nsslowkey_PublicModulusLen(key);
if (sign_len != modulus_len)
goto failure;
/*
* 0x00 || BT || Pad || 0x00 || ActualData
*
* The "3" below is the first octet + the second octet + the 0x00
* octet that always comes just before the ActualData.
*/
if (hash_len > modulus_len - (3 + RSA_BLOCK_MIN_PAD_LEN))
goto failure;
PORT_Assert(key->keyType == NSSLOWKEYRSAKey);
if (key->keyType != NSSLOWKEYRSAKey)
goto failure;
buffer = (unsigned char *)PORT_Alloc(modulus_len + 1);
if (!buffer)
goto failure;
rv = RSA_PublicKeyOp(&key->u.rsa, buffer, sign);
if (rv != SECSuccess)
goto loser;
/*
* check the padding that was used
*/
if (buffer[0] != 0 || buffer[1] != 1)
goto loser;
for (i = 2; i < modulus_len - hash_len - 1; i++) {
if (buffer[i] != 0xff)
goto loser;
}
if (buffer[i] != 0)
goto loser;
/*
* make sure we get the same results
*/
if (PORT_Memcmp(buffer + modulus_len - hash_len, hash, hash_len) != 0)
goto loser;
PORT_Free(buffer);
return SECSuccess;
loser:
PORT_Free(buffer);
failure:
return SECFailure;
}
/* XXX Doesn't set error code */
SECStatus
RSA_CheckSignRecover(NSSLOWKEYPublicKey *key,
unsigned char * data,
unsigned int * data_len,
unsigned int max_output_len,
unsigned char * sign,
unsigned int sign_len)
{
SECStatus rv;
unsigned int modulus_len = nsslowkey_PublicModulusLen(key);
unsigned int i;
unsigned char * buffer;
if (sign_len != modulus_len)
goto failure;
PORT_Assert(key->keyType == NSSLOWKEYRSAKey);
if (key->keyType != NSSLOWKEYRSAKey)
goto failure;
buffer = (unsigned char *)PORT_Alloc(modulus_len + 1);
if (!buffer)
goto failure;
rv = RSA_PublicKeyOp(&key->u.rsa, buffer, sign);
if (rv != SECSuccess)
goto loser;
*data_len = 0;
/*
* check the padding that was used
*/
if (buffer[0] != 0 || buffer[1] != 1)
goto loser;
for (i = 2; i < modulus_len; i++) {
if (buffer[i] == 0) {
*data_len = modulus_len - i - 1;
break;
}
if (buffer[i] != 0xff)
goto loser;
}
if (*data_len == 0)
goto loser;
if (*data_len > max_output_len)
goto loser;
/*
* make sure we get the same results
*/
PORT_Memcpy(data,buffer + modulus_len - *data_len, *data_len);
PORT_Free(buffer);
return SECSuccess;
loser:
PORT_Free(buffer);
failure:
return SECFailure;
}
/* XXX Doesn't set error code */
SECStatus
RSA_EncryptBlock(NSSLOWKEYPublicKey *key,
unsigned char * output,
unsigned int * output_len,
unsigned int max_output_len,
unsigned char * input,
unsigned int input_len)
{
SECStatus rv;
unsigned int modulus_len = nsslowkey_PublicModulusLen(key);
SECItem formatted;
SECItem unformatted;
formatted.data = NULL;
if (max_output_len < modulus_len)
goto failure;
PORT_Assert(key->keyType == NSSLOWKEYRSAKey);
if (key->keyType != NSSLOWKEYRSAKey)
goto failure;
unformatted.len = input_len;
unformatted.data = input;
formatted.data = NULL;
rv = rsa_FormatBlock(&formatted, modulus_len, RSA_BlockPublic,
&unformatted);
if (rv != SECSuccess)
goto failure;
rv = RSA_PublicKeyOp(&key->u.rsa, output, formatted.data);
if (rv != SECSuccess)
goto failure;
PORT_ZFree(formatted.data, modulus_len);
*output_len = modulus_len;
return SECSuccess;
failure:
if (formatted.data != NULL)
PORT_ZFree(formatted.data, modulus_len);
return SECFailure;
}
/* XXX Doesn't set error code */
SECStatus
RSA_DecryptBlock(NSSLOWKEYPrivateKey *key,
unsigned char * output,
unsigned int * output_len,
unsigned int max_output_len,
unsigned char * input,
unsigned int input_len)
{
SECStatus rv;
unsigned int modulus_len = nsslowkey_PrivateModulusLen(key);
unsigned int i;
unsigned char * buffer;
PORT_Assert(key->keyType == NSSLOWKEYRSAKey);
if (key->keyType != NSSLOWKEYRSAKey)
goto failure;
if (input_len != modulus_len)
goto failure;
buffer = (unsigned char *)PORT_Alloc(modulus_len + 1);
if (!buffer)
goto failure;
rv = RSA_PrivateKeyOp(&key->u.rsa, buffer, input);
if (rv != SECSuccess) {
if (PORT_GetError() == SEC_ERROR_LIBRARY_FAILURE) {
sftk_fatalError = PR_TRUE;
}
goto loser;
}
if (buffer[0] != 0 || buffer[1] != 2)
goto loser;
*output_len = 0;
for (i = 2; i < modulus_len; i++) {
if (buffer[i] == 0) {
*output_len = modulus_len - i - 1;
break;
}
}
if (*output_len == 0)
goto loser;
if (*output_len > max_output_len)
goto loser;
PORT_Memcpy(output, buffer + modulus_len - *output_len, *output_len);
PORT_Free(buffer);
return SECSuccess;
loser:
PORT_Free(buffer);
failure:
return SECFailure;
}
/* XXX Doesn't set error code */
/*
* added to make pkcs #11 happy
* RAW is RSA_X_509
*/
SECStatus
RSA_SignRaw(NSSLOWKEYPrivateKey *key,
unsigned char * output,
unsigned int * output_len,
unsigned int maxOutputLen,
unsigned char * input,
unsigned int input_len)
{
SECStatus rv = SECSuccess;
unsigned int modulus_len = nsslowkey_PrivateModulusLen(key);
SECItem formatted;
SECItem unformatted;
if (maxOutputLen < modulus_len)
return SECFailure;
PORT_Assert(key->keyType == NSSLOWKEYRSAKey);
if (key->keyType != NSSLOWKEYRSAKey)
return SECFailure;
unformatted.len = input_len;
unformatted.data = input;
formatted.data = NULL;
rv = rsa_FormatBlock(&formatted, modulus_len, RSA_BlockRaw, &unformatted);
if (rv != SECSuccess)
goto done;
rv = RSA_PrivateKeyOpDoubleChecked(&key->u.rsa, output, formatted.data);
if (rv != SECSuccess && PORT_GetError() == SEC_ERROR_LIBRARY_FAILURE) {
sftk_fatalError = PR_TRUE;
}
*output_len = modulus_len;
done:
if (formatted.data != NULL)
PORT_ZFree(formatted.data, modulus_len);
return rv;
}
/* XXX Doesn't set error code */
SECStatus
RSA_CheckSignRaw(NSSLOWKEYPublicKey *key,
unsigned char * sign,
unsigned int sign_len,
unsigned char * hash,
unsigned int hash_len)
{
SECStatus rv;
unsigned int modulus_len = nsslowkey_PublicModulusLen(key);
unsigned char * buffer;
if (sign_len != modulus_len)
goto failure;
if (hash_len > modulus_len)
goto failure;
PORT_Assert(key->keyType == NSSLOWKEYRSAKey);
if (key->keyType != NSSLOWKEYRSAKey)
goto failure;
buffer = (unsigned char *)PORT_Alloc(modulus_len + 1);
if (!buffer)
goto failure;
rv = RSA_PublicKeyOp(&key->u.rsa, buffer, sign);
if (rv != SECSuccess)
goto loser;
/*
* make sure we get the same results
*/
/* NOTE: should we verify the leading zeros? */
if (PORT_Memcmp(buffer + (modulus_len-hash_len), hash, hash_len) != 0)
goto loser;
PORT_Free(buffer);
return SECSuccess;
loser:
PORT_Free(buffer);
failure:
return SECFailure;
}
/* XXX Doesn't set error code */
SECStatus
RSA_CheckSignRecoverRaw(NSSLOWKEYPublicKey *key,
unsigned char * data,
unsigned int * data_len,
unsigned int max_output_len,
unsigned char * sign,
unsigned int sign_len)
{
SECStatus rv;
unsigned int modulus_len = nsslowkey_PublicModulusLen(key);
if (sign_len != modulus_len)
goto failure;
if (max_output_len < modulus_len)
goto failure;
PORT_Assert(key->keyType == NSSLOWKEYRSAKey);
if (key->keyType != NSSLOWKEYRSAKey)
goto failure;
rv = RSA_PublicKeyOp(&key->u.rsa, data, sign);
if (rv != SECSuccess)
goto failure;
*data_len = modulus_len;
return SECSuccess;
failure:
return SECFailure;
}
/* XXX Doesn't set error code */
SECStatus
RSA_EncryptRaw(NSSLOWKEYPublicKey *key,
unsigned char * output,
unsigned int * output_len,
unsigned int max_output_len,
unsigned char * input,
unsigned int input_len)
{
SECStatus rv;
unsigned int modulus_len = nsslowkey_PublicModulusLen(key);
SECItem formatted;
SECItem unformatted;
formatted.data = NULL;
if (max_output_len < modulus_len)
goto failure;
PORT_Assert(key->keyType == NSSLOWKEYRSAKey);
if (key->keyType != NSSLOWKEYRSAKey)
goto failure;
unformatted.len = input_len;
unformatted.data = input;
formatted.data = NULL;
rv = rsa_FormatBlock(&formatted, modulus_len, RSA_BlockRaw, &unformatted);
if (rv != SECSuccess)
goto failure;
rv = RSA_PublicKeyOp(&key->u.rsa, output, formatted.data);
if (rv != SECSuccess)
goto failure;
PORT_ZFree(formatted.data, modulus_len);
*output_len = modulus_len;
return SECSuccess;
failure:
if (formatted.data != NULL)
PORT_ZFree(formatted.data, modulus_len);
return SECFailure;
}
/* XXX Doesn't set error code */
SECStatus
RSA_DecryptRaw(NSSLOWKEYPrivateKey *key,
unsigned char * output,
unsigned int * output_len,
unsigned int max_output_len,
unsigned char * input,
unsigned int input_len)
{
SECStatus rv;
unsigned int modulus_len = nsslowkey_PrivateModulusLen(key);
if (modulus_len <= 0)
goto failure;
if (modulus_len > max_output_len)
goto failure;
PORT_Assert(key->keyType == NSSLOWKEYRSAKey);
if (key->keyType != NSSLOWKEYRSAKey)
goto failure;
if (input_len != modulus_len)
goto failure;
rv = RSA_PrivateKeyOp(&key->u.rsa, output, input);
if (rv != SECSuccess) {
if (PORT_GetError() == SEC_ERROR_LIBRARY_FAILURE) {
sftk_fatalError = PR_TRUE;
}
goto failure;
}
*output_len = modulus_len;
return SECSuccess;
failure:
return SECFailure;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,115 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Red Hat, Inc.
*
* The Initial Developer of the Original Code is
* Red Hat, Inc.
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Robert Relyea (rrelyea@redhat.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* This file implements PKCS 11 on top of our existing security modules
*
* For more information about PKCS 11 See PKCS 11 Token Inteface Standard.
* This implementation has two slots:
* slot 1 is our generic crypto support. It does not require login.
* It supports Public Key ops, and all they bulk ciphers and hashes.
* It can also support Private Key ops for imported Private keys. It does
* not have any token storage.
* slot 2 is our private key support. It requires a login before use. It
* can store Private Keys and Certs as token objects. Currently only private
* keys and their associated Certificates are saved on the token.
*
* In this implementation, session objects are only visible to the session
* that created or generated them.
*/
/*
* the following data structures should be moved to a 'rdb.h'.
*/
#ifndef _SDB_H
#define _SDB_H 1
#include "pkcs11t.h"
#include "secitem.h"
#include "sftkdbt.h"
#include <sqlite3.h>
#define STATIC_CMD_SIZE 2048
typedef struct SDBFindStr SDBFind;
typedef struct SDBStr SDB;
typedef struct SDBPasswordEntryStr SDBPasswordEntry;
struct SDBStr {
void *private;
int version;
SDBType sdb_type;
int sdb_flags;
void *app_private;
CK_RV (*sdb_FindObjectsInit)(SDB *sdb, const CK_ATTRIBUTE *template,
CK_ULONG count, SDBFind **find);
CK_RV (*sdb_FindObjects)(SDB *sdb, SDBFind *find, CK_OBJECT_HANDLE *ids,
CK_ULONG arraySize, CK_ULONG *count);
CK_RV (*sdb_FindObjectsFinal)(SDB *sdb, SDBFind *find);
CK_RV (*sdb_GetAttributeValue)(SDB *sdb, CK_OBJECT_HANDLE object,
CK_ATTRIBUTE *template, CK_ULONG count);
CK_RV (*sdb_SetAttributeValue)(SDB *sdb, CK_OBJECT_HANDLE object,
const CK_ATTRIBUTE *template, CK_ULONG count);
CK_RV (*sdb_CreateObject)(SDB *sdb, CK_OBJECT_HANDLE *object,
const CK_ATTRIBUTE *template, CK_ULONG count);
CK_RV (*sdb_DestroyObject)(SDB *sdb, CK_OBJECT_HANDLE object);
CK_RV (*sdb_GetPWEntry)(SDB *sdb, SDBPasswordEntry *entry);
CK_RV (*sdb_PutPWEntry)(SDB *sdb, SDBPasswordEntry *entry);
CK_RV (*sdb_Begin)(SDB *sdb);
CK_RV (*sdb_Commit)(SDB *sdb);
CK_RV (*sdb_Abort)(SDB *sdb);
CK_RV (*sdb_Reset)(SDB *sdb);
CK_RV (*sdb_Close)(SDB *sdb);
};
struct SDBPasswordEntryStr {
SECItem salt;
SECItem value;
unsigned char data[128];
};
CK_RV s_open(const char *directory, const char *certPrefix,
const char *keyPrefix,
int cert_version, int key_version,
int flags, SDB **certdb, SDB **keydb, int *newInit);
CK_RV s_shutdown();
/* flags */
#define SDB_RDONLY 1
#define SDB_RDWR 2
#define SDB_CREATE 4
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,89 +0,0 @@
/*
* license
*/
#include "sftkdbt.h"
#include "sdb.h"
#include "pkcs11i.h"
#include "pkcs11t.h"
/* raw database stuff */
CK_RV sftkdb_write(SFTKDBHandle *handle, SFTKObject *,CK_OBJECT_HANDLE *);
CK_RV sftkdb_FindObjectsInit(SFTKDBHandle *sdb, const CK_ATTRIBUTE *template,
CK_ULONG count, SDBFind **find);
CK_RV sftkdb_FindObjects(SFTKDBHandle *sdb, SDBFind *find,
CK_OBJECT_HANDLE *ids, int arraySize, CK_ULONG *count);
CK_RV sftkdb_FindObjectsFinal(SFTKDBHandle *sdb, SDBFind *find);
CK_RV sftkdb_GetAttributeValue(SFTKDBHandle *handle,
CK_OBJECT_HANDLE object_id, CK_ATTRIBUTE *template, CK_ULONG count);
CK_RV sftkdb_SetAttributeValue(SFTKDBHandle *handle,
CK_OBJECT_HANDLE object_id, const CK_ATTRIBUTE *template,
CK_ULONG count);
CK_RV sftkdb_DestroyObject(SFTKDBHandle *handle, CK_OBJECT_HANDLE object_id);
CK_RV sftkdb_closeDB(SFTKDBHandle *handle);
/* secmod.db functions */
char ** sftkdb_ReadSecmodDB(SDBType dbType, const char *appName,
const char *filename, const char *dbname,
char *params, PRBool rw);
SECStatus sftkdb_ReleaseSecmodDBData(SDBType dbType, const char *appName,
const char *filename, const char *dbname,
char **moduleSpecList, PRBool rw);
SECStatus sftkdb_DeleteSecmodDB(SDBType dbType, const char *appName,
const char *filename, const char *dbname,
char *args, PRBool rw);
SECStatus sftkdb_AddSecmodDB(SDBType dbType, const char *appName,
const char *filename, const char *dbname,
char *module, PRBool rw);
/* keydb functions */
SECStatus sftkdb_PWIsInitialized(SFTKDBHandle *keydb);
SECStatus sftkdb_CheckPassword(SFTKDBHandle *keydb, const char *pw);
SECStatus sftkdb_PWCached(SFTKDBHandle *keydb);
SECStatus sftkdb_HasPasswordSet(SFTKDBHandle *keydb);
SECStatus sftkdb_ResetKeyDB(SFTKDBHandle *keydb);
SECStatus sftkdb_ChangePassword(SFTKDBHandle *keydb, char *oldPin, char *newPin);
SECStatus sftkdb_ClearPassword(SFTKDBHandle *keydb);
/* Utility functions */
/*
* OK there are now lots of options here, lets go through them all:
*
* configdir - base directory where all the cert, key, and module datbases live.
* certPrefix - prefix added to the beginning of the cert database example: "
* "https-server1-"
* keyPrefix - prefix added to the beginning of the key database example: "
* "https-server1-"
* secmodName - name of the security module database (usually "secmod.db").
* readOnly - Boolean: true if the databases are to be openned read only.
* nocertdb - Don't open the cert DB and key DB's, just initialize the
* Volatile certdb.
* nomoddb - Don't open the security module DB, just initialize the
* PKCS #11 module.
* forceOpen - Continue to force initializations even if the databases cannot
* be opened.
*/
CK_RV sftk_DBInit(const char *configdir, const char *certPrefix,
const char *keyPrefix, PRBool readOnly, PRBool noCertDB,
PRBool noKeyDB, PRBool forceOpen,
SFTKDBHandle **certDB, SFTKDBHandle **keyDB);
CK_RV sftkdb_Shutdown(void);
SFTKDBHandle *sftk_getCertDB(SFTKSlot *slot);
SFTKDBHandle *sftk_getKeyDB(SFTKSlot *slot);
SFTKDBHandle *sftk_getDBForObject(SFTKSlot *slot, CK_OBJECT_HANDLE objectID);
void sftk_freeDB(SFTKDBHandle *certHandle);
/*
* for lgglue, stubs to encrypt and decrypt password entries
*/
SECStatus sftkdb_encrypt_stub(PRArenaPool *arena, SDB *sdb, SECItem *plainText,
SECItem **cipherText);
SECStatus sftkdb_decrypt_stub(SDB *sdb, SECItem *cipherText,
SECItem **plainText);

View File

@@ -1,17 +0,0 @@
/*
* license
*/
#ifndef SFTKDBT_H
#define SFTKDBT_H 1
typedef struct SFTKDBHandleStr SFTKDBHandle;
typedef enum {
SDB_SQL,
SDB_EXTERN,
SDB_LEGACY,
SDB_MULTIACCESS
} SDBType;
#endif

View File

@@ -1,616 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* The following code handles the storage of PKCS 11 modules used by the
* NSS. This file is written to abstract away how the modules are
* stored so we can deside that later.
*/
#include "sftkpars.h"
#include "pkcs11i.h"
#include "sdb.h"
#include "prprf.h"
#include "prenv.h"
/*
* this file contains routines for parsing PKCS #11 module spec
* strings.
*/
#define SFTK_HANDLE_STRING_ARG(param,target,value,command) \
if (PORT_Strncasecmp(param,value,sizeof(value)-1) == 0) { \
param += sizeof(value)-1; \
target = sftk_argFetchValue(param,&next); \
param += next; \
command ;\
} else
#define SFTK_HANDLE_FINAL_ARG(param) \
{ param = sftk_argSkipParameter(param); } param = sftk_argStrip(param);
static PRBool sftk_argGetPair(char c) {
switch (c) {
case '\'': return c;
case '\"': return c;
case '<': return '>';
case '{': return '}';
case '[': return ']';
case '(': return ')';
default: break;
}
return ' ';
}
static PRBool sftk_argIsBlank(char c) {
return isspace(c);
}
static PRBool sftk_argIsEscape(char c) {
return c == '\\';
}
static PRBool sftk_argIsQuote(char c) {
switch (c) {
case '\'':
case '\"':
case '<':
case '{': /* } end curly to keep vi bracket matching working */
case '(': /* ) */
case '[': /* ] */ return PR_TRUE;
default: break;
}
return PR_FALSE;
}
char *sftk_argStrip(char *c) {
while (*c && sftk_argIsBlank(*c)) c++;
return c;
}
static char *
sftk_argFindEnd(char *string) {
char endChar = ' ';
PRBool lastEscape = PR_FALSE;
if (sftk_argIsQuote(*string)) {
endChar = sftk_argGetPair(*string);
string++;
}
for (;*string; string++) {
if (lastEscape) {
lastEscape = PR_FALSE;
continue;
}
if (sftk_argIsEscape(*string) && !lastEscape) {
lastEscape = PR_TRUE;
continue;
}
if ((endChar == ' ') && sftk_argIsBlank(*string)) break;
if (*string == endChar) {
break;
}
}
return string;
}
char *
sftk_argFetchValue(char *string, int *pcount)
{
char *end = sftk_argFindEnd(string);
char *retString, *copyString;
PRBool lastEscape = PR_FALSE;
int len;
len = end - string;
if (len == 0) {
*pcount = 0;
return NULL;
}
copyString = retString = (char *)PORT_Alloc(len+1);
if (*end) len++;
*pcount = len;
if (retString == NULL) return NULL;
if (sftk_argIsQuote(*string)) string++;
for (; string < end; string++) {
if (sftk_argIsEscape(*string) && !lastEscape) {
lastEscape = PR_TRUE;
continue;
}
lastEscape = PR_FALSE;
*copyString++ = *string;
}
*copyString = 0;
return retString;
}
static char *
sftk_argSkipParameter(char *string)
{
char *end;
/* look for the end of the <name>= */
for (;*string; string++) {
if (*string == '=') { string++; break; }
if (sftk_argIsBlank(*string)) return(string);
}
end = sftk_argFindEnd(string);
if (*end) end++;
return end;
}
char *
sftk_argGetParamValue(char *paramName,char *parameters)
{
char searchValue[256];
int paramLen = strlen(paramName);
char *returnValue = NULL;
int next;
if ((parameters == NULL) || (*parameters == 0)) return NULL;
PORT_Assert(paramLen+2 < sizeof(searchValue));
PORT_Strcpy(searchValue,paramName);
PORT_Strcat(searchValue,"=");
while (*parameters) {
if (PORT_Strncasecmp(parameters,searchValue,paramLen+1) == 0) {
parameters += paramLen+1;
returnValue = sftk_argFetchValue(parameters,&next);
break;
} else {
parameters = sftk_argSkipParameter(parameters);
}
parameters = sftk_argStrip(parameters);
}
return returnValue;
}
static char *
sftk_argNextFlag(char *flags)
{
for (; *flags ; flags++) {
if (*flags == ',') {
flags++;
break;
}
}
return flags;
}
static PRBool
sftk_argHasFlag(char *label, char *flag, char *parameters)
{
char *flags,*index;
int len = strlen(flag);
PRBool found = PR_FALSE;
flags = sftk_argGetParamValue(label,parameters);
if (flags == NULL) return PR_FALSE;
for (index=flags; *index; index=sftk_argNextFlag(index)) {
if (PORT_Strncasecmp(index,flag,len) == 0) {
found=PR_TRUE;
break;
}
}
PORT_Free(flags);
return found;
}
/*
* decode a number. handle octal (leading '0'), hex (leading '0x') or decimal
*/
static long
sftk_argDecodeNumber(char *num)
{
int radix = 10;
unsigned long value = 0;
long retValue = 0;
int sign = 1;
int digit;
if (num == NULL) return retValue;
num = sftk_argStrip(num);
if (*num == '-') {
sign = -1;
num++;
}
if (*num == '0') {
radix = 8;
num++;
if ((*num == 'x') || (*num == 'X')) {
radix = 16;
num++;
}
}
for ( ;*num; num++ ) {
if (isdigit(*num)) {
digit = *num - '0';
} else if ((*num >= 'a') && (*num <= 'f')) {
digit = *num - 'a' + 10;
} else if ((*num >= 'A') && (*num <= 'F')) {
digit = *num - 'A' + 10;
} else {
break;
}
if (digit >= radix) break;
value = value*radix + digit;
}
retValue = ((int) value) * sign;
return retValue;
}
static char *
sftk_argGetName(char *inString, int *next)
{
char *name=NULL;
char *string;
int len;
/* look for the end of the <name>= */
for (string = inString;*string; string++) {
if (*string == '=') { break; }
if (sftk_argIsBlank(*string)) break;
}
len = string - inString;
*next = len;
if (*string == '=') (*next) += 1;
if (len > 0) {
name = PORT_Alloc(len+1);
PORT_Strncpy(name,inString,len);
name[len] = 0;
}
return name;
}
#define FREE_CLEAR(p) if (p) { PORT_Free(p); p = NULL; }
static void
sftk_parseTokenFlags(char *tmp, sftk_token_parameters *parsed) {
parsed->readOnly = sftk_argHasFlag("flags","readOnly",tmp);
parsed->noCertDB = sftk_argHasFlag("flags","noCertDB",tmp);
parsed->noKeyDB = sftk_argHasFlag("flags","noKeyDB",tmp);
parsed->forceOpen = sftk_argHasFlag("flags","forceOpen",tmp);
parsed->pwRequired = sftk_argHasFlag("flags","passwordRequired",tmp);
parsed->optimizeSpace = sftk_argHasFlag("flags","optimizeSpace",tmp);
return;
}
static void
sftk_parseFlags(char *tmp, sftk_parameters *parsed) {
parsed->noModDB = sftk_argHasFlag("flags","noModDB",tmp);
parsed->readOnly = sftk_argHasFlag("flags","readOnly",tmp);
/* keep legacy interface working */
parsed->noCertDB = sftk_argHasFlag("flags","noCertDB",tmp);
parsed->forceOpen = sftk_argHasFlag("flags","forceOpen",tmp);
parsed->pwRequired = sftk_argHasFlag("flags","passwordRequired",tmp);
parsed->optimizeSpace = sftk_argHasFlag("flags","optimizeSpace",tmp);
return;
}
static CK_RV
sftk_parseTokenParameters(char *param, sftk_token_parameters *parsed)
{
int next;
char *tmp;
char *index;
index = sftk_argStrip(param);
while (*index) {
SFTK_HANDLE_STRING_ARG(index,parsed->configdir,"configDir=",;)
SFTK_HANDLE_STRING_ARG(index,parsed->certPrefix,"certPrefix=",;)
SFTK_HANDLE_STRING_ARG(index,parsed->keyPrefix,"keyPrefix=",;)
SFTK_HANDLE_STRING_ARG(index,parsed->tokdes,"tokenDescription=",;)
SFTK_HANDLE_STRING_ARG(index,parsed->slotdes,"slotDescription=",;)
SFTK_HANDLE_STRING_ARG(index,tmp,"minPWLen=",
if(tmp) { parsed->minPW=atoi(tmp); PORT_Free(tmp); })
SFTK_HANDLE_STRING_ARG(index,tmp,"flags=",
if(tmp) { sftk_parseTokenFlags(param,parsed); PORT_Free(tmp); })
SFTK_HANDLE_FINAL_ARG(index)
}
return CKR_OK;
}
static void
sftk_parseTokens(char *tokenParams, sftk_parameters *parsed)
{
char *tokenIndex;
sftk_token_parameters *tokens = NULL;
int i=0,count = 0,next;
if ((tokenParams == NULL) || (*tokenParams == 0)) return;
/* first count the number of slots */
for (tokenIndex = sftk_argStrip(tokenParams); *tokenIndex;
tokenIndex = sftk_argStrip(sftk_argSkipParameter(tokenIndex))) {
count++;
}
/* get the data structures */
tokens = (sftk_token_parameters *)
PORT_ZAlloc(count*sizeof(sftk_token_parameters));
if (tokens == NULL) return;
for (tokenIndex = sftk_argStrip(tokenParams), i = 0;
*tokenIndex && i < count ; i++ ) {
char *name;
name = sftk_argGetName(tokenIndex,&next);
tokenIndex += next;
tokens[i].slotID = sftk_argDecodeNumber(name);
tokens[i].readOnly = PR_FALSE;
tokens[i].noCertDB = PR_FALSE;
tokens[i].noKeyDB = PR_FALSE;
if (!sftk_argIsBlank(*tokenIndex)) {
char *args = sftk_argFetchValue(tokenIndex,&next);
tokenIndex += next;
if (args) {
sftk_parseTokenParameters(args,&tokens[i]);
PORT_Free(args);
}
}
if (name) PORT_Free(name);
tokenIndex = sftk_argStrip(tokenIndex);
}
parsed->token_count = i;
parsed->tokens = tokens;
return;
}
CK_RV
sftk_parseParameters(char *param, sftk_parameters *parsed, PRBool isFIPS)
{
int next;
char *tmp;
char *index;
char *certPrefix = NULL, *keyPrefix = NULL;
char *tokdes = NULL, *ptokdes = NULL;
char *slotdes = NULL, *pslotdes = NULL;
char *fslotdes = NULL, *fpslotdes = NULL;
char *minPW = NULL;
index = sftk_argStrip(param);
PORT_Memset(parsed, 0, sizeof(sftk_parameters));
while (*index) {
SFTK_HANDLE_STRING_ARG(index,parsed->configdir,"configDir=",;)
SFTK_HANDLE_STRING_ARG(index,parsed->secmodName,"secmod=",;)
SFTK_HANDLE_STRING_ARG(index,parsed->man,"manufacturerID=",;)
SFTK_HANDLE_STRING_ARG(index,parsed->libdes,"libraryDescription=",;)
/* constructed values, used so legacy interfaces still work */
SFTK_HANDLE_STRING_ARG(index,certPrefix,"certPrefix=",;)
SFTK_HANDLE_STRING_ARG(index,keyPrefix,"keyPrefix=",;)
SFTK_HANDLE_STRING_ARG(index,tokdes,"cryptoTokenDescription=",;)
SFTK_HANDLE_STRING_ARG(index,ptokdes,"dbTokenDescription=",;)
SFTK_HANDLE_STRING_ARG(index,slotdes,"cryptoSlotDescription=",;)
SFTK_HANDLE_STRING_ARG(index,pslotdes,"dbSlotDescription=",;)
SFTK_HANDLE_STRING_ARG(index,fslotdes,"FIPSSlotDescription=",;)
SFTK_HANDLE_STRING_ARG(index,fpslotdes,"FIPSTokenDescription=",;)
SFTK_HANDLE_STRING_ARG(index,minPW,"minPWLen=",;)
SFTK_HANDLE_STRING_ARG(index,tmp,"flags=",
if(tmp) { sftk_parseFlags(param,parsed); PORT_Free(tmp); })
SFTK_HANDLE_STRING_ARG(index,tmp,"tokens=",
if(tmp) { sftk_parseTokens(tmp,parsed); PORT_Free(tmp); })
SFTK_HANDLE_FINAL_ARG(index)
}
if (parsed->tokens == NULL) {
int count = isFIPS ? 1 : 2;
int index = count-1;
sftk_token_parameters *tokens = NULL;
tokens = (sftk_token_parameters *)
PORT_ZAlloc(count*sizeof(sftk_token_parameters));
if (tokens == NULL) {
goto loser;
}
parsed->tokens = tokens;
parsed->token_count = count;
tokens[index].slotID = isFIPS ? FIPS_SLOT_ID : PRIVATE_KEY_SLOT_ID;
tokens[index].certPrefix = certPrefix;
tokens[index].keyPrefix = keyPrefix;
tokens[index].minPW = minPW ? atoi(minPW) : 0;
tokens[index].readOnly = parsed->readOnly;
tokens[index].noCertDB = parsed->noCertDB;
tokens[index].noKeyDB = parsed->noCertDB;
tokens[index].forceOpen = parsed->forceOpen;
tokens[index].pwRequired = parsed->pwRequired;
tokens[index].optimizeSpace = parsed->optimizeSpace;
tokens[0].optimizeSpace = parsed->optimizeSpace;
certPrefix = NULL;
keyPrefix = NULL;
if (isFIPS) {
tokens[index].tokdes = fslotdes;
tokens[index].slotdes = fpslotdes;
fslotdes = NULL;
fpslotdes = NULL;
} else {
tokens[index].tokdes = ptokdes;
tokens[index].slotdes = pslotdes;
tokens[0].slotID = NETSCAPE_SLOT_ID;
tokens[0].tokdes = tokdes;
tokens[0].slotdes = slotdes;
tokens[0].noCertDB = PR_TRUE;
tokens[0].noKeyDB = PR_TRUE;
ptokdes = NULL;
pslotdes = NULL;
tokdes = NULL;
slotdes = NULL;
}
}
loser:
FREE_CLEAR(certPrefix);
FREE_CLEAR(keyPrefix);
FREE_CLEAR(tokdes);
FREE_CLEAR(ptokdes);
FREE_CLEAR(slotdes);
FREE_CLEAR(pslotdes);
FREE_CLEAR(fslotdes);
FREE_CLEAR(fpslotdes);
FREE_CLEAR(minPW);
return CKR_OK;
}
void
sftk_freeParams(sftk_parameters *params)
{
int i;
for (i=0; i < params->token_count; i++) {
FREE_CLEAR(params->tokens[i].configdir);
FREE_CLEAR(params->tokens[i].certPrefix);
FREE_CLEAR(params->tokens[i].keyPrefix);
FREE_CLEAR(params->tokens[i].tokdes);
FREE_CLEAR(params->tokens[i].slotdes);
}
FREE_CLEAR(params->configdir);
FREE_CLEAR(params->secmodName);
FREE_CLEAR(params->man);
FREE_CLEAR(params->libdes);
FREE_CLEAR(params->tokens);
}
#define SQLDB "sql:"
#define EXTERNDB "extern:"
#define LEGACY "dbm:"
const char *
sftk_EvaluateConfigDir(const char *configdir, SDBType *dbType, char **appName)
{
*appName = NULL;
*dbType = SDB_LEGACY;
if (PORT_Strncmp(configdir, MULTIACCESS, sizeof(MULTIACCESS)-1) == 0) {
char *cdir;
*dbType = SDB_MULTIACCESS;
*appName = PORT_Strdup(configdir+sizeof(MULTIACCESS)-1);
if (*appName == NULL) {
return configdir;
}
cdir = *appName;
while (*cdir && *cdir != ':') {
cdir++;
}
if (*cdir == ':') {
*cdir = 0;
cdir++;
}
configdir = cdir;
} else if (PORT_Strncmp(configdir, SQLDB, sizeof(SQLDB)-1) == 0) {
*dbType = SDB_SQL;
configdir = configdir + sizeof(SQLDB) -1;
} else if (PORT_Strncmp(configdir, EXTERNDB, sizeof(EXTERNDB)-1) == 0) {
*dbType = SDB_EXTERN;
configdir = configdir + sizeof(EXTERNDB) -1;
} else if (PORT_Strncmp(configdir, LEGACY, sizeof(LEGACY)-1) == 0) {
*dbType = SDB_LEGACY;
configdir = configdir + sizeof(LEGACY) -1;
} else {
/* look up the default from the environment */
char *defaultType = PR_GetEnv("NSS_DEFAULT_DB_TYPE");
if (defaultType == NULL) {
/* none specified, go with the legacy */
return configdir;
}
if (PORT_Strncmp(defaultType, SQLDB, sizeof(SQLDB)-2) == 0) {
*dbType = SDB_SQL;
} else if (PORT_Strncmp(defaultType,EXTERNDB,sizeof(EXTERNDB)-2)==0) {
*dbType = SDB_EXTERN;
} else if (PORT_Strncmp(defaultType, LEGACY, sizeof(LEGACY)-2) == 0) {
*dbType = SDB_LEGACY;
}
}
return configdir;
}
char *
sftk_getSecmodName(char *param, SDBType *dbType, char **appName,
char **filename, PRBool *rw)
{
int next;
char *configdir = NULL;
char *secmodName = NULL;
char *value = NULL;
char *save_params = param;
const char *lconfigdir;
param = sftk_argStrip(param);
while (*param) {
SFTK_HANDLE_STRING_ARG(param,configdir,"configDir=",;)
SFTK_HANDLE_STRING_ARG(param,secmodName,"secmod=",;)
SFTK_HANDLE_FINAL_ARG(param)
}
*rw = PR_TRUE;
if (sftk_argHasFlag("flags","readOnly",save_params) ||
sftk_argHasFlag("flags","noModDB",save_params)) *rw = PR_FALSE;
if (!secmodName || *secmodName == '\0') {
if (secmodName) PORT_Free(secmodName);
secmodName = PORT_Strdup(SECMOD_DB);
}
*filename = secmodName;
lconfigdir = sftk_EvaluateConfigDir(configdir, dbType, appName);
/* only use the renamed secmod for legacy databases */
if ((*dbType != SDB_LEGACY) && (*dbType != SDB_MULTIACCESS)) {
secmodName="pkcs11.txt";
}
if (lconfigdir) {
value = PR_smprintf("%s" PATH_SEPARATOR "%s",lconfigdir,secmodName);
} else {
value = PR_smprintf("%s",secmodName);
}
if (configdir) PORT_Free(configdir);
return value;
}

View File

@@ -1,17 +0,0 @@
/*
* license
*/
#include "pkcs11i.h"
#include "sftkdbt.h"
/* parsing functions */
char * sftk_argFetchValue(char *string, int *pcount);
char * sftk_getSecmodName(char *param, SDBType *dbType, char **appName, char **filename,PRBool *rw);
char *sftk_argStrip(char *c);
CK_RV sftk_parseParameters(char *param, sftk_parameters *parsed, PRBool isFIPS);
void sftk_freeParams(sftk_parameters *params);
const char *sftk_EvaluateConfigDir(const char *configdir, SDBType *dbType, char **app);
char * sftk_argGetParamValue(char *paramName,char *parameters);

View File

@@ -1,56 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* Library identity and versioning */
#include "softkver.h"
#if defined(DEBUG)
#define _DEBUG_STRING " (debug)"
#else
#define _DEBUG_STRING ""
#endif
/*
* Version information for the 'ident' and 'what commands
*
* NOTE: the first component of the concatenated rcsid string
* must not end in a '$' to prevent rcs keyword substitution.
*/
const char __nss_softokn_rcsid[] = "$Header: NSS " SOFTOKEN_VERSION _DEBUG_STRING
" " __DATE__ " " __TIME__ " $";
const char __nss_softokn_sccsid[] = "@(#)NSS " SOFTOKEN_VERSION _DEBUG_STRING
" " __DATE__ " " __TIME__;

View File

@@ -1,66 +0,0 @@
/*
* Softoken version numbers
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _SOFTKVER_H_
#define _SOFTKVER_H_
#ifdef NSS_ENABLE_ECC
#ifdef NSS_ECC_MORE_THAN_SUITE_B
#define SOFTOKEN_ECC_STRING " Extended ECC"
#else
#define SOFTOKEN_ECC_STRING " Basic ECC"
#endif
#else
#define SOFTOKEN_ECC_STRING ""
#endif
/*
* Softoken's major version, minor version, patch level, and whether
* this is a beta release.
*
* The format of the version string should be
* "<major version>.<minor version>[.<patch level>][ <ECC>][ <Beta>]"
*/
#define SOFTOKEN_VERSION "3.12" SOFTOKEN_ECC_STRING " Beta"
#define SOFTOKEN_VMAJOR 3
#define SOFTOKEN_VMINOR 12
#define SOFTOKEN_VPATCH 0
#define SOFTOKEN_BETA PR_TRUE
#endif /* _SOFTKVER_H_ */

View File

@@ -1,263 +0,0 @@
/*
* softoken.h - private data structures and prototypes for the softoken lib
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: softoken.h,v 1.14.2.1 2007-04-03 22:50:01 rrelyea%redhat.com Exp $ */
#ifndef _SOFTOKEN_H_
#define _SOFTOKEN_H_
#include "blapi.h"
#include "lowkeyti.h"
#include "softoknt.h"
#include "secoidt.h"
#include "pkcs11t.h" /* CK_RV Required for sftk_fipsPowerUpSelfTest(). */
SEC_BEGIN_PROTOS
/*
** RSA encryption/decryption. When encrypting/decrypting the output
** buffer must be at least the size of the public key modulus.
*/
/*
** Format some data into a PKCS#1 encryption block, preparing the
** data for RSA encryption.
** "result" where the formatted block is stored (memory is allocated)
** "modulusLen" the size of the formatted block
** "blockType" what block type to use (SEC_RSABlock*)
** "data" the data to format
*/
extern SECStatus RSA_FormatBlock(SECItem *result,
unsigned int modulusLen,
RSA_BlockType blockType,
SECItem *data);
/*
** Similar, but just returns a pointer to the allocated memory, *and*
** will *only* format one block, even if we (in the future) modify
** RSA_FormatBlock() to loop over multiples of modulusLen.
*/
extern unsigned char *RSA_FormatOneBlock(unsigned int modulusLen,
RSA_BlockType blockType,
SECItem *data);
/*
* convenience wrappers for doing single RSA operations. They create the
* RSA context internally and take care of the formatting
* requirements. Blinding happens automagically within RSA_Sign and
* RSA_DecryptBlock.
*/
extern
SECStatus RSA_Sign(NSSLOWKEYPrivateKey *key, unsigned char *output,
unsigned int *outputLen, unsigned int maxOutputLen,
unsigned char *input, unsigned int inputLen);
extern
SECStatus RSA_HashSign(SECOidTag hashOid,
NSSLOWKEYPrivateKey *key, unsigned char *sig,
unsigned int *sigLen, unsigned int maxLen,
unsigned char *hash, unsigned int hashLen);
extern
SECStatus RSA_CheckSign(NSSLOWKEYPublicKey *key, unsigned char *sign,
unsigned int signLength, unsigned char *hash,
unsigned int hashLength);
extern
SECStatus RSA_HashCheckSign(SECOidTag hashOid,
NSSLOWKEYPublicKey *key, unsigned char *sig,
unsigned int sigLen, unsigned char *digest,
unsigned int digestLen);
extern
SECStatus RSA_CheckSignRecover(NSSLOWKEYPublicKey *key, unsigned char *data,
unsigned int *data_len,unsigned int max_output_len,
unsigned char *sign, unsigned int sign_len);
extern
SECStatus RSA_EncryptBlock(NSSLOWKEYPublicKey *key, unsigned char *output,
unsigned int *outputLen, unsigned int maxOutputLen,
unsigned char *input, unsigned int inputLen);
extern
SECStatus RSA_DecryptBlock(NSSLOWKEYPrivateKey *key, unsigned char *output,
unsigned int *outputLen, unsigned int maxOutputLen,
unsigned char *input, unsigned int inputLen);
/*
* added to make pkcs #11 happy
* RAW is RSA_X_509
*/
extern
SECStatus RSA_SignRaw( NSSLOWKEYPrivateKey *key, unsigned char *output,
unsigned int *output_len, unsigned int maxOutputLen,
unsigned char *input, unsigned int input_len);
extern
SECStatus RSA_CheckSignRaw( NSSLOWKEYPublicKey *key, unsigned char *sign,
unsigned int sign_len, unsigned char *hash,
unsigned int hash_len);
extern
SECStatus RSA_CheckSignRecoverRaw( NSSLOWKEYPublicKey *key, unsigned char *data,
unsigned int *data_len, unsigned int max_output_len,
unsigned char *sign, unsigned int sign_len);
extern
SECStatus RSA_EncryptRaw( NSSLOWKEYPublicKey *key, unsigned char *output,
unsigned int *output_len,
unsigned int max_output_len,
unsigned char *input, unsigned int input_len);
extern
SECStatus RSA_DecryptRaw(NSSLOWKEYPrivateKey *key, unsigned char *output,
unsigned int *output_len,
unsigned int max_output_len,
unsigned char *input, unsigned int input_len);
#ifdef NSS_ENABLE_ECC
/*
** pepare an ECParam structure from DEREncoded params
*/
extern SECStatus EC_FillParams(PRArenaPool *arena,
const SECItem *encodedParams, ECParams *params);
extern SECStatus EC_DecodeParams(const SECItem *encodedParams,
ECParams **ecparams);
extern SECStatus EC_CopyParams(PRArenaPool *arena, ECParams *dstParams,
const ECParams *srcParams);
#endif
/*
** Prepare a buffer for DES encryption, growing to the appropriate boundary,
** filling with the appropriate padding.
** We add from 1 to DES_KEY_LENGTH bytes -- we *always* grow.
** The extra bytes contain the value of the length of the padding:
** if we have 2 bytes of padding, then the padding is "0x02, 0x02".
**
** NOTE: If arena is non-NULL, we re-allocate from there, otherwise
** we assume (and use) PR memory (re)allocation.
** Maybe this belongs in util?
*/
extern unsigned char * DES_PadBuffer(PRArenaPool *arena, unsigned char *inbuf,
unsigned int inlen, unsigned int *outlen);
/****************************************/
/*
** Power-Up selftests required for FIPS and invoked only
** under PKCS #11 FIPS mode.
*/
extern CK_RV sftk_fipsPowerUpSelfTest( void );
/*
** make known fixed PKCS #11 key types to their sizes in bytes
*/
unsigned long sftk_MapKeySize(CK_KEY_TYPE keyType);
/*
** FIPS 140-2 auditing
*/
extern PRBool sftk_audit_enabled;
extern void sftk_LogAuditMessage(NSSAuditSeverity severity, const char *msg);
extern void sftk_AuditCreateObject(CK_SESSION_HANDLE hSession,
CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount,
CK_OBJECT_HANDLE_PTR phObject, CK_RV rv);
extern void sftk_AuditCopyObject(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject,
CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount,
CK_OBJECT_HANDLE_PTR phNewObject, CK_RV rv);
extern void sftk_AuditDestroyObject(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject, CK_RV rv);
extern void sftk_AuditGetObjectSize(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject, CK_ULONG_PTR pulSize,
CK_RV rv);
extern void sftk_AuditGetAttributeValue(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE_PTR pTemplate,
CK_ULONG ulCount, CK_RV rv);
extern void sftk_AuditSetAttributeValue(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject, CK_ATTRIBUTE_PTR pTemplate,
CK_ULONG ulCount, CK_RV rv);
extern void sftk_AuditCryptInit(const char *opName,
CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism,
CK_OBJECT_HANDLE hKey, CK_RV rv);
extern void sftk_AuditGenerateKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism,
CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount,
CK_OBJECT_HANDLE_PTR phKey, CK_RV rv);
extern void sftk_AuditGenerateKeyPair(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism,
CK_ATTRIBUTE_PTR pPublicKeyTemplate,
CK_ULONG ulPublicKeyAttributeCount,
CK_ATTRIBUTE_PTR pPrivateKeyTemplate,
CK_ULONG ulPrivateKeyAttributeCount,
CK_OBJECT_HANDLE_PTR phPublicKey,
CK_OBJECT_HANDLE_PTR phPrivateKey, CK_RV rv);
extern void sftk_AuditWrapKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism,
CK_OBJECT_HANDLE hWrappingKey, CK_OBJECT_HANDLE hKey,
CK_BYTE_PTR pWrappedKey,
CK_ULONG_PTR pulWrappedKeyLen, CK_RV rv);
extern void sftk_AuditUnwrapKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism,
CK_OBJECT_HANDLE hUnwrappingKey,
CK_BYTE_PTR pWrappedKey, CK_ULONG ulWrappedKeyLen,
CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulAttributeCount,
CK_OBJECT_HANDLE_PTR phKey, CK_RV rv);
extern void sftk_AuditDeriveKey(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism,
CK_OBJECT_HANDLE hBaseKey,
CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulAttributeCount,
CK_OBJECT_HANDLE_PTR phKey, CK_RV rv);
extern void sftk_AuditDigestKey(CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hKey, CK_RV rv);
/*
** FIPS 140-2 Error state
*/
extern PRBool sftk_fatalError;
SEC_END_PROTOS
#endif /* _SOFTOKEN_H_ */

View File

@@ -1,61 +0,0 @@
;+#
;+# ***** BEGIN LICENSE BLOCK *****
;+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
;+#
;+# The contents of this file are subject to the Mozilla Public License Version
;+# 1.1 (the "License"); you may not use this file except in compliance with
;+# the License. You may obtain a copy of the License at
;+# http://www.mozilla.org/MPL/
;+#
;+# Software distributed under the License is distributed on an "AS IS" basis,
;+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
;+# for the specific language governing rights and limitations under the
;+# License.
;+#
;+# The Original Code is the Netscape security libraries.
;+#
;+# The Initial Developer of the Original Code is
;+# Netscape Communications Corporation.
;+# Portions created by the Initial Developer are Copyright (C) 2000
;+# the Initial Developer. All Rights Reserved.
;+#
;+# Contributor(s):
;+# Dr Stephen Henson <stephen.henson@gemplus.com>
;+#
;+# Alternatively, the contents of this file may be used under the terms of
;+# either the GNU General Public License Version 2 or later (the "GPL"), or
;+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
;+# in which case the provisions of the GPL or the LGPL are applicable instead
;+# of those above. If you wish to allow use of your version of this file only
;+# under the terms of either the GPL or the LGPL, and not to allow others to
;+# use your version of this file under the terms of the MPL, indicate your
;+# decision by deleting the provisions above and replace them with the notice
;+# and other provisions required by the GPL or the LGPL. If you do not delete
;+# the provisions above, a recipient may use your version of this file under
;+# the terms of any one of the MPL, the GPL or the LGPL.
;+#
;+# ***** END LICENSE BLOCK *****
;+#
;+# OK, this file is meant to support SUN, LINUX, AIX and WINDOWS
;+# 1. For all unix platforms, the string ";-" means "remove this line"
;+# 2. For all unix platforms, the string " DATA " will be removed from any
;+# line on which it occurs.
;+# 3. Lines containing ";+" will have ";+" removed on SUN and LINUX.
;+# On AIX, lines containing ";+" will be removed.
;+# 4. For all unix platforms, the string ";;" will thave the ";;" removed.
;+# 5. For all unix platforms, after the above processing has taken place,
;+# all characters after the first ";" on the line will be removed.
;+# And for AIX, the first ";" will also be removed.
;+# This file is passed directly to windows. Since ';' is a comment, all UNIX
;+# directives are hidden behind ";", ";+", and ";-"
;+NSS_3.4 { # NSS 3.4 release
;+ global:
LIBRARY softokn3 ;-
EXPORTS ;-
C_GetFunctionList; Make this function like a real PKCS #11 module as well
FC_GetFunctionList;
NSC_GetFunctionList;
NSC_ModuleDBFunc;
;+ local:
;+ *;
;+};

View File

@@ -1,100 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "softkver.h"
#include <winver.h>
#define MY_LIBNAME "softokn"
#define MY_FILEDESCRIPTION "NSS PKCS #11 Library"
#define STRINGIZE(x) #x
#define STRINGIZE2(x) STRINGIZE(x)
#define SOFTOKEN_VMAJOR_STR STRINGIZE2(SOFTOKEN_VMAJOR)
#ifdef _DEBUG
#define MY_DEBUG_STR " (debug)"
#define MY_FILEFLAGS_1 VS_FF_DEBUG
#else
#define MY_DEBUG_STR ""
#define MY_FILEFLAGS_1 0x0L
#endif
#if SOFTOKEN_BETA
#define MY_FILEFLAGS_2 MY_FILEFLAGS_1|VS_FF_PRERELEASE
#else
#define MY_FILEFLAGS_2 MY_FILEFLAGS_1
#endif
#ifdef WINNT
#define MY_FILEOS VOS_NT_WINDOWS32
#else
#define MY_FILEOS VOS__WINDOWS32
#endif
#define MY_INTERNAL_NAME MY_LIBNAME SOFTOKEN_VMAJOR_STR
/////////////////////////////////////////////////////////////////////////////
//
// Version-information resource
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION SOFTOKEN_VMAJOR,SOFTOKEN_VMINOR,SOFTOKEN_VPATCH,0
PRODUCTVERSION SOFTOKEN_VMAJOR,SOFTOKEN_VMINOR,SOFTOKEN_VPATCH,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS MY_FILEFLAGS_2
FILEOS MY_FILEOS
FILETYPE VFT_DLL
FILESUBTYPE 0x0L // not used
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0" // Lang=US English, CharSet=Unicode
BEGIN
VALUE "CompanyName", "Mozilla Foundation\0"
VALUE "FileDescription", MY_FILEDESCRIPTION MY_DEBUG_STR "\0"
VALUE "FileVersion", SOFTOKEN_VERSION "\0"
VALUE "InternalName", MY_INTERNAL_NAME "\0"
VALUE "OriginalFilename", MY_INTERNAL_NAME ".dll\0"
VALUE "ProductName", "Network Security Services\0"
VALUE "ProductVersion", SOFTOKEN_VERSION "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@@ -1,73 +0,0 @@
/*
* softoknt.h - public data structures for the software token library
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: softoknt.h,v 1.4 2006-05-05 20:02:47 wtchang%redhat.com Exp $ */
#ifndef _SOFTOKNT_H_
#define _SOFTOKNT_H_
/*
* RSA block types
*
* The actual values are important -- they are fixed, *not* arbitrary.
* The explicit value assignments are not needed (because C would give
* us those same values anyway) but are included as a reminder...
*/
typedef enum {
RSA_BlockPrivate0 = 0, /* unused, really */
RSA_BlockPrivate = 1, /* pad for a private-key operation */
RSA_BlockPublic = 2, /* pad for a public-key operation */
RSA_BlockOAEP = 3, /* use OAEP padding */
/* XXX is this only for a public-key
operation? If so, add "Public" */
RSA_BlockRaw = 4, /* simply justify the block appropriately */
RSA_BlockTotal
} RSA_BlockType;
#define NSS_SOFTOKEN_DEFAULT_CHUNKSIZE 2048
/*
* FIPS 140-2 auditing
*/
typedef enum {
NSS_AUDIT_ERROR = 3, /* errors */
NSS_AUDIT_WARNING = 2, /* warning messages */
NSS_AUDIT_INFO = 1 /* informational messages */
} NSSAuditSeverity;
#endif /* _SOFTOKNT_H_ */

View File

@@ -1,215 +0,0 @@
/* tlsprf.c - TLS Pseudo Random Function (PRF) implementation
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: tlsprf.c,v 1.6 2005-08-06 09:27:28 nelsonb%netscape.com Exp $ */
#include "pkcs11i.h"
#include "blapi.h"
#define SFTK_OFFSETOF(str, memb) ((PRPtrdiff)(&(((str *)0)->memb)))
static void sftk_TLSPRFNull(void *data, PRBool freeit)
{
return;
}
typedef struct {
PRUint32 cxSize; /* size of allocated block, in bytes. */
PRUint32 cxBufSize; /* sizeof buffer at cxBufPtr. */
unsigned char *cxBufPtr; /* points to real buffer, may be cxBuf. */
PRUint32 cxKeyLen; /* bytes of cxBufPtr containing key. */
PRUint32 cxDataLen; /* bytes of cxBufPtr containing data. */
SECStatus cxRv; /* records failure of void functions. */
PRBool cxIsFIPS; /* true if conforming to FIPS 198. */
unsigned char cxBuf[512]; /* actual size may be larger than 512. */
} TLSPRFContext;
static void
sftk_TLSPRFHashUpdate(TLSPRFContext *cx, const unsigned char *data,
unsigned int data_len)
{
PRUint32 bytesUsed = cx->cxKeyLen + cx->cxDataLen;
if (cx->cxRv != SECSuccess) /* function has previously failed. */
return;
if (bytesUsed + data_len > cx->cxBufSize) {
/* We don't use realloc here because
** (a) realloc doesn't zero out the old block, and
** (b) if realloc fails, we lose the old block.
*/
PRUint32 newBufSize = bytesUsed + data_len + 512;
unsigned char * newBuf = (unsigned char *)PORT_Alloc(newBufSize);
if (!newBuf) {
cx->cxRv = SECFailure;
return;
}
PORT_Memcpy(newBuf, cx->cxBufPtr, bytesUsed);
if (cx->cxBufPtr != cx->cxBuf) {
PORT_ZFree(cx->cxBufPtr, bytesUsed);
}
cx->cxBufPtr = newBuf;
cx->cxBufSize = newBufSize;
}
PORT_Memcpy(cx->cxBufPtr + bytesUsed, data, data_len);
cx->cxDataLen += data_len;
}
static void
sftk_TLSPRFEnd(TLSPRFContext *ctx, unsigned char *hashout,
unsigned int *pDigestLen, unsigned int maxDigestLen)
{
*pDigestLen = 0; /* tells Verify that no data has been input yet. */
}
/* Compute the PRF values from the data previously input. */
static SECStatus
sftk_TLSPRFUpdate(TLSPRFContext *cx,
unsigned char *sig, /* output goes here. */
unsigned int * sigLen, /* how much output. */
unsigned int maxLen, /* output buffer size */
unsigned char *hash, /* unused. */
unsigned int hashLen) /* unused. */
{
SECStatus rv;
SECItem sigItem;
SECItem seedItem;
SECItem secretItem;
if (cx->cxRv != SECSuccess)
return cx->cxRv;
secretItem.data = cx->cxBufPtr;
secretItem.len = cx->cxKeyLen;
seedItem.data = cx->cxBufPtr + cx->cxKeyLen;
seedItem.len = cx->cxDataLen;
sigItem.data = sig;
sigItem.len = maxLen;
rv = TLS_PRF(&secretItem, NULL, &seedItem, &sigItem, cx->cxIsFIPS);
if (rv == SECSuccess && sigLen != NULL)
*sigLen = sigItem.len;
return rv;
}
static SECStatus
sftk_TLSPRFVerify(TLSPRFContext *cx,
unsigned char *sig, /* input, for comparison. */
unsigned int sigLen, /* length of sig. */
unsigned char *hash, /* data to be verified. */
unsigned int hashLen) /* size of hash data. */
{
unsigned char * tmp = (unsigned char *)PORT_Alloc(sigLen);
unsigned int tmpLen = sigLen;
SECStatus rv;
if (!tmp)
return SECFailure;
if (hashLen) {
/* hashLen is non-zero when the user does a one-step verify.
** In this case, none of the data has been input yet.
*/
sftk_TLSPRFHashUpdate(cx, hash, hashLen);
}
rv = sftk_TLSPRFUpdate(cx, tmp, &tmpLen, sigLen, NULL, 0);
if (rv == SECSuccess) {
rv = (SECStatus)(1 - !PORT_Memcmp(tmp, sig, sigLen));
}
PORT_ZFree(tmp, sigLen);
return rv;
}
static void
sftk_TLSPRFHashDestroy(TLSPRFContext *cx, PRBool freeit)
{
if (freeit) {
if (cx->cxBufPtr != cx->cxBuf)
PORT_ZFree(cx->cxBufPtr, cx->cxBufSize);
PORT_ZFree(cx, cx->cxSize);
}
}
CK_RV
sftk_TLSPRFInit(SFTKSessionContext *context,
SFTKObject * key,
CK_KEY_TYPE key_type)
{
SFTKAttribute * keyVal;
TLSPRFContext * prf_cx;
CK_RV crv = CKR_HOST_MEMORY;
PRUint32 keySize;
PRUint32 blockSize;
if (key_type != CKK_GENERIC_SECRET)
return CKR_KEY_TYPE_INCONSISTENT; /* CKR_KEY_FUNCTION_NOT_PERMITTED */
context->multi = PR_TRUE;
keyVal = sftk_FindAttribute(key, CKA_VALUE);
keySize = (!keyVal) ? 0 : keyVal->attrib.ulValueLen;
blockSize = keySize + sizeof(TLSPRFContext);
prf_cx = (TLSPRFContext *)PORT_Alloc(blockSize);
if (!prf_cx)
goto done;
prf_cx->cxSize = blockSize;
prf_cx->cxKeyLen = keySize;
prf_cx->cxDataLen = 0;
prf_cx->cxBufSize = blockSize - SFTK_OFFSETOF(TLSPRFContext, cxBuf);
prf_cx->cxRv = SECSuccess;
prf_cx->cxIsFIPS = (key->slot->slotID == FIPS_SLOT_ID);
prf_cx->cxBufPtr = prf_cx->cxBuf;
if (keySize)
PORT_Memcpy(prf_cx->cxBufPtr, keyVal->attrib.pValue, keySize);
context->hashInfo = (void *) prf_cx;
context->cipherInfo = (void *) prf_cx;
context->hashUpdate = (SFTKHash) sftk_TLSPRFHashUpdate;
context->end = (SFTKEnd) sftk_TLSPRFEnd;
context->update = (SFTKCipher) sftk_TLSPRFUpdate;
context->verify = (SFTKVerify) sftk_TLSPRFVerify;
context->destroy = (SFTKDestroy) sftk_TLSPRFNull;
context->hashdestroy = (SFTKDestroy) sftk_TLSPRFHashDestroy;
crv = CKR_OK;
done:
if (keyVal)
sftk_FreeAttribute(keyVal);
return crv;
}

View File

@@ -1,80 +0,0 @@
#! gmake
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Netscape security libraries.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1994-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY). #
#######################################################################
include manifest.mn
#######################################################################
# (2) Include "global" configuration information. (OPTIONAL) #
#######################################################################
include $(CORE_DEPTH)/coreconf/config.mk
#######################################################################
# (3) Include "component" configuration information. (OPTIONAL) #
#######################################################################
#######################################################################
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################
-include config.mk
#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
#######################################################################
include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################
export:: private_export

View File

@@ -1,57 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Netscape security libraries.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1994-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
# can't do this in manifest.mn because OS_TARGET isn't defined there.
ifeq (,$(filter-out WIN%,$(OS_TARGET)))
# don't want the 32 in the shared library name
SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
#RES = $(OBJDIR)/$(LIBRARY_NAME).res
#RESNAME = $(LIBRARY_NAME).rc
endif
ifeq ($(OS_TARGET),SunOS)
# The -R '$ORIGIN' linker option instructs this library to search for its
# dependencies in the same directory where it resides.
MKSHLIB += -R '$$ORIGIN'
OS_LIBS += -lbsm
endif

View File

@@ -1,63 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Netscape security libraries.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1994-2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
CORE_DEPTH = ../../..
MODULE = nss
LIBRARY_NAME = sqlite
LIBRARY_VERSION = 3
MAPFILE = $(OBJDIR)/sqlite.def
DEFINES += -DTHREADSAFE=1
EXPORTS = \
$(NULL)
PRIVATE_EXPORTS = \
sqlite3.h \
$(NULL)
CSRCS = \
sqlite3.c \
$(NULL)
# only add module debugging in opt builds if DEBUG_PKCS11 is set
ifdef DEBUG_PKCS11
DEFINES += -DDEBUG_MODULE
endif

View File

@@ -1,141 +0,0 @@
;+#
;+#
;+# OK, this file is meant to support SUN, LINUX, AIX and WINDOWS
;+# 1. For all unix platforms, the string ";-" means "remove this line"
;+# 2. For all unix platforms, the string " DATA " will be removed from any
;+# line on which it occurs.
;+# 3. Lines containing ";+" will have ";+" removed on SUN and LINUX.
;+# On AIX, lines containing ";+" will be removed.
;+# 4. For all unix platforms, the string ";;" will thave the ";;" removed.
;+# 5. For all unix platforms, after the above processing has taken place,
;+# all characters after the first ";" on the line will be removed.
;+# And for AIX, the first ";" will also be removed.
;+# This file is passed directly to windows. Since ';' is a comment, all UNIX
;+# directives are hidden behind ";", ";+", and ";-"
;+SQLITE_3 {
;+ global:
LIBRARY sqlite3 ;-
EXPORTS ;-
sqlite3_aggregate_context;
sqlite3_aggregate_count;
sqlite3_apis;
sqlite3_auto_extension;
sqlite3_bind_blob;
sqlite3_bind_double;
sqlite3_bind_int;
sqlite3_bind_int64;
sqlite3_bind_null;
sqlite3_bind_parameter_count;
sqlite3_bind_parameter_index;
sqlite3_bind_parameter_name;
sqlite3_bind_text;
sqlite3_bind_text16;
sqlite3_bind_value;
sqlite3_busy_handler;
sqlite3_busy_timeout;
sqlite3_changes;
sqlite3_clear_bindings;
sqlite3_close;
sqlite3_collation_needed;
sqlite3_collation_needed16;
sqlite3_column_blob;
sqlite3_column_bytes;
sqlite3_column_bytes16;
sqlite3_column_count;
sqlite3_column_decltype;
sqlite3_column_decltype16;
sqlite3_column_double;
sqlite3_column_int;
sqlite3_column_int64;
sqlite3_column_name;
sqlite3_column_name16;
sqlite3_column_text;
sqlite3_column_text16;
sqlite3_column_type;
sqlite3_column_value;
sqlite3_commit_hook;
sqlite3_complete;
sqlite3_complete16;
sqlite3_create_collation;
sqlite3_create_collation16;
sqlite3_create_function;
sqlite3_create_function16;
sqlite3_create_module;
sqlite3_data_count;
sqlite3_db_handle;
sqlite3_declare_vtab;
sqlite3_enable_load_extension;
sqlite3_enable_shared_cache;
sqlite3_errcode;
sqlite3_errmsg;
sqlite3_errmsg16;
sqlite3_exec;
sqlite3_expired;
sqlite3_extended_result_codes;
sqlite3_finalize;
sqlite3_free;
sqlite3_free_table;
sqlite3_get_autocommit;
sqlite3_get_auxdata;
sqlite3_get_table;
sqlite3_global_recover;
sqlite3_interrupt;
sqlite3_last_insert_rowid;
sqlite3_libversion;
sqlite3_libversion_number;
sqlite3_load_extension;
sqlite3_malloc;
sqlite3_mprintf;
sqlite3_open;
sqlite3_open16;
sqlite3_overload_function;
sqlite3_prepare;
sqlite3_prepare16;
sqlite3_prepare16_v2;
sqlite3_prepare_v2;
sqlite3_profile;
sqlite3_progress_handler;
sqlite3_realloc;
sqlite3_reset;
sqlite3_reset_auto_extension;
sqlite3_result_blob;
sqlite3_result_double;
sqlite3_result_error;
sqlite3_result_error16;
sqlite3_result_int;
sqlite3_result_int64;
sqlite3_result_null;
sqlite3_result_text;
sqlite3_result_text16;
sqlite3_result_text16be;
sqlite3_result_text16le;
sqlite3_result_value;
sqlite3_rollback_hook;
sqlite3_set_authorizer;
sqlite3_set_auxdata;
sqlite3_sleep;
sqlite3_snprintf;
sqlite3_step;
sqlite3_thread_cleanup;
sqlite3_total_changes;
sqlite3_trace;
sqlite3_transfer_bindings;
sqlite3_update_hook;
sqlite3_user_data;
sqlite3_value_blob;
sqlite3_value_bytes;
sqlite3_value_bytes16;
sqlite3_value_double;
sqlite3_value_int;
sqlite3_value_int64;
sqlite3_value_numeric_type;
sqlite3_value_text;
sqlite3_value_text16;
sqlite3_value_text16be;
sqlite3_value_text16le;
sqlite3_value_type;
sqlite3_version;
sqlite3_vmprintf;
;+ local:
;+ *;
;+};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
Clobbering because preed says it'll fix the red.

View File

@@ -0,0 +1,19 @@
#
## hostname: fxdbug-linux-tbox.build.mozilla.org
## uname: Linux fxdbug-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 athlon i386 GNU/Linux
#
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_CO_MODULE="mozilla/tools/trace-malloc"
ac_add_options --enable-application=browser
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --enable-canvas
ac_add_options --enable-svg
ac_add_options --enable-pango
ac_add_options --enable-trace-malloc
ac_add_options --disable-libxul

View File

@@ -0,0 +1,190 @@
#
## hostname: fxdbug-linux-tbox.build.mozilla.org
## uname: Linux fxdbug-linux-tbox.build.mozilla.org 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT 2007 i686 athlon i386 GNU/Linux
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
#$ENV{PATH} = "/usr/local/binutils-2.13.2.1/bin:/usr/local/gcc-3.4.3/bin:" . $ENV{PATH};
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
# Disable the Gnome Bug Buddy so that it doesn't block us getting stacks
$ENV{GNOME_DISABLE_CRASH_DIALOG} = '1';
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
$BuildAdministrator = 'build@mozilla.org';
#- You'll need to change these to suit your machine's needs
$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = "Firefox";
$VendorName = "Mozilla";
$ENV{NO_EM_RESTART} = '1';
#$RunMozillaTests = 1; # Allow turning off of all tests if needed.
#$RegxpcomTest = 1;
#$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
$BloatTest = 1; # warren memory bloat test
$BloatTest2 = 1; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
#$LayoutPerformanceTest = 0; # Tp
#$QATest = 0;
#$XULWindowOpenTest = 0; # Txul
#$StartupPerformanceTest = 0; # Ts
$TestsPhoneHome = 1; # Should test report back to server?
#$results_server = "axolotl.mozilla.org"; # was tegu
#$pageload_server = "spider"; # localhost
#
# Timeouts, values are in seconds.
#
#$CreateProfileTimeout = 45;
$RegxpcomTestTimeout = 60;
#$AliveTestTimeout = 45;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
$BloatTestTimeout = 1800; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 60; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
# This sets the value of the XPCOM_DEBUG_BREAK environment variable. We
# default to 'warn', which suppresses the assertion dialogs on Windows
# and gives platform parity. Use 'abort' for fatal assertions.
$MozAssertBehavior = 'stack-and-abort';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
$moz_cvsroot = ':ext:ffxbld@cvs.mozilla.org:/cvsroot';
#$moz_cvsroot = ":pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot";
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = 'obj';
# Extra build name, if needed.
#$BuildNameExtra = 'GTK1 (gcc 3.4)';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
#$BuildTree = 'MozillaTest';
$BuildTree = 'Firefox3.0';
#$BuildName = '';
#$BuildTag = '';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'firefox-bin';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# allow override of timezone value (for win32 POSIX::strftime)
#$Timezone = '';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
$LogCompression = 'bzip2';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
$LogEncoding = 'uuencode';

View File

@@ -0,0 +1 @@
- trigger another clobber to test bug 388691

View File

@@ -0,0 +1,24 @@
#
## hostname: bm-xservex08.build.mozilla.org
## uname: Darwin bm-xserve08.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
#
#. $topsrcdir/build/macosx/universal/mozconfig
mk_add_options MOZ_MAKE_FLAGS="-j4"
mk_add_options MOZ_CO_PROJECT="browser"
mk_add_options MOZ_CO_MODULE="mozilla/tools/trace-malloc"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build
ac_add_options --enable-application=browser
ac_add_app_options ppc --enable-prebinding
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --enable-canvas
ac_add_options --enable-svg
ac_add_options --enable-trace-malloc
ac_add_options --enable-libxul

View File

@@ -0,0 +1,192 @@
#
## hostname: bm-xserve08.build.mozilla.org
## uname: Darwin bm-xserve08.build.mozilla.org 8.8.4 Darwin Kernel Version 8.8.4: Sun Oct 29 15:26:54 PST 2006; root:xnu-792.16.4.obj~1/RELEASE_I386 i386 i386
#
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
#$ENV{PATH} = "/usr/local/binutils-2.13.2.1/bin:/usr/local/gcc-3.4.3/bin:" . $ENV{PATH};
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
#$MacUniversalBinary = 1;
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
$BuildAdministrator = 'build@mozilla.org';
#- You'll need to change these to suit your machine's needs
$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
$BuildDebug = 1; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = "GranParadiso";
$VendorName = "";
$ENV{NO_EM_RESTART} = '1';
#$RunMozillaTests = 1; # Allow turning off of all tests if needed.
#$RegxpcomTest = 1;
#$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
$BloatTest = 1; # warren memory bloat test
$BloatTest2 = 1; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
#$LayoutPerformanceTest = 0; # Tp
#$QATest = 0;
#$XULWindowOpenTest = 0; # Txul
#$StartupPerformanceTest = 0; # Ts
$TestsPhoneHome = 1; # Should test report back to server?
#$results_server = "axolotl.mozilla.org"; # was tegu
#$pageload_server = "spider"; # localhost
#
# Timeouts, values are in seconds.
#
#$CreateProfileTimeout = 45;
$RegxpcomTestTimeout = 60;
#$AliveTestTimeout = 45;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
$BloatTestTimeout = 300; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
#$LayoutPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 60; # seconds
#$XULWindowOpenTestTimeout = 150; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
# This sets the value of the XPCOM_DEBUG_BREAK environment variable. We
# default to 'warn', which suppresses the assertion dialogs on Windows
# and gives platform parity. Use 'abort' (or, on trunk after 2007-08-10,
# 'stack-and-abort') for fatal assertions.
$MozAssertBehavior = 'stack-and-abort';
#- Set these to what makes sense for your system
#$Make = 'gmake'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
#$blat = 'c:/nstools/bin/blat';
#$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
$moz_cvsroot = ':ext:ffxbld@cvs.mozilla.org:/cvsroot';
#$moz_cvsroot = ":pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot";
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = '../build';
# Extra build name, if needed.
$BuildNameExtra = 'Debug + Leak Test';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
#$BuildTree = 'MozillaTest';
$BuildTree = 'Firefox3.0';
#$BuildName = '';
#$BuildTag = '';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'firefox-bin';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# allow override of timezone value (for win32 POSIX::strftime)
#$Timezone = '';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
$LogCompression = 'bzip2';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
$LogEncoding = 'uuencode';

View File

@@ -0,0 +1 @@
Clobber in case the intermittant leak is cruft-buildup

View File

@@ -0,0 +1,14 @@
#
## hostname: fxdbug-win32-tbox
## uname: MINGW32_NT-5.2 FX-WIN32-TBOX 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
#
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_CO_MODULE="mozilla/tools/trace-malloc"
mk_add_options MOZ_MAKE_FLAGS="-j5"
mk_add_options MOZ_PACKAGE_NSIS=1
ac_add_options --enable-application=browser
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --enable-trace-malloc

View File

@@ -0,0 +1,221 @@
#
## hostname: fxdbug-win32-tbox
## uname: MINGW32_NT-5.2 FX-WIN32-TBOX 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys
#
#- tinder-config.pl - Tinderbox configuration file.
#- Uncomment the variables you need to set.
#- The default values are the same as the commented variables.
$ENV{MOZ_INSTALLER_USE_7ZIP} = '1';
$ENV{MOZ_PACKAGE_NSIS} = '1';
$ENV{MOZ_CRASHREPORTER_NO_REPORT} = '1';
$ENV{NO_EM_RESTART} = '1';
# $ENV{MOZ_PACKAGE_MSI}
#-----------------------------------------------------------------------------
# Default: 0
# Values: 0 | 1
# Purpose: Controls whether a MSI package is made.
# Requires: Windows and a local MakeMSI installation.
#$ENV{MOZ_PACKAGE_MSI} = 0;
# $ENV{MOZ_SYMBOLS_TRANSFER_TYPE}
#-----------------------------------------------------------------------------
# Default: scp
# Values: scp | rsync
# Purpose: Use scp or rsync to transfer symbols to the Talkback server.
# Requires: The selected type requires the command be available both locally
# and on the Talkback server.
#$ENV{MOZ_SYMBOLS_TRANSFER_TYPE} = "scp";
#- PLEASE FILL THIS IN WITH YOUR PROPER EMAIL ADDRESS
$BuildAdministrator = 'build@mozilla.org';
#$BuildAdministrator = "$ENV{USER}\@$ENV{HOST}";
#$BuildAdministrator = ($ENV{USER} || "cltbld") . "\@" . ($ENV{HOST} || "dhcp");
#- You'll need to change these to suit your machine's needs
#$DisplayServer = ':0.0';
#- Default values of command-line opts
#-
#$BuildDepend = 1; # Depend or Clobber
#$BuildDebug = 0; # Debug or Opt (Darwin)
#$ReportStatus = 1; # Send results to server, or not
#$ReportFinalStatus = 1; # Finer control over $ReportStatus.
#$UseTimeStamp = 1; # Use the CVS 'pull-by-timestamp' option, or not
#$BuildOnce = 0; # Build once, don't send results to server
#$TestOnly = 0; # Only run tests, don't pull/build
#$BuildEmbed = 0; # After building seamonkey, go build embed app.
#$SkipMozilla = 0; # Use to debug post-mozilla.pl scripts.
#$BuildLocales = 0; # Do l10n packaging?
# Tests
$CleanProfile = 1;
#$ResetHomeDirForTests = 1;
$ProductName = "Firefox";
$VendorName = "Mozilla";
$RunMozillaTests = 1; # Allow turning off of all tests if needed.
#$RegxpcomTest = 1;
#$AliveTest = 1;
#$JavaTest = 0;
#$ViewerTest = 0;
$BloatTest = 1; # warren memory bloat test
$BloatTest2 = 1; # dbaron memory bloat test, require tracemalloc
#$DomToTextConversionTest = 0;
#$XpcomGlueTest = 0;
#$CodesizeTest = 0; # Z, require mozilla/tools/codesighs
#$EmbedCodesizeTest = 0; # mZ, require mozilla/tools/codesigns
#$MailBloatTest = 0;
#$EmbedTest = 0; # Assumes you wanted $BuildEmbed=1
#$LayoutPerformanceTest = 0; # Tp
#$DHTMLPerformanceTest = 0; # Tdhtml
#$QATest = 0;
#$XULWindowOpenTest = 0; # Txul
#$StartupPerformanceTest = 0; # Ts
#$NeckoUnitTest = 0;
#$RenderPerformanceTest = 0; # Tgfx
$TestsPhoneHome = 1; # Should test report back to server?
#$GraphNameOverride = 'fxdbug-win32-tbox';
# $results_server
#----------------------------------------------------------------------------
# Server on which test results will be accessible. This was originally tegu,
# then became axolotl. Once we moved services from axolotl, it was time
# to give this service its own hostname to make future transitions easier.
# - cmp@mozilla.org
#$results_server = "build-graphs.mozilla.org";
$pageload_server = "pageload.build.mozilla.org"; # localhost
#
# Timeouts, values are in seconds.
#
#$CVSCheckoutTimeout = 3600;
#$CreateProfileTimeout = 45;
#$RegxpcomTestTimeout = 120;
#$AliveTestTimeout = 30;
#$ViewerTestTimeout = 45;
#$EmbedTestTimeout = 45;
$BloatTestTimeout = 1800; # seconds
#$MailBloatTestTimeout = 120; # seconds
#$JavaTestTimeout = 45;
#$DomTestTimeout = 45; # seconds
#$XpcomGlueTestTimeout = 15;
#$CodesizeTestTimeout = 900; # seconds
#$CodesizeTestType = "auto"; # {"auto"|"base"}
$LayoutPerformanceTestTimeout = 800; # entire test, seconds
#$DHTMLPerformanceTestTimeout = 1200; # entire test, seconds
#$QATestTimeout = 1200; # entire test, seconds
#$LayoutPerformanceTestPageTimeout = 30000; # each page, ms
#$StartupPerformanceTestTimeout = 20; # seconds
#$XULWindowOpenTestTimeout = 90; # seconds
#$NeckoUnitTestTimeout = 30; # seconds
$RenderPerformanceTestTimeout = 1800; # seconds
#$MozConfigFileName = 'mozconfig';
#$UseMozillaProfile = 1;
#$MozProfileName = 'default';
# This sets the value of the XPCOM_DEBUG_BREAK environment variable. We
# default to 'warn', which suppresses the assertion dialogs on Windows
# and gives platform parity. Use 'abort' (or, on trunk after 2007-08-10,
# 'stack-and-abort') for fatal assertions.
$MozAssertBehavior = 'stack-and-abort';
#- Set these to what makes sense for your system
$Make = 'make'; # Must be GNU make
#$MakeOverrides = '';
#$mail = '/bin/mail';
#$CVS = 'cvs -q';
#$CVSCO = 'checkout -P';
# win32 usually doesn't have /bin/mail
$blat = '/d/mozilla-build/blat261/full/blat';
$use_blat = 0;
# Set moz_cvsroot to something like:
# :pserver:$ENV{USER}%netscape.com\@cvs.mozilla.org:/cvsroot
# :pserver:anonymous\@cvs-mirror.mozilla.org:/cvsroot
#
# Note that win32 may not need \@, depends on ' or ".
# :pserver:$ENV{USER}%netscape.com@cvs.mozilla.org:/cvsroot
#$moz_cvsroot = $ENV{CVSROOT};
$moz_cvsroot = ':ext:ffxbld@cvs.mozilla.org:/cvsroot';
#- Set these proper values for your tinderbox server
#$Tinderbox_server = 'tinderbox-daemon@tinderbox.mozilla.org';
# Allow for non-client builds, e.g. camino.
#$moz_client_mk = 'client.mk';
#- Set if you want to build in a separate object tree
$ObjDir = 'obj-fx-trunk';
# Extra build name, if needed.
$BuildNameExtra = 'Debug + Leak Test';
# User comment, eg. ip address for dhcp builds.
# ex: $UserComment = "ip = 208.12.36.108";
#$UserComment = 0;
#-
#- The rest should not need to be changed
#-
#- Minimum wait period from start of build to start of next build in minutes.
#$BuildSleep = 10;
#- Until you get the script working. When it works,
#- change to the tree you're actually building
#$BuildTree = 'MozillaTest';
$BuildTree = 'Firefox3.0';
#$BuildName = '';
#$BuildTag = '';
#$BuildConfigDir = 'mozilla/config';
#$Topsrcdir = 'mozilla';
$BinaryName = 'firefox.exe';
#
# For embedding app, use:
#$EmbedBinaryName = 'TestGtkEmbed';
#$EmbedDistDir = 'dist/bin'
#$ShellOverride = ''; # Only used if the default shell is too stupid
#$ConfigureArgs = '';
#$ConfigureEnvArgs = '';
#$Compiler = 'gcc';
#$NSPRArgs = '';
#$ShellOverride = '';
# allow override of timezone value (for win32 POSIX::strftime)
#$Timezone = '';
# Reboot the OS at the end of build-and-test cycle. This is primarily
# intended for Win9x, which can't last more than a few cycles before
# locking up (and testing would be suspect even after a couple of cycles).
# Right now, there is only code to force the reboot for Win9x, so even
# setting this to 1, will not have an effect on other platforms. Setting
# up win9x to automatically logon and begin running tinderbox is left
# as an exercise to the reader.
#$RebootSystem = 0;
# LogCompression specifies the type of compression used on the log file.
# Valid options are 'gzip', and 'bzip2'. Please make sure the binaries
# for 'gzip' or 'bzip2' are in the user's path before setting this
# option.
#$LogCompression = '';
# LogEncoding specifies the encoding format used for the logs. Valid
# options are 'base64', and 'uuencode'. If $LogCompression is set above,
# this needs to be set to 'base64' or 'uuencode' to ensure that the
# binary data is transferred properly.
#$LogEncoding = '';