NSS Shared DB: Difference between revisions

Jump to navigation Jump to search
Line 446: Line 446:
Applications can avoid final case of failure by forcing the user to authenticate to softoken using PK11_Authenticate().
Applications can avoid final case of failure by forcing the user to authenticate to softoken using PK11_Authenticate().


configdir = PR_smprintf("sql:%s",oldconfigdir);
<pre>
rv = NSS_InitReadWrite(configdir);
  configdir = PR_smprintf("sql:%s",oldconfigdir);
if (rv != SECSuccess) {
  rv = NSS_InitReadWrite(configdir);
    goto fail;
  if (rv != SECSuccess) {
}
      goto fail;
  }


/* optional */
  slot = PK11_GetInternalKeySlot();
rv = PK11_Authenticate(slot );
 
if (rv != SECSuccess) {
  /* optional */
    goto fail;
  rv = PK11_Authenticate(slot, PR_FALSE, pwArg);
}
  if (rv != SECSuccess) {
/* database has been updated... */
      goto fail;
  }
  /* database has been updated... */
</pre>


====== Mode 3A ======
====== Mode 3A ======
439

edits

Navigation menu