| 1 |
/* Generated from ./hdb.asn1 */ |
| 2 |
/* Do not edit */ |
| 3 |
|
| 4 |
#ifndef __hdb_asn1_h__ |
| 5 |
#define __hdb_asn1_h__ |
| 6 |
|
| 7 |
#include <stddef.h> |
| 8 |
#include <time.h> |
| 9 |
|
| 10 |
#ifndef __asn1_common_definitions__ |
| 11 |
#define __asn1_common_definitions__ |
| 12 |
|
| 13 |
#ifndef __HEIM_BASE_DATA__ |
| 14 |
#define __HEIM_BASE_DATA__ 1 |
| 15 |
struct heim_base_data { |
| 16 |
size_t length; |
| 17 |
void *data; |
| 18 |
}; |
| 19 |
typedef struct heim_base_data heim_octet_string; |
| 20 |
#endif |
| 21 |
|
| 22 |
typedef struct heim_integer { |
| 23 |
size_t length; |
| 24 |
void *data; |
| 25 |
int negative; |
| 26 |
} heim_integer; |
| 27 |
|
| 28 |
typedef char *heim_general_string; |
| 29 |
|
| 30 |
typedef char *heim_utf8_string; |
| 31 |
|
| 32 |
typedef struct heim_base_data heim_printable_string; |
| 33 |
|
| 34 |
typedef struct heim_base_data heim_ia5_string; |
| 35 |
|
| 36 |
typedef struct heim_bmp_string { |
| 37 |
size_t length; |
| 38 |
uint16_t *data; |
| 39 |
} heim_bmp_string; |
| 40 |
|
| 41 |
typedef struct heim_universal_string { |
| 42 |
size_t length; |
| 43 |
uint32_t *data; |
| 44 |
} heim_universal_string; |
| 45 |
|
| 46 |
typedef char *heim_visible_string; |
| 47 |
|
| 48 |
typedef struct heim_oid { |
| 49 |
size_t length; |
| 50 |
unsigned *components; |
| 51 |
} heim_oid; |
| 52 |
|
| 53 |
typedef struct heim_bit_string { |
| 54 |
size_t length; |
| 55 |
void *data; |
| 56 |
} heim_bit_string; |
| 57 |
|
| 58 |
typedef struct heim_base_data heim_any; |
| 59 |
typedef struct heim_base_data heim_any_set; |
| 60 |
|
| 61 |
#define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R) \ |
| 62 |
do { \ |
| 63 |
(BL) = length_##T((S)); \ |
| 64 |
(B) = malloc((BL)); \ |
| 65 |
if((B) == NULL) { \ |
| 66 |
(R) = ENOMEM; \ |
| 67 |
} else { \ |
| 68 |
(R) = encode_##T(((unsigned char*)(B)) + (BL) - 1, (BL), \ |
| 69 |
(S), (L)); \ |
| 70 |
if((R) != 0) { \ |
| 71 |
free((B)); \ |
| 72 |
(B) = NULL; \ |
| 73 |
} \ |
| 74 |
} \ |
| 75 |
} while (0) |
| 76 |
|
| 77 |
#ifdef _WIN32 |
| 78 |
#ifndef ASN1_LIB |
| 79 |
#define ASN1EXP __declspec(dllimport) |
| 80 |
#else |
| 81 |
#define ASN1EXP |
| 82 |
#endif |
| 83 |
#define ASN1CALL __stdcall |
| 84 |
#else |
| 85 |
#define ASN1EXP |
| 86 |
#define ASN1CALL |
| 87 |
#endif |
| 88 |
struct units; |
| 89 |
|
| 90 |
#endif |
| 91 |
|
| 92 |
#include <krb5_asn1.h> |
| 93 |
enum { HDB_DB_FORMAT = 2 }; |
| 94 |
|
| 95 |
enum { hdb_pw_salt = 3 }; |
| 96 |
|
| 97 |
enum { hdb_afs3_salt = 10 }; |
| 98 |
|
| 99 |
/* |
| 100 |
Salt ::= SEQUENCE { |
| 101 |
type [0] INTEGER (0..4294967295), |
| 102 |
salt [1] OCTET STRING, |
| 103 |
opaque [2] OCTET STRING OPTIONAL, |
| 104 |
} |
| 105 |
*/ |
| 106 |
|
| 107 |
typedef struct Salt { |
| 108 |
unsigned int type; |
| 109 |
heim_octet_string salt; |
| 110 |
heim_octet_string *opaque; |
| 111 |
} Salt; |
| 112 |
|
| 113 |
ASN1EXP int ASN1CALL decode_Salt(const unsigned char *, size_t, Salt *, size_t *); |
| 114 |
ASN1EXP int ASN1CALL encode_Salt(unsigned char *, size_t, const Salt *, size_t *); |
| 115 |
ASN1EXP size_t ASN1CALL length_Salt(const Salt *); |
| 116 |
ASN1EXP int ASN1CALL copy_Salt (const Salt *, Salt *); |
| 117 |
ASN1EXP void ASN1CALL free_Salt (Salt *); |
| 118 |
|
| 119 |
|
| 120 |
/* |
| 121 |
Key ::= SEQUENCE { |
| 122 |
mkvno [0] INTEGER (0..4294967295) OPTIONAL, |
| 123 |
key [1] EncryptionKey, |
| 124 |
salt [2] Salt OPTIONAL, |
| 125 |
} |
| 126 |
*/ |
| 127 |
|
| 128 |
typedef struct Key { |
| 129 |
unsigned int *mkvno; |
| 130 |
EncryptionKey key; |
| 131 |
Salt *salt; |
| 132 |
} Key; |
| 133 |
|
| 134 |
ASN1EXP int ASN1CALL decode_Key(const unsigned char *, size_t, Key *, size_t *); |
| 135 |
ASN1EXP int ASN1CALL encode_Key(unsigned char *, size_t, const Key *, size_t *); |
| 136 |
ASN1EXP size_t ASN1CALL length_Key(const Key *); |
| 137 |
ASN1EXP int ASN1CALL copy_Key (const Key *, Key *); |
| 138 |
ASN1EXP void ASN1CALL free_Key (Key *); |
| 139 |
|
| 140 |
|
| 141 |
/* |
| 142 |
Event ::= SEQUENCE { |
| 143 |
time [0] KerberosTime, |
| 144 |
principal [1] Principal OPTIONAL, |
| 145 |
} |
| 146 |
*/ |
| 147 |
|
| 148 |
typedef struct Event { |
| 149 |
KerberosTime time; |
| 150 |
Principal *principal; |
| 151 |
} Event; |
| 152 |
|
| 153 |
ASN1EXP int ASN1CALL decode_Event(const unsigned char *, size_t, Event *, size_t *); |
| 154 |
ASN1EXP int ASN1CALL encode_Event(unsigned char *, size_t, const Event *, size_t *); |
| 155 |
ASN1EXP size_t ASN1CALL length_Event(const Event *); |
| 156 |
ASN1EXP int ASN1CALL copy_Event (const Event *, Event *); |
| 157 |
ASN1EXP void ASN1CALL free_Event (Event *); |
| 158 |
|
| 159 |
|
| 160 |
/* |
| 161 |
HDBFlags ::= BIT STRING { |
| 162 |
initial(0), |
| 163 |
forwardable(1), |
| 164 |
proxiable(2), |
| 165 |
renewable(3), |
| 166 |
postdate(4), |
| 167 |
server(5), |
| 168 |
client(6), |
| 169 |
invalid(7), |
| 170 |
require-preauth(8), |
| 171 |
change-pw(9), |
| 172 |
require-hwauth(10), |
| 173 |
ok-as-delegate(11), |
| 174 |
user-to-user(12), |
| 175 |
immutable(13), |
| 176 |
trusted-for-delegation(14), |
| 177 |
allow-kerberos4(15), |
| 178 |
allow-digest(16), |
| 179 |
locked-out(17), |
| 180 |
require-pwchange(18), |
| 181 |
do-not-store(31) |
| 182 |
} |
| 183 |
*/ |
| 184 |
|
| 185 |
typedef struct HDBFlags { |
| 186 |
unsigned int initial:1; |
| 187 |
unsigned int forwardable:1; |
| 188 |
unsigned int proxiable:1; |
| 189 |
unsigned int renewable:1; |
| 190 |
unsigned int postdate:1; |
| 191 |
unsigned int server:1; |
| 192 |
unsigned int client:1; |
| 193 |
unsigned int invalid:1; |
| 194 |
unsigned int require_preauth:1; |
| 195 |
unsigned int change_pw:1; |
| 196 |
unsigned int require_hwauth:1; |
| 197 |
unsigned int ok_as_delegate:1; |
| 198 |
unsigned int user_to_user:1; |
| 199 |
unsigned int immutable:1; |
| 200 |
unsigned int trusted_for_delegation:1; |
| 201 |
unsigned int allow_kerberos4:1; |
| 202 |
unsigned int allow_digest:1; |
| 203 |
unsigned int locked_out:1; |
| 204 |
unsigned int require_pwchange:1; |
| 205 |
unsigned int _unused19:1; |
| 206 |
unsigned int _unused20:1; |
| 207 |
unsigned int _unused21:1; |
| 208 |
unsigned int _unused22:1; |
| 209 |
unsigned int _unused23:1; |
| 210 |
unsigned int _unused24:1; |
| 211 |
unsigned int _unused25:1; |
| 212 |
unsigned int _unused26:1; |
| 213 |
unsigned int _unused27:1; |
| 214 |
unsigned int _unused28:1; |
| 215 |
unsigned int _unused29:1; |
| 216 |
unsigned int _unused30:1; |
| 217 |
unsigned int do_not_store:1; |
| 218 |
} HDBFlags; |
| 219 |
|
| 220 |
|
| 221 |
unsigned HDBFlags2int(HDBFlags); |
| 222 |
HDBFlags int2HDBFlags(unsigned); |
| 223 |
const struct units * asn1_HDBFlags_units(void); |
| 224 |
ASN1EXP int ASN1CALL decode_HDBFlags(const unsigned char *, size_t, HDBFlags *, size_t *); |
| 225 |
ASN1EXP int ASN1CALL encode_HDBFlags(unsigned char *, size_t, const HDBFlags *, size_t *); |
| 226 |
ASN1EXP size_t ASN1CALL length_HDBFlags(const HDBFlags *); |
| 227 |
ASN1EXP int ASN1CALL copy_HDBFlags (const HDBFlags *, HDBFlags *); |
| 228 |
ASN1EXP void ASN1CALL free_HDBFlags (HDBFlags *); |
| 229 |
|
| 230 |
|
| 231 |
/* |
| 232 |
GENERATION ::= SEQUENCE { |
| 233 |
time [0] KerberosTime, |
| 234 |
usec [1] INTEGER (0..4294967295), |
| 235 |
gen [2] INTEGER (0..4294967295), |
| 236 |
} |
| 237 |
*/ |
| 238 |
|
| 239 |
typedef struct GENERATION { |
| 240 |
KerberosTime time; |
| 241 |
unsigned int usec; |
| 242 |
unsigned int gen; |
| 243 |
} GENERATION; |
| 244 |
|
| 245 |
ASN1EXP int ASN1CALL decode_GENERATION(const unsigned char *, size_t, GENERATION *, size_t *); |
| 246 |
ASN1EXP int ASN1CALL encode_GENERATION(unsigned char *, size_t, const GENERATION *, size_t *); |
| 247 |
ASN1EXP size_t ASN1CALL length_GENERATION(const GENERATION *); |
| 248 |
ASN1EXP int ASN1CALL copy_GENERATION (const GENERATION *, GENERATION *); |
| 249 |
ASN1EXP void ASN1CALL free_GENERATION (GENERATION *); |
| 250 |
|
| 251 |
|
| 252 |
/* |
| 253 |
HDB-Ext-PKINIT-acl ::= SEQUENCE OF SEQUENCE { |
| 254 |
subject [0] UTF8String, |
| 255 |
issuer [1] UTF8String OPTIONAL, |
| 256 |
anchor [2] UTF8String OPTIONAL, |
| 257 |
} |
| 258 |
*/ |
| 259 |
|
| 260 |
typedef struct HDB_Ext_PKINIT_acl { |
| 261 |
unsigned int len; |
| 262 |
struct HDB_Ext_PKINIT_acl_val { |
| 263 |
heim_utf8_string subject; |
| 264 |
heim_utf8_string *issuer; |
| 265 |
heim_utf8_string *anchor; |
| 266 |
} *val; |
| 267 |
} HDB_Ext_PKINIT_acl; |
| 268 |
|
| 269 |
ASN1EXP int ASN1CALL decode_HDB_Ext_PKINIT_acl(const unsigned char *, size_t, HDB_Ext_PKINIT_acl *, size_t *); |
| 270 |
ASN1EXP int ASN1CALL encode_HDB_Ext_PKINIT_acl(unsigned char *, size_t, const HDB_Ext_PKINIT_acl *, size_t *); |
| 271 |
ASN1EXP size_t ASN1CALL length_HDB_Ext_PKINIT_acl(const HDB_Ext_PKINIT_acl *); |
| 272 |
ASN1EXP int ASN1CALL copy_HDB_Ext_PKINIT_acl (const HDB_Ext_PKINIT_acl *, HDB_Ext_PKINIT_acl *); |
| 273 |
ASN1EXP void ASN1CALL free_HDB_Ext_PKINIT_acl (HDB_Ext_PKINIT_acl *); |
| 274 |
|
| 275 |
|
| 276 |
/* |
| 277 |
HDB-Ext-PKINIT-hash ::= SEQUENCE OF SEQUENCE { |
| 278 |
digest-type [0] OBJECT IDENTIFIER, |
| 279 |
digest [1] OCTET STRING, |
| 280 |
} |
| 281 |
*/ |
| 282 |
|
| 283 |
typedef struct HDB_Ext_PKINIT_hash { |
| 284 |
unsigned int len; |
| 285 |
struct HDB_Ext_PKINIT_hash_val { |
| 286 |
heim_oid digest_type; |
| 287 |
heim_octet_string digest; |
| 288 |
} *val; |
| 289 |
} HDB_Ext_PKINIT_hash; |
| 290 |
|
| 291 |
ASN1EXP int ASN1CALL decode_HDB_Ext_PKINIT_hash(const unsigned char *, size_t, HDB_Ext_PKINIT_hash *, size_t *); |
| 292 |
ASN1EXP int ASN1CALL encode_HDB_Ext_PKINIT_hash(unsigned char *, size_t, const HDB_Ext_PKINIT_hash *, size_t *); |
| 293 |
ASN1EXP size_t ASN1CALL length_HDB_Ext_PKINIT_hash(const HDB_Ext_PKINIT_hash *); |
| 294 |
ASN1EXP int ASN1CALL copy_HDB_Ext_PKINIT_hash (const HDB_Ext_PKINIT_hash *, HDB_Ext_PKINIT_hash *); |
| 295 |
ASN1EXP void ASN1CALL free_HDB_Ext_PKINIT_hash (HDB_Ext_PKINIT_hash *); |
| 296 |
|
| 297 |
|
| 298 |
/* |
| 299 |
HDB-Ext-PKINIT-cert ::= SEQUENCE OF SEQUENCE { |
| 300 |
cert [0] OCTET STRING, |
| 301 |
} |
| 302 |
*/ |
| 303 |
|
| 304 |
typedef struct HDB_Ext_PKINIT_cert { |
| 305 |
unsigned int len; |
| 306 |
struct HDB_Ext_PKINIT_cert_val { |
| 307 |
heim_octet_string cert; |
| 308 |
} *val; |
| 309 |
} HDB_Ext_PKINIT_cert; |
| 310 |
|
| 311 |
ASN1EXP int ASN1CALL decode_HDB_Ext_PKINIT_cert(const unsigned char *, size_t, HDB_Ext_PKINIT_cert *, size_t *); |
| 312 |
ASN1EXP int ASN1CALL encode_HDB_Ext_PKINIT_cert(unsigned char *, size_t, const HDB_Ext_PKINIT_cert *, size_t *); |
| 313 |
ASN1EXP size_t ASN1CALL length_HDB_Ext_PKINIT_cert(const HDB_Ext_PKINIT_cert *); |
| 314 |
ASN1EXP int ASN1CALL copy_HDB_Ext_PKINIT_cert (const HDB_Ext_PKINIT_cert *, HDB_Ext_PKINIT_cert *); |
| 315 |
ASN1EXP void ASN1CALL free_HDB_Ext_PKINIT_cert (HDB_Ext_PKINIT_cert *); |
| 316 |
|
| 317 |
|
| 318 |
/* |
| 319 |
HDB-Ext-Constrained-delegation-acl ::= SEQUENCE OF Principal |
| 320 |
*/ |
| 321 |
|
| 322 |
typedef struct HDB_Ext_Constrained_delegation_acl { |
| 323 |
unsigned int len; |
| 324 |
Principal *val; |
| 325 |
} HDB_Ext_Constrained_delegation_acl; |
| 326 |
|
| 327 |
ASN1EXP int ASN1CALL decode_HDB_Ext_Constrained_delegation_acl(const unsigned char *, size_t, HDB_Ext_Constrained_delegation_acl *, size_t *); |
| 328 |
ASN1EXP int ASN1CALL encode_HDB_Ext_Constrained_delegation_acl(unsigned char *, size_t, const HDB_Ext_Constrained_delegation_acl *, size_t *); |
| 329 |
ASN1EXP size_t ASN1CALL length_HDB_Ext_Constrained_delegation_acl(const HDB_Ext_Constrained_delegation_acl *); |
| 330 |
ASN1EXP int ASN1CALL copy_HDB_Ext_Constrained_delegation_acl (const HDB_Ext_Constrained_delegation_acl *, HDB_Ext_Constrained_delegation_acl *); |
| 331 |
ASN1EXP void ASN1CALL free_HDB_Ext_Constrained_delegation_acl (HDB_Ext_Constrained_delegation_acl *); |
| 332 |
|
| 333 |
|
| 334 |
/* |
| 335 |
HDB-Ext-Lan-Manager-OWF ::= OCTET STRING |
| 336 |
*/ |
| 337 |
|
| 338 |
typedef heim_octet_string HDB_Ext_Lan_Manager_OWF; |
| 339 |
|
| 340 |
ASN1EXP int ASN1CALL decode_HDB_Ext_Lan_Manager_OWF(const unsigned char *, size_t, HDB_Ext_Lan_Manager_OWF *, size_t *); |
| 341 |
ASN1EXP int ASN1CALL encode_HDB_Ext_Lan_Manager_OWF(unsigned char *, size_t, const HDB_Ext_Lan_Manager_OWF *, size_t *); |
| 342 |
ASN1EXP size_t ASN1CALL length_HDB_Ext_Lan_Manager_OWF(const HDB_Ext_Lan_Manager_OWF *); |
| 343 |
ASN1EXP int ASN1CALL copy_HDB_Ext_Lan_Manager_OWF (const HDB_Ext_Lan_Manager_OWF *, HDB_Ext_Lan_Manager_OWF *); |
| 344 |
ASN1EXP void ASN1CALL free_HDB_Ext_Lan_Manager_OWF (HDB_Ext_Lan_Manager_OWF *); |
| 345 |
|
| 346 |
|
| 347 |
/* |
| 348 |
HDB-Ext-Password ::= SEQUENCE { |
| 349 |
mkvno [0] INTEGER (0..4294967295) OPTIONAL, |
| 350 |
password OCTET STRING, |
| 351 |
} |
| 352 |
*/ |
| 353 |
|
| 354 |
typedef struct HDB_Ext_Password { |
| 355 |
unsigned int *mkvno; |
| 356 |
heim_octet_string password; |
| 357 |
} HDB_Ext_Password; |
| 358 |
|
| 359 |
ASN1EXP int ASN1CALL decode_HDB_Ext_Password(const unsigned char *, size_t, HDB_Ext_Password *, size_t *); |
| 360 |
ASN1EXP int ASN1CALL encode_HDB_Ext_Password(unsigned char *, size_t, const HDB_Ext_Password *, size_t *); |
| 361 |
ASN1EXP size_t ASN1CALL length_HDB_Ext_Password(const HDB_Ext_Password *); |
| 362 |
ASN1EXP int ASN1CALL copy_HDB_Ext_Password (const HDB_Ext_Password *, HDB_Ext_Password *); |
| 363 |
ASN1EXP void ASN1CALL free_HDB_Ext_Password (HDB_Ext_Password *); |
| 364 |
|
| 365 |
|
| 366 |
/* |
| 367 |
HDB-Ext-Aliases ::= SEQUENCE { |
| 368 |
case-insensitive [0] BOOLEAN, |
| 369 |
aliases [1] SEQUENCE OF Principal, |
| 370 |
} |
| 371 |
*/ |
| 372 |
|
| 373 |
typedef struct HDB_Ext_Aliases { |
| 374 |
int case_insensitive; |
| 375 |
struct HDB_Ext_Aliases_aliases { |
| 376 |
unsigned int len; |
| 377 |
Principal *val; |
| 378 |
} aliases; |
| 379 |
} HDB_Ext_Aliases; |
| 380 |
|
| 381 |
ASN1EXP int ASN1CALL decode_HDB_Ext_Aliases(const unsigned char *, size_t, HDB_Ext_Aliases *, size_t *); |
| 382 |
ASN1EXP int ASN1CALL encode_HDB_Ext_Aliases(unsigned char *, size_t, const HDB_Ext_Aliases *, size_t *); |
| 383 |
ASN1EXP size_t ASN1CALL length_HDB_Ext_Aliases(const HDB_Ext_Aliases *); |
| 384 |
ASN1EXP int ASN1CALL copy_HDB_Ext_Aliases (const HDB_Ext_Aliases *, HDB_Ext_Aliases *); |
| 385 |
ASN1EXP void ASN1CALL free_HDB_Ext_Aliases (HDB_Ext_Aliases *); |
| 386 |
|
| 387 |
|
| 388 |
/* |
| 389 |
Keys ::= SEQUENCE OF Key |
| 390 |
*/ |
| 391 |
|
| 392 |
typedef struct Keys { |
| 393 |
unsigned int len; |
| 394 |
Key *val; |
| 395 |
} Keys; |
| 396 |
|
| 397 |
ASN1EXP int ASN1CALL add_Keys (Keys *, const Key *); |
| 398 |
ASN1EXP int ASN1CALL remove_Keys (Keys *, unsigned int); |
| 399 |
ASN1EXP int ASN1CALL decode_Keys(const unsigned char *, size_t, Keys *, size_t *); |
| 400 |
ASN1EXP int ASN1CALL encode_Keys(unsigned char *, size_t, const Keys *, size_t *); |
| 401 |
ASN1EXP size_t ASN1CALL length_Keys(const Keys *); |
| 402 |
ASN1EXP int ASN1CALL copy_Keys (const Keys *, Keys *); |
| 403 |
ASN1EXP void ASN1CALL free_Keys (Keys *); |
| 404 |
|
| 405 |
|
| 406 |
/* |
| 407 |
hdb_keyset ::= SEQUENCE { |
| 408 |
kvno [0] INTEGER (0..4294967295), |
| 409 |
keys [1] Keys, |
| 410 |
set-time [2] KerberosTime OPTIONAL, |
| 411 |
..., |
| 412 |
} |
| 413 |
*/ |
| 414 |
|
| 415 |
typedef struct hdb_keyset { |
| 416 |
unsigned int kvno; |
| 417 |
Keys keys; |
| 418 |
KerberosTime *set_time; |
| 419 |
} hdb_keyset; |
| 420 |
|
| 421 |
ASN1EXP int ASN1CALL decode_hdb_keyset(const unsigned char *, size_t, hdb_keyset *, size_t *); |
| 422 |
ASN1EXP int ASN1CALL encode_hdb_keyset(unsigned char *, size_t, const hdb_keyset *, size_t *); |
| 423 |
ASN1EXP size_t ASN1CALL length_hdb_keyset(const hdb_keyset *); |
| 424 |
ASN1EXP int ASN1CALL copy_hdb_keyset (const hdb_keyset *, hdb_keyset *); |
| 425 |
ASN1EXP void ASN1CALL free_hdb_keyset (hdb_keyset *); |
| 426 |
|
| 427 |
|
| 428 |
/* |
| 429 |
HDB-Ext-KeySet ::= SEQUENCE OF hdb_keyset |
| 430 |
*/ |
| 431 |
|
| 432 |
typedef struct HDB_Ext_KeySet { |
| 433 |
unsigned int len; |
| 434 |
hdb_keyset *val; |
| 435 |
} HDB_Ext_KeySet; |
| 436 |
|
| 437 |
ASN1EXP int ASN1CALL add_HDB_Ext_KeySet (HDB_Ext_KeySet *, const hdb_keyset *); |
| 438 |
ASN1EXP int ASN1CALL remove_HDB_Ext_KeySet (HDB_Ext_KeySet *, unsigned int); |
| 439 |
ASN1EXP int ASN1CALL decode_HDB_Ext_KeySet(const unsigned char *, size_t, HDB_Ext_KeySet *, size_t *); |
| 440 |
ASN1EXP int ASN1CALL encode_HDB_Ext_KeySet(unsigned char *, size_t, const HDB_Ext_KeySet *, size_t *); |
| 441 |
ASN1EXP size_t ASN1CALL length_HDB_Ext_KeySet(const HDB_Ext_KeySet *); |
| 442 |
ASN1EXP int ASN1CALL copy_HDB_Ext_KeySet (const HDB_Ext_KeySet *, HDB_Ext_KeySet *); |
| 443 |
ASN1EXP void ASN1CALL free_HDB_Ext_KeySet (HDB_Ext_KeySet *); |
| 444 |
|
| 445 |
|
| 446 |
/* |
| 447 |
HDB-extension ::= SEQUENCE { |
| 448 |
mandatory [0] BOOLEAN, |
| 449 |
data [1] CHOICE { |
| 450 |
pkinit-acl [0] HDB-Ext-PKINIT-acl, |
| 451 |
pkinit-cert-hash [1] HDB-Ext-PKINIT-hash, |
| 452 |
allowed-to-delegate-to [2] HDB-Ext-Constrained-delegation-acl, |
| 453 |
lm-owf [4] HDB-Ext-Lan-Manager-OWF, |
| 454 |
password [5] HDB-Ext-Password, |
| 455 |
aliases [6] HDB-Ext-Aliases, |
| 456 |
last-pw-change [7] KerberosTime, |
| 457 |
pkinit-cert [8] HDB-Ext-PKINIT-cert, |
| 458 |
hist-keys [9] HDB-Ext-KeySet, |
| 459 |
hist-kvno-diff-clnt [10] INTEGER (0..4294967295), |
| 460 |
hist-kvno-diff-svc [11] INTEGER (0..4294967295), |
| 461 |
policy [12] UTF8String, |
| 462 |
principal-id [13] INTEGER (-9223372036854775808..9223372036854775807), |
| 463 |
..., |
| 464 |
}, |
| 465 |
..., |
| 466 |
} |
| 467 |
*/ |
| 468 |
|
| 469 |
typedef struct HDB_extension { |
| 470 |
int mandatory; |
| 471 |
struct HDB_extension_data { |
| 472 |
enum HDB_extension_data_enum { |
| 473 |
choice_HDB_extension_data_asn1_ellipsis = 0, |
| 474 |
choice_HDB_extension_data_pkinit_acl, |
| 475 |
choice_HDB_extension_data_pkinit_cert_hash, |
| 476 |
choice_HDB_extension_data_allowed_to_delegate_to, |
| 477 |
choice_HDB_extension_data_lm_owf, |
| 478 |
choice_HDB_extension_data_password, |
| 479 |
choice_HDB_extension_data_aliases, |
| 480 |
choice_HDB_extension_data_last_pw_change, |
| 481 |
choice_HDB_extension_data_pkinit_cert, |
| 482 |
choice_HDB_extension_data_hist_keys, |
| 483 |
choice_HDB_extension_data_hist_kvno_diff_clnt, |
| 484 |
choice_HDB_extension_data_hist_kvno_diff_svc, |
| 485 |
choice_HDB_extension_data_policy, |
| 486 |
choice_HDB_extension_data_principal_id |
| 487 |
/* ... */ |
| 488 |
} element; |
| 489 |
union { |
| 490 |
HDB_Ext_PKINIT_acl pkinit_acl; |
| 491 |
HDB_Ext_PKINIT_hash pkinit_cert_hash; |
| 492 |
HDB_Ext_Constrained_delegation_acl allowed_to_delegate_to; |
| 493 |
HDB_Ext_Lan_Manager_OWF lm_owf; |
| 494 |
HDB_Ext_Password password; |
| 495 |
HDB_Ext_Aliases aliases; |
| 496 |
KerberosTime last_pw_change; |
| 497 |
HDB_Ext_PKINIT_cert pkinit_cert; |
| 498 |
HDB_Ext_KeySet hist_keys; |
| 499 |
unsigned int hist_kvno_diff_clnt; |
| 500 |
unsigned int hist_kvno_diff_svc; |
| 501 |
heim_utf8_string policy; |
| 502 |
int64_t principal_id; |
| 503 |
heim_octet_string asn1_ellipsis; |
| 504 |
} u; |
| 505 |
} data; |
| 506 |
} HDB_extension; |
| 507 |
|
| 508 |
ASN1EXP int ASN1CALL decode_HDB_extension(const unsigned char *, size_t, HDB_extension *, size_t *); |
| 509 |
ASN1EXP int ASN1CALL encode_HDB_extension(unsigned char *, size_t, const HDB_extension *, size_t *); |
| 510 |
ASN1EXP size_t ASN1CALL length_HDB_extension(const HDB_extension *); |
| 511 |
ASN1EXP int ASN1CALL copy_HDB_extension (const HDB_extension *, HDB_extension *); |
| 512 |
ASN1EXP void ASN1CALL free_HDB_extension (HDB_extension *); |
| 513 |
|
| 514 |
|
| 515 |
/* |
| 516 |
HDB-extensions ::= SEQUENCE OF HDB-extension |
| 517 |
*/ |
| 518 |
|
| 519 |
typedef struct HDB_extensions { |
| 520 |
unsigned int len; |
| 521 |
HDB_extension *val; |
| 522 |
} HDB_extensions; |
| 523 |
|
| 524 |
ASN1EXP int ASN1CALL decode_HDB_extensions(const unsigned char *, size_t, HDB_extensions *, size_t *); |
| 525 |
ASN1EXP int ASN1CALL encode_HDB_extensions(unsigned char *, size_t, const HDB_extensions *, size_t *); |
| 526 |
ASN1EXP size_t ASN1CALL length_HDB_extensions(const HDB_extensions *); |
| 527 |
ASN1EXP int ASN1CALL copy_HDB_extensions (const HDB_extensions *, HDB_extensions *); |
| 528 |
ASN1EXP void ASN1CALL free_HDB_extensions (HDB_extensions *); |
| 529 |
|
| 530 |
|
| 531 |
/* |
| 532 |
hdb_entry ::= SEQUENCE { |
| 533 |
principal [0] Principal OPTIONAL, |
| 534 |
kvno [1] INTEGER (0..4294967295), |
| 535 |
keys [2] Keys, |
| 536 |
created-by [3] Event, |
| 537 |
modified-by [4] Event OPTIONAL, |
| 538 |
valid-start [5] KerberosTime OPTIONAL, |
| 539 |
valid-end [6] KerberosTime OPTIONAL, |
| 540 |
pw-end [7] KerberosTime OPTIONAL, |
| 541 |
max-life [8] INTEGER (0..4294967295) OPTIONAL, |
| 542 |
max-renew [9] INTEGER (0..4294967295) OPTIONAL, |
| 543 |
flags [10] HDBFlags, |
| 544 |
etypes [11] SEQUENCE OF INTEGER (0..4294967295) OPTIONAL, |
| 545 |
generation [12] GENERATION OPTIONAL, |
| 546 |
extensions [13] HDB-extensions OPTIONAL, |
| 547 |
} |
| 548 |
*/ |
| 549 |
|
| 550 |
typedef struct hdb_entry { |
| 551 |
Principal *principal; |
| 552 |
unsigned int kvno; |
| 553 |
Keys keys; |
| 554 |
Event created_by; |
| 555 |
Event *modified_by; |
| 556 |
KerberosTime *valid_start; |
| 557 |
KerberosTime *valid_end; |
| 558 |
KerberosTime *pw_end; |
| 559 |
unsigned int *max_life; |
| 560 |
unsigned int *max_renew; |
| 561 |
HDBFlags flags; |
| 562 |
struct hdb_entry_etypes { |
| 563 |
unsigned int len; |
| 564 |
unsigned int *val; |
| 565 |
} *etypes; |
| 566 |
GENERATION *generation; |
| 567 |
HDB_extensions *extensions; |
| 568 |
} hdb_entry; |
| 569 |
|
| 570 |
ASN1EXP int ASN1CALL decode_hdb_entry(const unsigned char *, size_t, hdb_entry *, size_t *); |
| 571 |
ASN1EXP int ASN1CALL encode_hdb_entry(unsigned char *, size_t, const hdb_entry *, size_t *); |
| 572 |
ASN1EXP size_t ASN1CALL length_hdb_entry(const hdb_entry *); |
| 573 |
ASN1EXP int ASN1CALL copy_hdb_entry (const hdb_entry *, hdb_entry *); |
| 574 |
ASN1EXP void ASN1CALL free_hdb_entry (hdb_entry *); |
| 575 |
|
| 576 |
|
| 577 |
/* |
| 578 |
hdb_entry_alias ::= [APPLICATION 0] SEQUENCE { |
| 579 |
principal [0] Principal OPTIONAL, |
| 580 |
} |
| 581 |
*/ |
| 582 |
|
| 583 |
typedef struct hdb_entry_alias { |
| 584 |
Principal *principal; |
| 585 |
} hdb_entry_alias; |
| 586 |
|
| 587 |
ASN1EXP int ASN1CALL decode_hdb_entry_alias(const unsigned char *, size_t, hdb_entry_alias *, size_t *); |
| 588 |
ASN1EXP int ASN1CALL encode_hdb_entry_alias(unsigned char *, size_t, const hdb_entry_alias *, size_t *); |
| 589 |
ASN1EXP size_t ASN1CALL length_hdb_entry_alias(const hdb_entry_alias *); |
| 590 |
ASN1EXP int ASN1CALL copy_hdb_entry_alias (const hdb_entry_alias *, hdb_entry_alias *); |
| 591 |
ASN1EXP void ASN1CALL free_hdb_entry_alias (hdb_entry_alias *); |
| 592 |
|
| 593 |
|
| 594 |
#endif /* __hdb_asn1_h__ */ |