| Index: base/nss_util_internal.h
|
| diff --git a/base/nss_util_internal.h b/base/nss_util_internal.h
|
| index 139740b4ab367935de237a73b561901697fe1e6a..a63f1fdf4cba89481e8ec4eb4bc3c20d14d0021b 100644
|
| --- a/base/nss_util_internal.h
|
| +++ b/base/nss_util_internal.h
|
| @@ -17,6 +17,24 @@ namespace base {
|
| // reference with PK11_FreeSlot.
|
| PK11SlotInfo* GetDefaultNSSKeySlot();
|
|
|
| +// PK11_SetPasswordFunc is a global setting. To avoid a dependency on
|
| +// network code, we instead pass a PK11BlockingPasswordDelegate in the
|
| +// user data argument and set a global password hook to call it
|
| +// instead.
|
| +class PK11BlockingPasswordDelegate {
|
| + public:
|
| + virtual ~PK11BlockingPasswordDelegate() {}
|
| +
|
| + // Requests a password to unlock |slot|. The interface is
|
| + // synchronous because NSS cannot issue an asynchronous
|
| + // request. |retry| is PR_TRUE if this is a request for the retry
|
| + // and we previously returned the wrong password.
|
| + //
|
| + // Result will be zeroed and freed after use. If not NULL, must have
|
| + // been allocated with PR_Malloc or PL_strdup.
|
| + virtual char* RequestPassword(PK11SlotInfo* slot, PRBool retry) = 0;
|
| +};
|
| +
|
| } // namespace base
|
|
|
| #endif // BASE_NSS_UTIL_H_
|
|
|