Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #ifndef _UTILPARS_H_ |
michael@0 | 6 | #define _UTILPARS_H_ 1 |
michael@0 | 7 | |
michael@0 | 8 | #include "utilparst.h" |
michael@0 | 9 | #include "plarena.h" |
michael@0 | 10 | |
michael@0 | 11 | /* handle a module db request */ |
michael@0 | 12 | char ** NSSUTIL_DoModuleDBFunction(unsigned long function,char *parameters, void *args); |
michael@0 | 13 | |
michael@0 | 14 | /* parsing functions */ |
michael@0 | 15 | char *NSSUTIL_ArgFetchValue(char *string, int *pcount); |
michael@0 | 16 | char *NSSUTIL_ArgStrip(char *c); |
michael@0 | 17 | char *NSSUTIL_ArgGetParamValue(char *paramName,char *parameters); |
michael@0 | 18 | char *NSSUTIL_ArgSkipParameter(char *string); |
michael@0 | 19 | char *NSSUTIL_ArgGetLabel(char *inString, int *next); |
michael@0 | 20 | long NSSUTIL_ArgDecodeNumber(char *num); |
michael@0 | 21 | PRBool NSSUTIL_ArgIsBlank(char c); |
michael@0 | 22 | PRBool NSSUTIL_ArgHasFlag(char *label, char *flag, char *parameters); |
michael@0 | 23 | long NSSUTIL_ArgReadLong(char *label,char *params, long defValue, |
michael@0 | 24 | PRBool *isdefault); |
michael@0 | 25 | |
michael@0 | 26 | /* quoting functions */ |
michael@0 | 27 | int NSSUTIL_EscapeSize(const char *string, char quote); |
michael@0 | 28 | char *NSSUTIL_Escape(const char *string, char quote); |
michael@0 | 29 | int NSSUTIL_QuoteSize(const char *string, char quote); |
michael@0 | 30 | char *NSSUTIL_Quote(const char *string, char quote); |
michael@0 | 31 | int NSSUTIL_DoubleEscapeSize(const char *string, char quote1, char quote2); |
michael@0 | 32 | char *NSSUTIL_DoubleEscape(const char *string, char quote1, char quote2); |
michael@0 | 33 | |
michael@0 | 34 | unsigned long NSSUTIL_ArgParseSlotFlags(char *label,char *params); |
michael@0 | 35 | struct NSSUTILPreSlotInfoStr *NSSUTIL_ArgParseSlotInfo(PLArenaPool *arena, |
michael@0 | 36 | char *slotParams, int *retCount); |
michael@0 | 37 | char * NSSUTIL_MkSlotString(unsigned long slotID, unsigned long defaultFlags, |
michael@0 | 38 | unsigned long timeout, unsigned char askpw_in, |
michael@0 | 39 | PRBool hasRootCerts, PRBool hasRootTrust); |
michael@0 | 40 | SECStatus NSSUTIL_ArgParseModuleSpec(char *modulespec, char **lib, char **mod, |
michael@0 | 41 | char **parameters, char **nss); |
michael@0 | 42 | char *NSSUTIL_MkModuleSpec(char *dllName, char *commonName, |
michael@0 | 43 | char *parameters, char *NSS); |
michael@0 | 44 | void NSSUTIL_ArgParseCipherFlags(unsigned long *newCiphers,char *cipherList); |
michael@0 | 45 | char * NSSUTIL_MkNSSString(char **slotStrings, int slotCount, PRBool internal, |
michael@0 | 46 | PRBool isFIPS, PRBool isModuleDB, PRBool isModuleDBOnly, |
michael@0 | 47 | PRBool isCritical, unsigned long trustOrder, |
michael@0 | 48 | unsigned long cipherOrder, unsigned long ssl0, unsigned long ssl1); |
michael@0 | 49 | |
michael@0 | 50 | /* |
michael@0 | 51 | * private functions for softoken. |
michael@0 | 52 | */ |
michael@0 | 53 | char * _NSSUTIL_GetSecmodName(char *param, NSSDBType *dbType, char **appName, char **filename,PRBool *rw); |
michael@0 | 54 | const char *_NSSUTIL_EvaluateConfigDir(const char *configdir, NSSDBType *dbType, char **app); |
michael@0 | 55 | |
michael@0 | 56 | #endif /* _UTILPARS_H_ */ |