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
#ifndef MODUTIL_ERROR_H
6
#define MODUTIL_ERROR_H
9
* The values of these enumerated constants are immutable and must not be
24
FIPS_SWITCH_FAILED_ERR,
27
FILE_ALREADY_EXISTS_ERR,
28
FILE_DOESNT_EXIST_ERR,
29
FILE_NOT_READABLE_ERR,
30
FILE_NOT_WRITEABLE_ERR,
33
DIR_NOT_WRITEABLE_ERR,
35
ADD_MODULE_FAILED_ERR,
36
UNUSED_ERR, /* reserved for future use */
50
AUTHENTICATION_FAILED_ERR,
53
UPDATE_MOD_FAILED_ERR,
59
NSS_INITIALIZE_FAILED_ERR,
61
LAST_ERR /* must be last */
63
#define SUCCESS NO_ERR
65
/* !!! Should move this into its own .c and un-static it. */
66
static char *errStrings[] = {
67
"Operation completed successfully.\n",
68
"ERROR: Invalid command line.\n",
69
"ERROR: Not expecting argument \"%s\".\n",
70
"ERROR: Unknown option: %s.\n",
71
"ERROR: %s: multiple commands are not allowed on the command line.\n",
72
"ERROR: %s: option needs an argument.\n",
73
"ERROR: %s: option cannot be given more than once.\n",
74
"ERROR: Command \"%s\" requires parameter \"%s\".\n",
75
"ERROR: Argument to -fips must be \"true\" or \"false\".\n",
76
"ERROR: No command was specified.\n",
77
"ERROR: Cannot determine database directory: use the -dbdir option.\n",
78
"ERROR: Unable to switch FIPS modes.\n",
79
"FIPS mode already enabled.\n",
80
"FIPS mode already disabled.\n",
81
"ERROR: File \"%s\" already exists.\n",
82
"ERROR: File \"%s\" does not exist.\n",
83
"ERROR: File \"%s\" is not readable.\n",
84
"ERROR: File \"%s\" is not writeable.\n",
85
"ERROR: Directory \"%s\" does not exist.\n",
86
"ERROR: Directory \"%s\" is not readable.\n",
87
"ERROR: Directory \"%s\" is not writeable.\n",
88
"\"%s\" is not a recognized value.\n",
89
"ERROR: Failed to add module \"%s\". Probable cause : \"%s\".\n",
90
"Unused error string",
91
"ERROR: Out of memory.\n",
92
"ERROR: Cannot delete internal module.\n",
93
"ERROR: Failed to delete module \"%s\".\n",
94
"ERROR: Unable to obtain lock on module list.\n",
95
"ERROR: Unable to obtain module list.\n",
96
"ERROR: Module \"%s\" not found in database.\n",
97
"ERROR: Unable to get information about module \"%s\".\n",
98
"ERROR: Unable to get information about slot \"%s\".\n",
99
"ERROR: Unable to get information about token \"%s\".\n",
100
"ERROR: Token \"%s\" not found.\n",
101
"ERROR: Unable to change password on token \"%s\".\n",
102
"ERROR: Incorrect password.\n",
103
"ERROR: Unable to access database \"%s\".\n",
104
"ERROR: Unable to authenticate to token \"%s\".\n",
105
"ERROR: Slot \"%s\" not found.\n",
106
"ERROR: Failed to %s slot \"%s\".\n",
107
"ERROR: Failed to update module \"%s\".\n",
108
"ERROR: Failed to change defaults.\n",
109
"ERROR: Failed to change default.\n",
110
"ERROR: Unable to read from standard input.\n",
111
"ERROR: Unknown error occurred.\n",
112
"ERROR: -nocertdb option can only be used with the -jar command.\n"
113
"ERROR: NSS_Initialize() failed.\n"
121
ADD_MODULE_SUCCESS_MSG,
123
CHANGEPW_SUCCESS_MSG,
129
UNDEFAULT_SUCCESS_MSG,
133
LAST_MSG /* must be last */
136
static char *msgStrings[] = {
137
"FIPS mode enabled.\n",
138
"FIPS mode disabled.\n",
139
"Using database directory %s...\n",
140
"Creating \"%s\"...",
141
"Module \"%s\" added to database.\n",
142
"Module \"%s\" deleted from database.\n",
143
"Token \"%s\" password changed successfully.\n",
144
"Incorrect password, try again...\n",
145
"Passwords do not match, try again...\n",
148
"Successfully changed defaults.\n",
149
"Successfully changed defaults.\n",
150
"\nWARNING: Performing this operation while the browser is running could cause"
151
"\ncorruption of your security databases. If the browser is currently running,"
152
"\nyou should exit browser before continuing this operation. Type "
153
"\n'q <enter>' to abort, or <enter> to continue: ",
157
#endif /* MODUTIL_ERROR_H */