|
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/. */ |
|
4 |
|
5 /* With the exception of GetPasswordString, this file was |
|
6 copied from NSS's cmd/lib/secutil.h hg revision 8f011395145e */ |
|
7 |
|
8 #ifndef NSS_SECUTIL_H_ |
|
9 #define NSS_SECUTIL_H_ |
|
10 |
|
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> |
|
18 |
|
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; |
|
28 |
|
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 |
|
37 |
|
38 char * |
|
39 SECU_GetModulePassword(PK11SlotInfo *slot, PRBool retry, void *arg); |
|
40 |
|
41 #endif |