Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /* With the exception of GetPasswordString, this file was
6 copied from NSS's cmd/lib/secutil.h hg revision 8f011395145e */
8 #ifndef NSS_SECUTIL_H_
9 #define NSS_SECUTIL_H_
11 #include "nss.h"
12 #include "pk11pub.h"
13 #include "cryptohi.h"
14 #include "hasht.h"
15 #include "cert.h"
16 #include "key.h"
17 #include <stdint.h>
19 typedef struct {
20 enum {
21 PW_NONE = 0,
22 PW_FROMFILE = 1,
23 PW_PLAINTEXT = 2,
24 PW_EXTERNAL = 3
25 } source;
26 char *data;
27 } secuPWData;
29 #if( defined(_WINDOWS) && !defined(_WIN32_WCE))
30 #include <conio.h>
31 #include <io.h>
32 #define QUIET_FGETS quiet_fgets
33 static char * quiet_fgets (char *buf, int length, FILE *input);
34 #else
35 #define QUIET_FGETS fgets
36 #endif
38 char *
39 SECU_GetModulePassword(PK11SlotInfo *slot, PRBool retry, void *arg);
41 #endif