bcaf2c2121b473e5243c2fd6e20934370251985f
[jra/samba/.git] / lib / util / asn1_proto.h
1 #ifndef ___LIB_UTIL_ASN1_PROTO_H__
2 #define ___LIB_UTIL_ASN1_PROTO_H__
3
4 #undef _PRINTF_ATTRIBUTE
5 #define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
6 /* This file was automatically generated by mkproto.pl. DO NOT EDIT */
7
8 /* this file contains prototypes for functions that are private 
9  * to this subsystem or library. These functions should not be 
10  * used outside this particular subsystem! */
11
12
13 /* The following definitions come from lib/util/asn1.c  */
14
15 struct asn1_data *asn1_init(TALLOC_CTX *mem_ctx);
16 void asn1_free(struct asn1_data *data);
17 bool asn1_write(struct asn1_data *data, const void *p, int len);
18 bool asn1_write_uint8(struct asn1_data *data, uint8_t v);
19 bool asn1_push_tag(struct asn1_data *data, uint8_t tag);
20 bool asn1_pop_tag(struct asn1_data *data);
21 bool asn1_write_implicit_Integer(struct asn1_data *data, int i);
22 bool asn1_write_Integer(struct asn1_data *data, int i);
23 bool ber_write_OID_String(DATA_BLOB *blob, const char *OID);
24 bool asn1_write_OID(struct asn1_data *data, const char *OID);
25 bool asn1_write_OctetString(struct asn1_data *data, const void *p, size_t length);
26 bool asn1_write_LDAPString(struct asn1_data *data, const char *s);
27 bool asn1_write_DATA_BLOB_LDAPString(struct asn1_data *data, const DATA_BLOB *s);
28 bool asn1_write_GeneralString(struct asn1_data *data, const char *s);
29 bool asn1_write_ContextSimple(struct asn1_data *data, uint8_t num, DATA_BLOB *blob);
30 bool asn1_write_BOOLEAN(struct asn1_data *data, bool v);
31 bool asn1_read_BOOLEAN(struct asn1_data *data, bool *v);
32 bool asn1_check_BOOLEAN(struct asn1_data *data, bool v);
33 bool asn1_load(struct asn1_data *data, DATA_BLOB blob);
34 bool asn1_peek(struct asn1_data *data, void *p, int len);
35 bool asn1_read(struct asn1_data *data, void *p, int len);
36 bool asn1_read_uint8(struct asn1_data *data, uint8_t *v);
37 bool asn1_peek_uint8(struct asn1_data *data, uint8_t *v);
38 bool asn1_peek_tag(struct asn1_data *data, uint8_t tag);
39 bool asn1_start_tag(struct asn1_data *data, uint8_t tag);
40 bool asn1_end_tag(struct asn1_data *data);
41 int asn1_tag_remaining(struct asn1_data *data);
42 bool ber_read_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB blob, const char **OID);
43 bool asn1_read_OID(struct asn1_data *data, TALLOC_CTX *mem_ctx, const char **OID);
44 bool asn1_check_OID(struct asn1_data *data, const char *OID);
45 bool asn1_read_LDAPString(struct asn1_data *data, TALLOC_CTX *mem_ctx, char **s);
46 bool asn1_read_GeneralString(struct asn1_data *data, TALLOC_CTX *mem_ctx, char **s);
47 bool asn1_read_OctetString(struct asn1_data *data, TALLOC_CTX *mem_ctx, DATA_BLOB *blob);
48 bool asn1_read_ContextSimple(struct asn1_data *data, uint8_t num, DATA_BLOB *blob);
49 bool asn1_read_implicit_Integer(struct asn1_data *data, int *i);
50 bool asn1_read_Integer(struct asn1_data *data, int *i);
51 bool asn1_read_enumerated(struct asn1_data *data, int *v);
52 bool asn1_check_enumerated(struct asn1_data *data, int v);
53 bool asn1_write_enumerated(struct asn1_data *data, uint8_t v);
54 NTSTATUS asn1_full_tag(DATA_BLOB blob, uint8_t tag, size_t *packet_size);
55 #undef _PRINTF_ATTRIBUTE
56 #define _PRINTF_ATTRIBUTE(a1, a2)
57
58 #endif /* ___LIB_UTIL_ASN1_PROTO_H__ */
59