revert between 56095 -> 55830 in arch
[AROS.git] / workbench / devs / diskimage / include / amigaos / openssl / krb5_asn.h
blob622840942b1f00c556bf916a5c902ce328df25ec
1 /* krb5_asn.h */
2 /* Written by Vern Staats <staatsvr@asc.hpc.mil> for the OpenSSL project,
3 ** using ocsp/{*.h,*asn*.c} as a starting point
4 */
6 /* ====================================================================
7 * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in
18 * the documentation and/or other materials provided with the
19 * distribution.
21 * 3. All advertising materials mentioning features or use of this
22 * software must display the following acknowledgment:
23 * "This product includes software developed by the OpenSSL Project
24 * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
27 * endorse or promote products derived from this software without
28 * prior written permission. For written permission, please contact
29 * openssl-core@openssl.org.
31 * 5. Products derived from this software may not be called "OpenSSL"
32 * nor may "OpenSSL" appear in their names without prior written
33 * permission of the OpenSSL Project.
35 * 6. Redistributions of any form whatsoever must retain the following
36 * acknowledgment:
37 * "This product includes software developed by the OpenSSL Project
38 * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
40 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
41 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
43 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
44 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
46 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
47 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
49 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
50 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
51 * OF THE POSSIBILITY OF SUCH DAMAGE.
52 * ====================================================================
54 * This product includes cryptographic software written by Eric Young
55 * (eay@cryptsoft.com). This product includes software written by Tim
56 * Hudson (tjh@cryptsoft.com).
60 #ifndef PROTO_AMISSL_H
61 #include <proto/amissl.h>
62 #endif /* PROTO_AMISSL_H */
64 #ifndef HEADER_KRB5_ASN_H
65 #define HEADER_KRB5_ASN_H
68 #include <krb5.h>
70 #include <openssl/safestack.h>
72 #ifdef __cplusplus
73 extern "C" {
74 #endif
77 /* ASN.1 from Kerberos RFC 1510
80 /* EncryptedData ::= SEQUENCE {
81 ** etype[0] INTEGER, -- EncryptionType
82 ** kvno[1] INTEGER OPTIONAL,
83 ** cipher[2] OCTET STRING -- ciphertext
84 ** }
86 typedef struct krb5_encdata_st
88 ASN1_INTEGER *etype;
89 ASN1_INTEGER *kvno;
90 ASN1_OCTET_STRING *cipher;
91 } KRB5_ENCDATA;
93 DECLARE_STACK_OF(KRB5_ENCDATA)
95 /* PrincipalName ::= SEQUENCE {
96 ** name-type[0] INTEGER,
97 ** name-string[1] SEQUENCE OF GeneralString
98 ** }
100 typedef struct krb5_princname_st
102 ASN1_INTEGER *nametype;
103 STACK_OF(ASN1_GENERALSTRING) *namestring;
104 } KRB5_PRINCNAME;
106 DECLARE_STACK_OF(KRB5_PRINCNAME)
109 /* Ticket ::= [APPLICATION 1] SEQUENCE {
110 ** tkt-vno[0] INTEGER,
111 ** realm[1] Realm,
112 ** sname[2] PrincipalName,
113 ** enc-part[3] EncryptedData
114 ** }
116 typedef struct krb5_tktbody_st
118 ASN1_INTEGER *tktvno;
119 ASN1_GENERALSTRING *realm;
120 KRB5_PRINCNAME *sname;
121 KRB5_ENCDATA *encdata;
122 } KRB5_TKTBODY;
124 typedef STACK_OF(KRB5_TKTBODY) KRB5_TICKET;
125 DECLARE_STACK_OF(KRB5_TKTBODY)
128 /* AP-REQ ::= [APPLICATION 14] SEQUENCE {
129 ** pvno[0] INTEGER,
130 ** msg-type[1] INTEGER,
131 ** ap-options[2] APOptions,
132 ** ticket[3] Ticket,
133 ** authenticator[4] EncryptedData
134 ** }
136 ** APOptions ::= BIT STRING {
137 ** reserved(0), use-session-key(1), mutual-required(2) }
139 typedef struct krb5_ap_req_st
141 ASN1_INTEGER *pvno;
142 ASN1_INTEGER *msgtype;
143 ASN1_BIT_STRING *apoptions;
144 KRB5_TICKET *ticket;
145 KRB5_ENCDATA *authenticator;
146 } KRB5_APREQBODY;
148 typedef STACK_OF(KRB5_APREQBODY) KRB5_APREQ;
149 DECLARE_STACK_OF(KRB5_APREQBODY)
152 /* Authenticator Stuff */
155 /* Checksum ::= SEQUENCE {
156 ** cksumtype[0] INTEGER,
157 ** checksum[1] OCTET STRING
158 ** }
160 typedef struct krb5_checksum_st
162 ASN1_INTEGER *ctype;
163 ASN1_OCTET_STRING *checksum;
164 } KRB5_CHECKSUM;
166 DECLARE_STACK_OF(KRB5_CHECKSUM)
169 /* EncryptionKey ::= SEQUENCE {
170 ** keytype[0] INTEGER,
171 ** keyvalue[1] OCTET STRING
172 ** }
174 typedef struct krb5_encryptionkey_st
176 ASN1_INTEGER *ktype;
177 ASN1_OCTET_STRING *keyvalue;
178 } KRB5_ENCKEY;
180 DECLARE_STACK_OF(KRB5_ENCKEY)
183 /* AuthorizationData ::= SEQUENCE OF SEQUENCE {
184 ** ad-type[0] INTEGER,
185 ** ad-data[1] OCTET STRING
186 ** }
188 typedef struct krb5_authorization_st
190 ASN1_INTEGER *adtype;
191 ASN1_OCTET_STRING *addata;
192 } KRB5_AUTHDATA;
194 DECLARE_STACK_OF(KRB5_AUTHDATA)
197 /* -- Unencrypted authenticator
198 ** Authenticator ::= [APPLICATION 2] SEQUENCE {
199 ** authenticator-vno[0] INTEGER,
200 ** crealm[1] Realm,
201 ** cname[2] PrincipalName,
202 ** cksum[3] Checksum OPTIONAL,
203 ** cusec[4] INTEGER,
204 ** ctime[5] KerberosTime,
205 ** subkey[6] EncryptionKey OPTIONAL,
206 ** seq-number[7] INTEGER OPTIONAL,
207 ** authorization-data[8] AuthorizationData OPTIONAL
208 ** }
210 typedef struct krb5_authenticator_st
212 ASN1_INTEGER *avno;
213 ASN1_GENERALSTRING *crealm;
214 KRB5_PRINCNAME *cname;
215 KRB5_CHECKSUM *cksum;
216 ASN1_INTEGER *cusec;
217 ASN1_GENERALIZEDTIME *ctime;
218 KRB5_ENCKEY *subkey;
219 ASN1_INTEGER *seqnum;
220 KRB5_AUTHDATA *authorization;
221 } KRB5_AUTHENTBODY;
223 typedef STACK_OF(KRB5_AUTHENTBODY) KRB5_AUTHENT;
224 DECLARE_STACK_OF(KRB5_AUTHENTBODY)
227 /* DECLARE_ASN1_FUNCTIONS(type) = DECLARE_ASN1_FUNCTIONS_name(type, type) =
228 ** type *name##_new(void);
229 ** void name##_free(type *a);
230 ** DECLARE_ASN1_ENCODE_FUNCTIONS(type, name, name) =
231 ** DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) =
232 ** type *d2i_##name(type **a, unsigned char **in, long len);
233 ** int i2d_##name(type *a, unsigned char **out);
234 ** DECLARE_ASN1_ITEM(itname) = OPENSSL_EXTERN const ASN1_ITEM itname##_it
237 DECLARE_ASN1_FUNCTIONS(KRB5_ENCDATA)
238 DECLARE_ASN1_FUNCTIONS(KRB5_PRINCNAME)
239 DECLARE_ASN1_FUNCTIONS(KRB5_TKTBODY)
240 DECLARE_ASN1_FUNCTIONS(KRB5_APREQBODY)
241 DECLARE_ASN1_FUNCTIONS(KRB5_TICKET)
242 DECLARE_ASN1_FUNCTIONS(KRB5_APREQ)
244 DECLARE_ASN1_FUNCTIONS(KRB5_CHECKSUM)
245 DECLARE_ASN1_FUNCTIONS(KRB5_ENCKEY)
246 DECLARE_ASN1_FUNCTIONS(KRB5_AUTHDATA)
247 DECLARE_ASN1_FUNCTIONS(KRB5_AUTHENTBODY)
248 DECLARE_ASN1_FUNCTIONS(KRB5_AUTHENT)
251 /* BEGIN ERROR CODES */
252 /* The following lines are auto generated by the script mkerr.pl. Any changes
253 * made after this point may be overwritten when the script is next run.
256 #ifdef __cplusplus
258 #endif
259 #endif