439
edits
Line 375: | Line 375: | ||
In the shared database design, upgrade is no longer mandatory. Applications | In the shared database design, upgrade is no longer mandatory. Applications | ||
may choose to | may choose to continue to use the old DBM database, update to use the new shared database from old DBM databases, or update and merge old DBM database into a new location shared by multiple apps. There is still a desire for this update to be automatic, at least as far as the application user is concerned. The following describe how applications . | ||
To understand the issues of migration to the Shareable Database version of NSS from the traditional (legacy) versions, we group applications that use the new version of NSS into three 'modes' of operation, and into two types for a total of five valid combinations (Mode 1 B is not valid).. | To understand the issues of migration to the Shareable Database version of NSS from the traditional (legacy) versions, we group applications that use the new version of NSS into three 'modes' of operation, and into two types for a total of five valid combinations (Mode 1 B is not valid).. | ||
Line 441: | Line 441: | ||
First, Mode three applications need to call NSS_InitWithMerge(). This call includes extra parameters needed by NSS to help automatically determine if an update/merge is necessary, and how to accomplish it. | First, Mode three applications need to call NSS_InitWithMerge(). This call includes extra parameters needed by NSS to help automatically determine if an update/merge is necessary, and how to accomplish it. | ||
==== Database Upgrade Underlying Implementation ==== | |||
=====Upgrade complications===== | =====Upgrade complications===== | ||
Line 449: | Line 450: | ||
In Mode 1, NSS never needs to do an update or a merge. | In Mode 1, NSS never needs to do an update or a merge. | ||
State machine of NSS update actions for Mode 1: | |||
NSS_Initialize | |||
| | | | ||
V | V | ||
Line 472: | Line 474: | ||
the old database on future opens until the update succeeds. | the old database on future opens until the update succeeds. | ||
State machine of NSS update actions for Mode 2: | |||
NSS_Initialize | |||
| | | | ||
V | V | ||
open shared DB | open shared DB | ||
| | | | ||
Line 500: | Line 503: | ||
| V | | V | ||
| < is password > no | | < is password > no | ||
| < supplied? >-------> | | < supplied? >-------> state= 'not updated' ----> return | ||
| | | | | | ||
+--------------+ | +--------------+ | ||
V | V | ||
update shared DB | update (and use) shared DB | ||
| | | | ||
V | V | ||
Line 511: | Line 514: | ||
V | V | ||
done | done | ||
------------------------------------------ | |||
PK11_Authenticate | |||
| | |||
V | |||
< is password > no | |||
< supplied? >-------> return | |||
| | |||
V | |||
< is state > no | |||
< 'not updated'? >-------> return | |||
| | |||
V | |||
update (and use) shared DB | |||
| | |||
V | |||
close legacy DB | |||
| | |||
V | |||
done | |||
In Mode 3, the new database may or may not be initialized. For the first mode 3 | In Mode 3, the new database may or may not be initialized. For the first mode 3 | ||
Line 530: | Line 554: | ||
Flow chart of NSS update actions for Mode 3: | Flow chart of NSS update actions for Mode 3: | ||
NSS_Initialize | |||
| | | | ||
V | V | ||
Line 549: | Line 574: | ||
V | V | ||
no < does legacy DB > | no < does legacy DB > | ||
+-------< have a password? > | +-------< have a password? > - | ||
| | yes | | | yes | ||
| V | | V | ||
Line 560: | Line 580: | ||
| until password | | until password | ||
| is supplied | | is supplied | ||
| | | +------------- state = "not updated"---- return | ||
| | |||
| | |||
+--------------+ | +--------------+ | ||
V | V | ||
Line 571: | Line 588: | ||
| | yes | | | yes | ||
| V | | V | ||
| | | use legacy DB | ||
+--------< password | | until password | ||
| | | is supplied | ||
| | | +----------- state = "has legacy pwd" --- return | ||
| | | | ||
| | +--------------+ | ||
V | |||
| | update/merge shared DB | ||
| | | | ||
| | V | ||
| | close legacy DB | ||
| | |||
V | |||
done | |||
--------------------------------------------------------------- | |||
PK11_Authenticate | |||
| | |||
V | |||
< is password > no | |||
< supplied? >-------> return | |||
| | |||
V | |||
"has legacy pw" < > other | |||
+------------< switch state >--------> done | |||
| < > | |||
| | "not updated" | |||
| | | |||
| < store password > | |||
| < state = "has legacy pw" > | |||
| | | |||
| V | |||
| no < does shared DB > | |||
+-----------< have a password? > | |||
| | yes | |||
| V | |||
| yes < does shared DB's > | |||
+------------< password match > | |||
| < legacy DB's PW? > | |||
| | no | |||
| +----------- state = "has legacy pwd" --- return | |||
| | |||
+--------------+ | +--------------+ | ||
V | V | ||
Line 592: | Line 640: | ||
V | V | ||
done | done | ||
exception A. Application needs to decide what happens if the legacy password | exception A. Application needs to decide what happens if the legacy password |
edits