1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/lib/util/utilpars.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,56 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef _UTILPARS_H_ 1.9 +#define _UTILPARS_H_ 1 1.10 + 1.11 +#include "utilparst.h" 1.12 +#include "plarena.h" 1.13 + 1.14 +/* handle a module db request */ 1.15 +char ** NSSUTIL_DoModuleDBFunction(unsigned long function,char *parameters, void *args); 1.16 + 1.17 +/* parsing functions */ 1.18 +char *NSSUTIL_ArgFetchValue(char *string, int *pcount); 1.19 +char *NSSUTIL_ArgStrip(char *c); 1.20 +char *NSSUTIL_ArgGetParamValue(char *paramName,char *parameters); 1.21 +char *NSSUTIL_ArgSkipParameter(char *string); 1.22 +char *NSSUTIL_ArgGetLabel(char *inString, int *next); 1.23 +long NSSUTIL_ArgDecodeNumber(char *num); 1.24 +PRBool NSSUTIL_ArgIsBlank(char c); 1.25 +PRBool NSSUTIL_ArgHasFlag(char *label, char *flag, char *parameters); 1.26 +long NSSUTIL_ArgReadLong(char *label,char *params, long defValue, 1.27 + PRBool *isdefault); 1.28 + 1.29 +/* quoting functions */ 1.30 +int NSSUTIL_EscapeSize(const char *string, char quote); 1.31 +char *NSSUTIL_Escape(const char *string, char quote); 1.32 +int NSSUTIL_QuoteSize(const char *string, char quote); 1.33 +char *NSSUTIL_Quote(const char *string, char quote); 1.34 +int NSSUTIL_DoubleEscapeSize(const char *string, char quote1, char quote2); 1.35 +char *NSSUTIL_DoubleEscape(const char *string, char quote1, char quote2); 1.36 + 1.37 +unsigned long NSSUTIL_ArgParseSlotFlags(char *label,char *params); 1.38 +struct NSSUTILPreSlotInfoStr *NSSUTIL_ArgParseSlotInfo(PLArenaPool *arena, 1.39 + char *slotParams, int *retCount); 1.40 +char * NSSUTIL_MkSlotString(unsigned long slotID, unsigned long defaultFlags, 1.41 + unsigned long timeout, unsigned char askpw_in, 1.42 + PRBool hasRootCerts, PRBool hasRootTrust); 1.43 +SECStatus NSSUTIL_ArgParseModuleSpec(char *modulespec, char **lib, char **mod, 1.44 + char **parameters, char **nss); 1.45 +char *NSSUTIL_MkModuleSpec(char *dllName, char *commonName, 1.46 + char *parameters, char *NSS); 1.47 +void NSSUTIL_ArgParseCipherFlags(unsigned long *newCiphers,char *cipherList); 1.48 +char * NSSUTIL_MkNSSString(char **slotStrings, int slotCount, PRBool internal, 1.49 + PRBool isFIPS, PRBool isModuleDB, PRBool isModuleDBOnly, 1.50 + PRBool isCritical, unsigned long trustOrder, 1.51 + unsigned long cipherOrder, unsigned long ssl0, unsigned long ssl1); 1.52 + 1.53 +/* 1.54 + * private functions for softoken. 1.55 + */ 1.56 +char * _NSSUTIL_GetSecmodName(char *param, NSSDBType *dbType, char **appName, char **filename,PRBool *rw); 1.57 +const char *_NSSUTIL_EvaluateConfigDir(const char *configdir, NSSDBType *dbType, char **app); 1.58 + 1.59 +#endif /* _UTILPARS_H_ */