Annotation of win32/sql/oracle/include/oci/nzerror.h, revision 1.1.1.1.2.1
1.1 parser 1: /* DISABLE check_long_lines */
2:
3: /*
1.1.1.1.2.1! paf 4: * $Header: /var/lib/cvsroot/parser3/win32oracle/include/oci/nzerror.h,v 1.1.1.1 2001/09/21 15:47:33 parser Exp $
1.1 parser 5: *
6: * Copyright (c) Oracle Corporation 1995, 1996, 1997, 1998, 1999. All Rights Reserved.
7: */
8:
9: /* ENABLE check_long_lines */
10: /*
11: NAME
12: nzerror.h - error numbers for the Oracle Security Server
13: DESCRIPTION
14: None.
15: PUBLIC FUNCTION(S)
16: None.
17: PRIVATE FUNCTION(S)
18: None.
19: NOTES
20: A pragma is used to silence olint about the enum value names not being
21: unique within 7 characters. This limit is being changed to 30.
22: MODIFIED
23: rwessman 07/07/99 - Deleted include of sslerrs.h. It caused the RDBMS bu
24: rwessman 07/02/99 - fixed merge errors
25: rwessman 07/01/99 - moved NZOS errors to nzerror to make them visible
26: supriya 12/16/98 - add new error for cert chain.
27: arswamin 12/04/98 - add NZERROR_NO_MATCHING_PRIVATE_KEY
28: qdinh 11/12/98 - add NZERROR_VALIDITY_EXPIRED.
29: arswamin 06/17/98 - add INIT_FAILED
30: sdange 06/10/98 - change wrong password to bad password
31: amthakur 06/09/98 - adding error messages
32: wliau 03/10/97 - Add new error message for snzdfo.c.
33: rwessman 03/14/97 - Consolidated PL/SQL toolkit errors into generic erro
34: rwessman 02/26/97 - Added NZERROR_UNSUPPORTED. Corrected values of
35: errors outside the valid range.
36: asriniva 03/02/97 - Fix olint warning
37: rwessman 02/26/97 - Added NZERROR_UNSUPPORTED
38: rwessman 01/02/97 - Changed PLSQL package errors to be TK_PLSQL to
39: separate them from the errors generated by the
40: Oracle interface.
41: rwessman 12/30/96 - Merged in PL/SQL toolkit errors
42: sdange 11/14/96 - (Added NZERROR_DECRYPT_FAILED to the enum list)
43: rwessman 12/02/96 -
44: rwessman 11/25/96 - Added error messages for PL/SQL functions.
45: asriniva 10/31/96 - Include oratypes.h
46: asriniva 10/29/96 - Fix numbering.
47: asriniva 10/29/96 - Fix error numbers
48: asriniva 10/29/96 - Correct type-o
49: asriniva 10/28/96 - Add more TK errors
50: asriniva 10/28/96 - Convert OKAPI errors to TK errors.
51: rwessman 10/17/96 - still more OSS TK errors
52: asriniva 10/16/96 - OKAPI errors
53: asriniva 10/15/96 - OSSTK errors
54: rwessman 10/15/96 - Added more OSS TK errors
55: asriniva 10/09/96 - Add OSSTK errors.
56: rwessman 09/05/96 - Added errors for PL/SQL functions.
57: wliau 09/05/96 - correct error numbers.
58: $Log: nzerror.h,v $
1.1.1.1.2.1! paf 59: Revision 1.1.1.1 2001/09/21 15:47:33 parser
! 60: no message
! 61:
1.1 parser 62: Revision 1.1 2001/08/22 14:02:18 parser
63: oracle sql driver just linked
64:
65: * Revision 1.26 1996/07/15 23:07:23 wliau
66: * Added NZERROR_AUTH_SHARED_MEMORY
67: *
68: * Revision 1.25 1996/07/01 20:40:15 asriniva
69: * Finished RSA verify/sign.
70: *
71: * Revision 1.24 1996/06/27 20:39:41 rwessman
72: * Added more errors.
73: *
74: * Revision 1.23 1996/05/31 17:33:40 rwessman
75: * Updated nzerror.h to contain bug # for olint enum bug.
76: *
77: * Revision 1.22 1996/05/31 17:12:30 rwessman
78: * Assigned values to the various errors.
79: *
80: * Revision 1.21 1996/05/13 20:46:58 ggilchri
81: * Added more attribute related error conditions
82: *
83: */
84:
85: #ifndef NZERROR_ORACLE
86: # define NZERROR_ORACLE
87:
88: #ifndef ORATYPES
89: # include <oratypes.h>
90: #endif /* ORATYPES */
91:
92: /*
93: ** Errors - when an error is added here, a message corresponding to the
94: ** error number must be added to the message file.
95: ** New errors must be assigned numbers, otherwise the compiler can assign any
96: ** value that it wants, which may lead to invalid error numbers being
97: ** generated.
98: ** The number range currently assigned to the OSS is 28750 - 29249
99: */
100:
101: typedef enum nzerror
102: {
103: NZERROR_OK = 0,
104: NZERROR_GENERIC = 28750, /* A catchall for errors */
105: NZERROR_NO_MEMORY = 28751, /* No more memory */
106: NZERROR_DATA_SOURCE_INIT_FAILED = 28752, /* Failed to init data source */
107: NZERROR_DATA_SOURCE_TERM_FAILED = 28753,/* Failed to terminate data source */
108: NZERROR_OBJECT_STORE_FAILED = 28754, /* Store object in data source failed */
109: NZERROR_OBJECT_GET_FAILED = 28755,
110: /* Failed to obtain object from data source */
111: NZERROR_MEMORY_ALLOC_FAILED = 28756,
112: /* Callback failed to allocate memory */
113: NZERROR_MEMORY_ALLOC_0_BYTES = 28757,
114: /* Attempted to ask for 0 bytes of memory */
115: NZERROR_MEMORY_FREE_FAILED = 28758,
116: /* Callback failed to free memory */
117: NZERROR_FILE_OPEN_FAILED = 28759,
118: /* Open of file failed */
119: NZERROR_LIST_CREATION_FAILED = 28760,
120: /* Creation of list failed */
121: NZERROR_NO_ELEMENT = 28761,
122: /* No list element found */
123: NZERROR_ELEMENT_ADD_FAILED = 28762,
124: /* Addition of list element failed */
125: NZERROR_PARAMETER_BAD_TYPE = 28763,
126: /* Retrieval of an unknown parameter type */
127: NZERROR_PARAMETER_RETRIEVAL = 28764, /* Retrieval of parameter failed */
128:
129: NZERROR_NO_LIST = 28765, /* Data method list does not exist */
130: NZERROR_TERMINATE_FAIL = 28766, /* Failed to terminate */
131: NZERROR_BAD_VERSION_NUMBER = 28767, /* Bad version number */
132: NZERROR_BAD_MAGIC_NUMBER = 28768, /* Bad magic number */
133: NZERROR_METHOD_NOT_FOUND = 28769,
134: /* Data retrieval method specified does not exist */
135: NZERROR_ALREADY_INITIALIZED = 28770,
136: /*The data source is already initialized */
137: NZERROR_NOT_INITIALIZED = 28771, /* The data source is not initialized */
138: NZERROR_BAD_FILE_ID = 28772, /* File ID is bad */
139: NZERROR_WRITE_MAGIC_VERSION = 28773, /* Failed to write magic and version */
140: NZERROR_FILE_WRITE_FAILED = 28774, /* Failed to write to file */
141: NZERROR_FILE_CLOSE_FAILED = 28775, /* Failed to close file */
142: NZERROR_OUTPUT_BUFFER_TOO_SMALL = 28776,
143: /* The buffer supplied by the caller is too small */
144: NZERROR_BINDING_CREATION_FAILED = 28777,/* NL failed in creating a binding */
145: NZERROR_PARAMETER_MALFORMED = 28778, /* A parameter was in a bad format */
146: NZERROR_PARAMETER_NO_METHOD = 28779,
147: /* No method was specified for a data type */
148: NZERROR_BAD_PARAMETER_METHOD = 28780, /* Illegal method for data type */
149: NZERROR_PARAMETER_NO_DATA = 28781, /* No method specified when required */
150: NZERROR_NOT_ALLOCATED = 28782, /* Data source is not allocated */
151: NZERROR_INVALID_PARAMETER = 28783, /* Invalid parameter name */
152: NZERROR_FILE_NAME_TRANSLATION = 28784,/* Could not translate OSD file name */
153: NZERROR_NO_SUCH_PARAMETER = 28785, /* Selected parameter is non-existent */
154:
155: NZERROR_DECRYPT_FAILED = 28786, /* Encrypted private key decryption failure */
156: NZERROR_ENCRYPT_FAILED = 28787, /* Private key encryption failed */
157:
158: NZERROR_INVALID_INPUT = 28788, /* Incorrect input or unknown error */
159:
160: NZERROR_NAME_TYPE_NOT_FOUND = 28789,
161: /* Type of name requested is not available */
162: NZERROR_NLS_STRING_OPEN_FAILED = 28790,
163: /* Failure to generate an NLS string */
164: NZERROR_CERTIFICATE_VERIFY = 28791, /* Failed to verify a certificate */
165: NZERROR_OCI_PLSQL_FAILED = 28792,
166: /* an OCI call to process some plsql failed */
167: NZERROR_OCI_BIND_FAILED = 28793,
168: /* an OCI call to bind an internal var. failed */
169: NZERROR_ATTRIBUTE_INIT = 28794, /* failed to init role retrieval */
170: NZERROR_ATTRIBUTE_FINISH_FAILED = 28795,/* Did not complete role retrieval */
171: NZERROR_UNSUPPORTED_METHOD = 28796, /* Data method specified not supported */
172: NZERROR_INVALID_KEY_DATA_TYPE = 28797,
173: /* Invalid data type specified for key */
174: NZEROR_BIND_SUBKEY_COUNT = 28798,
175: /* Number of sub-keys to bind does not match count in initialized key */
176: NZERROR_AUTH_SHARED_MEMORY = 28799,
177: /* Failed to retreieve authentication information from the shared memory */
178: NZERROR_RIO_OPEN = 28800, /* RIO Open Failed */
179: NZERROR_RIO_OBJECT_TYPE = 28801, /* RIO object type invalid */
180: NZERROR_RIO_MODE = 28802, /* RIO mode invalid */
181: NZERROR_RIO_IO = 28803, /* RIO io set or numberinvalid */
182: NZERROR_RIO_CLOSE = 28804, /* RIO close failed */
183: NZERROR_RIO_RETRIEVE = 28805, /* RIO retrieve failed */
184: NZERROR_RIO_STORE = 28806, /* RIO store failed */
185: NZERROR_RIO_UPDATE = 28807, /* RIO update failed */
186: NZERROR_RIO_INFO = 28808, /* RIO info failed */
187: NZERROR_RIO_DELETE = 28809, /* RIO delete failed */
188: NZERROR_KD_CREATE = 28810, /* Key descriptor create failed */
189: NZERROR_RIO_ACCESS_DESCRIPTOR = 28811, /* access descriptor invalid */
190: NZERROR_RIO_RECORD = 28812, /* record invalid */
191: NZERROR_RIO_RECORD_TYPE = 28813, /* record type and AD type not matched */
192: NZERROR_PLSQL_ORACLE_TO_REAL = 28814,
193: /* A number passed to PL/SQL could not be converted to real format */
194: NZERROR_PLSQL_REAL_TO_ORACLE = 28815,
195: /* A number in machine format could not be converted to Oracle format */
196: NZERROR_TK_PLSQL_NO_PASSWORD = 28816,
197: /* A password was not provided to a PL/SQL function */
198: NZERROR_TK_PLSQL_GENERIC = 28817,
199: /* A PL/SQL function returned an error */
200: NZERROR_TK_PLSQL_NO_CONTEXT = 28818,
201: /* The package context was not specified to a PL/SQL function */
202: NZERROR_TK_PLSQL_NO_DIST_NAME = 28819,
203: /* The user's distinguished name was not provided to a PL/SQL function */
204: NZERROR_TK_PLSQL_NO_STATE = 28820,
205: /* The state of either a signature or decryption/encryption was not provided */
206: NZERROR_TK_PLSQL_NO_INPUT = 28821,
207: /* An input buffer was specified to a PL/SQL function */
208: NZERROR_TK_PLSQL_NO_SEED = 28822,
209: /* No seed was specified to the PL/SQL seed initialization function */
210: NZERROR_TK_PLSQL_NO_BYTES = 28823,
211: /* Number of bytes was not specified to the PL/SQL random number generator */
212: NZERROR_TK_INVALID_STATE = 28824,
213: /* Invalid encryption/decryption/signature state passed */
214: NZERROR_TK_PLSQL_NO_ENG_FUNC = 28825,
215: /* No crypto engine function was passed in */
216: NZERROR_TK_INV_ENG_FUNC = 28826,
217: /* An invalid crypto engine function was passed in */
218: NZERROR_TK_INV_CIPHR_TYPE = 28827,
219: /* An invalid cipher type was passed in */
220: NZERROR_TK_INV_IDENT_TYPE = 28828,
221: /* An invalid identity type was specified */
222: NZERROR_TK_PLSQL_NO_CIPHER_TYPE = 28829,
223: /* No cipher type was specified */
224: NZERROR_TK_PLSQL_NO_IDENT_TYPE = 28830,
225: /* No identity type was specified */
226: NZERROR_TK_PLSQL_NO_DATA_FMT = 28831,
227: /* No data unit format was specified */
228: NZERROR_TK_INV_DATA_FMT = 28832,
229: /* Invalid data unit format was provided to function */
230: NZERROR_TK_PLSQL_INSUFF_INFO = 28833,
231: /* Not enough info (usually parameters) provided to a PL/SQL function */
232: NZERROR_TK_PLSQL_BUF_TOO_SMALL = 28834,
233: /* Buffer provided by PL/SQL is too small for data to be returned */
234: NZERROR_TK_PLSQL_INV_IDENT_DESC = 28835,
235: /* Identity descriptor not present or too small */
236: NZERROR_TK_PLSQL_WALLET_NOTOPEN = 28836,
237: /* Wallet has not been opened yet */
238: NZERROR_TK_PLSQL_NO_WALLET = 28837,
239: /* No wallet descriptor specified to PL/SQL function */
240: NZERROR_TK_PLSQL_NO_IDENTITY = 28838,
241: /* No identity descriptor specified to PL/SQL function */
242: NZERROR_TK_PLSQL_NO_PERSONA = 28839,
243: /* No persona descriptor was specified to PL/SQL function */
244: NZERROR_TK_PLSQL_WALLET_OPEN = 28840,
245: /* Wallet was already opened */
246: NZERROR_UNSUPPORTED = 28841, /* Operation is not supported */
247: NZERROR_FILE_BAD_PERMISSION = 28842, /* Bad file permission specified */
248: NZERROR_FILE_OSD_ERROR = 28843, /* OSD error when opening file */
249: NZERROR_NO_WALLET = 28844, /* cert + privkey + tp files do not exist */
250: NZERROR_NO_CERTIFICATE_ALERT = 28845, /* no certificate */
251: NZERROR_NO_PRIVATE_KEY = 28846, /* no private-key */
252: NZERROR_NO_CLEAR_PRIVATE_KEY_FILE = 28847, /* no clear key-file */
253: NZERROR_NO_ENCRYPTED_PRIVATE_KEY_FILE = 28848, /* no encrypted priv key */
254: NZERROR_NO_TRUSTPOINTS = 28849, /* no trustpoints */
255: NZERROR_NO_CLEAR_TRUSTPOINT_FILE = 28850, /* no clear trustpoints */
256: NZERROR_NO_ENCRYPTED_TRUSTPOINT_FILE = 28851, /* no encrypted trustpoints */
257: NZERROR_BAD_PASSWORD = 28852, /* bad password */
258: NZERROR_INITIALIZATION_FAILED = 28853, /* init failed or
259: module loading failed */
260: /******************************* SSL ERRORS ********************************/
261: /*
262: * In order to allow SSL errors to be mapped to Oracle errors, space is
263: * provided here. One Oracle error is provided for each SSL error to make
264: * error handling easier. A macro is provided to do the conversion.
265: * NOTE: ANY CHANGE IN SSL ERRORS MUST BE REFLECTED HERE.
266: * To add an SSL error, use the following formula to calculate the Oracle
267: * error:
268: * new_oracle_error = (new_ssl_error - SSLMemoryError) + NZERROR_SSLMemoryErr
269: * or numerically:
270: * new_oracle_error = (new_ssl_error - -7000) + 28854
271: */
272: NZERROR_SSLMemoryErr = 28854,
273: NZERROR_SSLUnsupportedErr = 28855,
274: NZERROR_SSLOverflowErr = 28856,
275: NZERROR_SSLUnknownErr = 28857,
276: NZERROR_SSLProtocolErr = 28858,
277: NZERROR_SSLNegotiationErr = 28859,
278: NZERROR_SSLFatalAlert = 28860,
279: NZERROR_SSLWouldBlockErr = 28861,
280: NZERROR_SSLIOErr = 28862,
281: NZERROR_SSLSessionNotFoundErr = 28863,
282: NZERROR_SSLConnectionClosedGraceful = 28864,
283: NZERROR_SSLConnectionClosedError = 28865,
284: NZERROR_ASNBadEncodingErr = 28866,
285: NZERROR_ASNIntegerTooBigErr = 28867,
286: NZERROR_X509CertChainInvalidErr = 28868,
287: NZERROR_X509CertExpiredErr = 28869,
288: NZERROR_X509NamesNotEqualErr = 28870,
289: NZERROR_X509CertChainIncompleteErr = 28871,
290: NZERROR_X509DataNotFoundErr = 28872,
291: NZERROR_SSLBadParameterErr = 28873,
292: NZERROR_SSLIOClosedOverrideGoodbyeKiss = 28874,
293: NZERROR_X509MozillaSGCErr = 28875,
294: NZERROR_X509IESGCErr = 28876,
295: NZERROR_ImproperServerCredentials = 28877,
296: NZERROR_ImproperClientCredentials = 28878,
297: NZERROR_NoProtocolSideSet = 28879,
298: NZERROR_setPersonaFailed = 28880,
299: NZERROR_setCertFailed = 28881,
300: NZERROR_setVKeyFailed = 28882,
301: NZERROR_setTPFailed = 28883,
302: NZERROR_BadCipherSuite = 28884,
303:
304:
305: /* ============>>> ADD ERRORS HERE -- NOTE DECREASING numbers */
306: NZERROR_DN_MATCH = 29222, /* for nztCompareDN */
307: NZERROR_CERT_CHAIN_CREATION = 29223, /* unable to create a cert chain
308: * with the existing TPs for the
309: * cert to be installed.
310: */
311: NZERROR_NO_MATCHING_CERT_REQ = 29224, /* No matching cert_req was
312: * found the corresponding to
313: * the privatekey which
314: * matches the cert to be
315: * installed */
316: NZERROR_CERT_ALREADY_INSTALLED = 29225, /* we are attempting to
317: * install a cert again into
318: * a persona which already
319: * has it installed.
320: */
321: NZERROR_NO_MATCHING_PRIVATE_KEY = 29226, /* could not find a matching
322: * persona-private(privatekey) in
323: * the Persona, for the given
324: * cert(public key).
325: */
326: NZERROR_VALIDITY_EXPIRED = 29227, /* certificate validity date expired */
327: NZERROR_TK_BYTES_NEEDED = 29228, /* Couldn't determine # of bytes needed */
328: NZERROR_TK_BAD_MAGIC_NUMBER = 29229,
329: /* Magic number found in header does not match expected */
330: NZERROR_TK_BAD_HEADER_LENGTH = 29230,
331: /* Header length passed in not sufficient for message header */
332: NZERROR_TK_CE_INIT = 29231, /* Crypto engine failed to initialize */
333: NZERROR_TK_CE_KEYINIT = 29232, /* Crypto engine key initialization failed */
334: NZERROR_TK_CE_ENCODE_KEY = 29233, /* Count not encode key object */
335: NZERROR_TK_CE_DECODE_KEY = 29234, /* Could not decode key into object */
336: NZERROR_TK_CE_GEYKEYINFO = 29235, /* Crypto engine failed to get key info */
337: NZERROR_TK_SEED_RANDOM = 29236, /* Couldn't seed random number generator */
338: NZERROR_TK_CE_ALGFINISH = 29237, /* Couldn't finish algorithm */
339: NZERROR_TK_CE_ALGAPPLY = 29238, /* Couldn't apply algorithm to data */
340: NZERROR_TK_CE_ALGINIT = 29239, /* Couldn't init CE for algorithm */
341: NZERROR_TK_ALGORITHM = 29240, /* Have no idea what algorithm you want */
342: NZERROR_TK_CANNOT_GROW = 29241, /* Cannot grow output buffer block */
343: NZERROR_TK_KEYSIZE = 29242, /* Key not large enough for data */
344: NZERROR_TK_KEYTYPE = 29243, /* Unknown key type. */
345:
346: NZERROR_TK_PLSQL_NO_WRL = 29244,
347: /* Wallet resource locator not specified to PL/SQL function */
348:
349: NZERROR_TK_CE_FUNC = 29245, /* Unknown crypto engine function */
350: NZERROR_TK_TDU_FORMAT = 29246, /* Unknown TDU format */
351: NZERROR_TK_NOTOPEN = 29247, /* Object must be open */
352: NZERROR_TK_WRLTYPE = 29248, /* Bad WRL type */
353: NZERROR_TK_CE_STATE = 29249, /* Bad state specified for the crypto engine */
354:
355: NZERROR_LAST_ERROR = 29249, /* Last available error */
356: /* MAXIMUM ERROR NUMBER IS 29249 */
357:
358: /*
359: * DO NOT JUST INSERT NEW ERRORS IN ANY OLD PLACE. New errors should be
360: * added such the current error retains their integer values. Duplicate
361: * values will cause compiler errors.
362: */
363: NZERROR_THIS_MUST_BE_LAST
364:
365: } nzerror;
366:
367: /*
368: * Macro to convert SSL errors to Oracle errors. As SSL errors are negative
369: * and Oracle numbers are positive, the following needs to be done.
370: * 1. The base error number, which is the highest, is added to the
371: * SSL error to get the index into the number range.
372: * 2. The result is added to the base Oracle number to get the Oracle error.
373: */
374: #define NZERROR_SSL_TO_ORACLE(ssl_error_) \
375: ((ssl_error_ == SSLNoErr) \
376: ? NZERROR_OK \
377: : (nzerror) ((ssl_error_ - SSLMemoryErr) + (uword) NZERROR_SSLMemoryErr))
378: #endif /* NZERROR_ORACLE */
E-mail: