OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 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 | 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/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 #ifndef _UTILPARS_H_ | 5 #ifndef _UTILPARS_H_ |
6 #define _UTILPARS_H_ 1 | 6 #define _UTILPARS_H_ 1 |
7 | 7 |
8 #include "utilparst.h" | 8 #include "utilparst.h" |
9 #include "plarena.h" | 9 #include "plarena.h" |
10 | 10 |
11 /* handle a module db request */ | 11 /* handle a module db request */ |
12 char ** NSSUTIL_DoModuleDBFunction(unsigned long function,char *parameters, void
*args); | 12 char ** NSSUTIL_DoModuleDBFunction(unsigned long function,char *parameters, void
*args); |
13 | 13 |
14 /* parsing functions */ | 14 /* parsing functions */ |
15 char *NSSUTIL_ArgFetchValue(char *string, int *pcount); | 15 char *NSSUTIL_ArgFetchValue(const char *string, int *pcount); |
16 char *NSSUTIL_ArgStrip(char *c); | 16 const char *NSSUTIL_ArgStrip(const char *c); |
17 char *NSSUTIL_ArgGetParamValue(char *paramName,char *parameters); | 17 char *NSSUTIL_ArgGetParamValue(const char *paramName,const char *parameters); |
18 char *NSSUTIL_ArgSkipParameter(char *string); | 18 const char *NSSUTIL_ArgSkipParameter(const char *string); |
19 char *NSSUTIL_ArgGetLabel(char *inString, int *next); | 19 char *NSSUTIL_ArgGetLabel(const char *inString, int *next); |
20 long NSSUTIL_ArgDecodeNumber(char *num); | 20 long NSSUTIL_ArgDecodeNumber(const char *num); |
21 PRBool NSSUTIL_ArgIsBlank(char c); | 21 PRBool NSSUTIL_ArgIsBlank(char c); |
22 PRBool NSSUTIL_ArgHasFlag(char *label, char *flag, char *parameters); | 22 PRBool NSSUTIL_ArgHasFlag(const char *label, const char *flag, |
23 long NSSUTIL_ArgReadLong(char *label,char *params, long defValue, | 23 » » » const char *parameters); |
| 24 long NSSUTIL_ArgReadLong(const char *label,const char *params, long defValue, |
24 PRBool *isdefault); | 25 PRBool *isdefault); |
25 | 26 |
26 /* quoting functions */ | 27 /* quoting functions */ |
27 int NSSUTIL_EscapeSize(const char *string, char quote); | 28 int NSSUTIL_EscapeSize(const char *string, char quote); |
28 char *NSSUTIL_Escape(const char *string, char quote); | 29 char *NSSUTIL_Escape(const char *string, char quote); |
29 int NSSUTIL_QuoteSize(const char *string, char quote); | 30 int NSSUTIL_QuoteSize(const char *string, char quote); |
30 char *NSSUTIL_Quote(const char *string, char quote); | 31 char *NSSUTIL_Quote(const char *string, char quote); |
31 int NSSUTIL_DoubleEscapeSize(const char *string, char quote1, char quote2); | 32 int NSSUTIL_DoubleEscapeSize(const char *string, char quote1, char quote2); |
32 char *NSSUTIL_DoubleEscape(const char *string, char quote1, char quote2); | 33 char *NSSUTIL_DoubleEscape(const char *string, char quote1, char quote2); |
33 | 34 |
34 unsigned long NSSUTIL_ArgParseSlotFlags(char *label,char *params); | 35 unsigned long NSSUTIL_ArgParseSlotFlags(const char *label,const char *params); |
35 struct NSSUTILPreSlotInfoStr *NSSUTIL_ArgParseSlotInfo(PLArenaPool *arena, | 36 struct NSSUTILPreSlotInfoStr *NSSUTIL_ArgParseSlotInfo(PLArenaPool *arena, |
36 » » » » » char *slotParams, int *retCount); | 37 » » » » const char *slotParams, int *retCount); |
37 char * NSSUTIL_MkSlotString(unsigned long slotID, unsigned long defaultFlags, | 38 char * NSSUTIL_MkSlotString(unsigned long slotID, unsigned long defaultFlags, |
38 unsigned long timeout, unsigned char askpw_in, | 39 unsigned long timeout, unsigned char askpw_in, |
39 PRBool hasRootCerts, PRBool hasRootTrust); | 40 PRBool hasRootCerts, PRBool hasRootTrust); |
40 SECStatus NSSUTIL_ArgParseModuleSpec(char *modulespec, char **lib, char **mod, | 41 SECStatus NSSUTIL_ArgParseModuleSpec(const char *modulespec, char **lib, |
41 char **parameters, char **nss); | 42 » » char **mod, char **parameters, char **nss); |
42 SECStatus NSSUTIL_ArgParseModuleSpecEx(char *modulespec, char **lib, char **mod, | 43 SECStatus NSSUTIL_ArgParseModuleSpecEx(const char *modulespec, char **lib, |
43 char **parameters, char **nss, char **co
nfig); | 44 » » char **mod, char **parameters, char **nss, char **config); |
44 char *NSSUTIL_MkModuleSpec(char *dllName, char *commonName, | 45 char *NSSUTIL_MkModuleSpec(char *dllName, char *commonName, |
45 char *parameters, char *NSS); | 46 char *parameters, char *NSS); |
46 char *NSSUTIL_MkModuleSpecEx(char *dllName, char *commonName, | 47 char *NSSUTIL_MkModuleSpecEx(char *dllName, char *commonName, |
47 char *parameters, char *NSS, char *config); | 48 char *parameters, char *NSS, char *config); |
48 void NSSUTIL_ArgParseCipherFlags(unsigned long *newCiphers,char *cipherList); | 49 void NSSUTIL_ArgParseCipherFlags(unsigned long *newCiphers, |
| 50 » » » const char *cipherList); |
49 char * NSSUTIL_MkNSSString(char **slotStrings, int slotCount, PRBool internal, | 51 char * NSSUTIL_MkNSSString(char **slotStrings, int slotCount, PRBool internal, |
50 PRBool isFIPS, PRBool isModuleDB, PRBool isModuleDBOnly, | 52 PRBool isFIPS, PRBool isModuleDB, PRBool isModuleDBOnly, |
51 PRBool isCritical, unsigned long trustOrder, | 53 PRBool isCritical, unsigned long trustOrder, |
52 unsigned long cipherOrder, unsigned long ssl0, unsigned long ssl1); | 54 unsigned long cipherOrder, unsigned long ssl0, unsigned long ssl1); |
53 | 55 |
54 /* | 56 /* |
55 * private functions for softoken. | 57 * private functions for softoken. |
56 */ | 58 */ |
57 char * _NSSUTIL_GetSecmodName(char *param, NSSDBType *dbType, char **appName, ch
ar **filename,PRBool *rw); | 59 char * _NSSUTIL_GetSecmodName(const char *param, NSSDBType *dbType, |
| 60 » » » char **appName, char **filename,PRBool *rw); |
58 const char *_NSSUTIL_EvaluateConfigDir(const char *configdir, NSSDBType *dbType,
char **app); | 61 const char *_NSSUTIL_EvaluateConfigDir(const char *configdir, NSSDBType *dbType,
char **app); |
59 | 62 |
60 #endif /* _UTILPARS_H_ */ | 63 #endif /* _UTILPARS_H_ */ |
OLD | NEW |