Project

General

Profile

Actions

Feature #2896

closed

Initialize default setting when adding id/key/cert in Pib

Added by Yingdi Yu over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Security
Target version:
Start date:
06/12/2015
Due date:
% Done:

100%

Estimated time:

Description

When default setting (e.g., default id, default key, and default cert) does not exist, adding an entry will also automatically set the added entry as the default one.
For example, adding an identity when there is no default identity will make the identity as the default identity;
adding a key when there is no default key of the belonging identity will make the key as the default key of the belonging identity;
adding a cert when there is no default cert of the belonging key will make the key as the default cert of the belonging key.

Actions #1

Updated by Yingdi Yu over 9 years ago

  • Status changed from New to Code review
  • % Done changed from 0 to 80
Actions #2

Updated by Junxiao Shi over 9 years ago

commit:7d1f4572e81479f7f1911d46693e68f1bcf0bdae makes this initialization the responsibility of PibImpl, which adds complexity every PibImpl subclass.

Why not keep PibImpl simple and implement this feature in Pib?

Actions #3

Updated by Yingdi Yu over 9 years ago

In PibImpl is a database, such an initialization can be done more efficiently with DB support (see the implementation of PibSqlite3). If we do it in Pib, it may involve multiple function calls. Given Pib is expected to be implemented over a database, this should be reasonable design choice.

Actions #4

Updated by Junxiao Shi over 9 years ago

commit:726c07cb049114f8bd21684127797d969ee17c2d implements default setting with a SQLite database trigger.
This does not increase complexity.

Therefore, I agree with note-3.

Actions #5

Updated by Yingdi Yu over 9 years ago

  • Status changed from Code review to Closed
  • % Done changed from 80 to 100
Actions

Also available in: Atom PDF