NSS Shared DB: Difference between revisions

Jump to navigation Jump to search
Line 115: Line 115:


  CK_RV
  CK_RV
  s_open(const char *directory, int cert_version,
  s_open(const char *directory, const char *certPrefix, const char *keyPrefix,
        int key_version, int flags, SDB **certdb, SDB **keydb)
        int cert_version, int key_version, int flags,
        SDB **certdb, SDB **keydb, int *newInit)


The sdb_init function takes:
The sdb_init function takes:


* directory full path to where the database lives.
* directory full path to where the database lives.
* certPrefix a prefix string to add in front of the key and cert db (if keyPrefix is null), null means add no prefix.
* keyPrefix a prefix string to add in front of the key db. Null means use the same prefix as the cert db.
* cert_version current version is the current database version
* cert_version current version is the current database version
* key_version is the current key database version
* key_version is the current key database version
Line 129: Line 132:
* certdb is the returned cert SDB structure
* certdb is the returned cert SDB structure
* keydb is the returned key SDB structure
* keydb is the returned key SDB structure
 
* newInit returns 1 of s_open created new instances of cert and key (used for
(NOTE: the signature of this function is likely to change. <font color=red>Comments on how to change it would be appreciated.</font>
  update).
 
Issues include:<br>
#Should cert and key versions be part of the API, or should they be part of the underlying database?
#The cert and key prefix values are missing and should be added.  
#Do we need separate create flag or is the combined READ/WRITE/CREATE sufficient?
#Do we need a way to supply the list of know attributes so old DB's can be updated and initialized properly?


The returned SDB structure has the following format:
The returned SDB structure has the following format:
439

edits

Navigation menu