2 * Copyright (c) 1995, Index Data.
4 * Permission to use, copy, modify, distribute, and sell this software and
5 * its documentation, in whole or in part, for any purpose, is hereby granted,
8 * 1. This copyright and permission notice appear in all copies of the
9 * software and its documentation. Notices of copyright or attribution
10 * which appear at the beginning of any file must remain unchanged.
12 * 2. The name of Index Data or the individual authors may not be used to
13 * endorse or promote products derived from this software without specific
14 * prior written permission.
16 * THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
18 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
19 * IN NO EVENT SHALL INDEX DATA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
20 * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
21 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR
22 * NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
23 * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
27 * Revision 1.6 1996-01-02 08:57:35 quinn
28 * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass
30 * Revision 1.5 1995/09/29 17:12:09 quinn
33 * Revision 1.4 1995/09/27 15:02:49 quinn
34 * Modified function heads & prototypes.
36 * Revision 1.3 1995/08/17 12:45:16 quinn
37 * Fixed minor problems with GRS-1. Added support in c&s.
39 * Revision 1.2 1995/08/15 12:00:13 quinn
42 * Revision 1.1 1995/06/02 09:49:49 quinn
51 typedef struct Z_Encryption1
53 Odr_oct *cryptType; /* OPTIONAL */
54 Odr_oct *credential; /* OPTIONAL */
58 typedef struct Z_EnumeratedPrompt1
61 #define Z_Prompt1_groupId 0
62 #define Z_Prompt1_userId 1
63 #define Z_Prompt1_password 2
64 #define Z_Prompt1_newPassword 3
65 #define Z_Prompt1_copyright 4
66 char *suggestedString; /* OPTIONAL */
67 } Z_EnumeratedPrompt1;
69 typedef struct Z_PromptId1
72 #define Z_PromptId1_enumeratedPrompt 0
73 #define Z_PromptId1_nonEnumeratedPrompt 1
76 Z_EnumeratedPrompt1 *enumeratedPrompt;
77 char *nonEnumeratedPrompt;
81 typedef struct Z_PromptInfo1
84 #define Z_Challenge1_character 0
85 #define Z_Challenge1_encrypted 1
89 Z_Encryption1 *encrypted;
93 typedef struct Z_ChallengeUnit1
95 Z_PromptId1 *promptId;
96 char *defaultResponse; /* OPTIONAL */
97 Z_PromptInfo1 *promptInfo; /* OPTIONAL */
98 char *regExpr; /* OPTIONAL */
99 Odr_null *responseRequired; /* OPTIONAL */
101 char **allowedValues; /* OPTIONAL */
102 Odr_null *shouldSave; /* OPTIONAL */
103 int *dataType; /* OPTIONAL */
104 #define Z_ChalDataType_integer 1
105 #define Z_ChalDataType_date 2
106 #define Z_ChalDataType_float 3
107 #define Z_ChalDataType_alphaNumeric 4
108 #define Z_ChalDataType_urlUrn 5
109 #define Z_ChalDataType_boolean 6
110 Z_External *diagnostic; /* OPTIONAL */
113 typedef struct Z_Challenge1
116 Z_ChallengeUnit1 **list;
119 typedef struct Z_ResponseUnit1
121 Z_PromptId1 *promptId;
123 #define Z_Response1_string 0
124 #define Z_Response1_accept 1
125 #define Z_Response1_acknowledge 2
126 #define Z_Response1_diagnostic 3
127 #define Z_Response1_encrypted 4
132 Odr_null *acknowledge;
133 Z_DiagRec *diagnostic;
134 Z_Encryption1 *encrypted;
138 typedef struct Z_Response1
141 Z_ResponseUnit1 **list;
144 typedef struct Z_PromptObject1
147 #define Z_PromptObject1_challenge 0
148 #define Z_PromptObject1_response 1
151 Z_Challenge1 *challenge;
152 Z_Response1 *response;
156 int z_PromptObject1(ODR o, Z_PromptObject1 **p, int opt);