add another registry rpc (opnum 0x14). Have no idea what it's real name
[Samba.git] / source / include / asn_1.h
blob090c5459d1879290b0916128553d432e5586395b
1 /*
2 Unix SMB/CIFS implementation.
3 simple ASN1 code
4 Copyright (C) Andrew Tridgell 2001
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef _ASN_1_H
22 #define _ASN_1_H
24 struct nesting {
25 off_t start;
26 size_t taglen; /* for parsing */
27 struct nesting *next;
30 typedef struct {
31 uint8 *data;
32 size_t length;
33 off_t ofs;
34 struct nesting *nesting;
35 BOOL has_error;
36 } ASN1_DATA;
39 #define ASN1_APPLICATION(x) ((x)+0x60)
40 #define ASN1_SEQUENCE(x) ((x)+0x30)
41 #define ASN1_CONTEXT(x) ((x)+0xa0)
42 #define ASN1_GENERAL_STRING 0x1b
43 #define ASN1_OCTET_STRING 0x4
44 #define ASN1_OID 0x6
45 #define ASN1_BOOLEAN 0x1
46 #define ASN1_INTEGER 0x2
47 #define ASN1_ENUMERATED 0xa
49 #define ASN1_MAX_OIDS 20
51 /* some well known object IDs */
52 #define OID_SPNEGO "1 3 6 1 5 5 2"
53 #define OID_NTLMSSP "1 3 6 1 4 1 311 2 2 10"
54 #define OID_KERBEROS5_OLD "1 2 840 48018 1 2 2"
55 #define OID_KERBEROS5 "1 2 840 113554 1 2 2"
57 #endif /* _ASN_1_H */