NSS Shared DB: Difference between revisions

Jump to navigation Jump to search
Line 1,024: Line 1,024:


To merge 2 databases, the application simply opens the both databases and calls the new PK11_MergeTokens() call. PK11_MergeTokens() has the following signature:
To merge 2 databases, the application simply opens the both databases and calls the new PK11_MergeTokens() call. PK11_MergeTokens() has the following signature:
#include <pk11pub.h>


  SECStatus PK11_MergeTokens(
  SECStatus PK11_MergeTokens(
Line 1,031: Line 1,033:
     void *pwdata);
     void *pwdata);


Where:  
Parameters:
 
''targetSlot'' A pointer to the target slot or database to merge into.
 
''sourceSlot'' A pointer to the target slot or database to merge from.
 
''log''  An optional pointer which returns a link list of errors that may have occured during the merge.


targetSlot
''pwdata'' password arg


sourceSlot
The ''targetSlot'' and ''sourceSlot'' parameters could be slots that are simply looked up, or additional databases opened with SECMOD_OpenUserDB().


log
Returns:


pwdata
The function returns one of these values:
* If successful, SECSuccess.
* If one or more entries failed to merge, return SECFailure. PORT_SetError() is set to the value of the last failing entry. All the failed entries are returned in the variable ''log''.


Example:


<pre>
<pre>
439

edits

Navigation menu