Changeset 988 for vendor/current/lib/util/asn1.h
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/lib/util/asn1.h
r740 r988 21 21 #define _ASN_1_H 22 22 23 struct nesting { 24 off_t start; 25 size_t taglen; /* for parsing */ 26 struct nesting *next; 27 }; 23 #include "replace.h" 24 #include <talloc.h> 25 #include "lib/util/data_blob.h" 28 26 29 struct asn1_data {30 uint8_t *data;31 size_t length;32 off_t ofs;33 struct nesting *nesting;34 bool has_error;35 };36 27 28 struct nesting; 29 struct asn1_data; 37 30 typedef struct asn1_data ASN1_DATA; 38 31 … … 55 48 struct asn1_data *asn1_init(TALLOC_CTX *mem_ctx); 56 49 void asn1_free(struct asn1_data *data); 50 bool asn1_has_error(const struct asn1_data *data); 51 void asn1_set_error(struct asn1_data *data); 52 bool asn1_has_nesting(const struct asn1_data *data); 53 off_t asn1_current_ofs(const struct asn1_data *data); 57 54 bool asn1_write(struct asn1_data *data, const void *p, int len); 58 55 bool asn1_write_uint8(struct asn1_data *data, uint8_t v); … … 80 77 bool asn1_read_uint8(struct asn1_data *data, uint8_t *v); 81 78 bool asn1_peek_uint8(struct asn1_data *data, uint8_t *v); 82 bool asn1_peek_tag_needed_size(struct asn1_data *data, uint8_t tag, size_t *size);83 79 bool asn1_peek_tag(struct asn1_data *data, uint8_t tag); 84 80 bool asn1_start_tag(struct asn1_data *data, uint8_t tag); … … 100 96 bool asn1_write_enumerated(struct asn1_data *data, uint8_t v); 101 97 bool asn1_blob(const struct asn1_data *asn1, DATA_BLOB *blob); 98 bool asn1_extract_blob(struct asn1_data *asn1, TALLOC_CTX *mem_ctx, 99 DATA_BLOB *pblob); 102 100 void asn1_load_nocopy(struct asn1_data *data, uint8_t *buf, size_t len); 103 NTSTATUS asn1_full_tag(DATA_BLOB blob, uint8_t tag, size_t *packet_size); 104 NTSTATUS asn1_peek_full_tag(DATA_BLOB blob, uint8_t tag, size_t *packet_size); 101 int asn1_peek_full_tag(DATA_BLOB blob, uint8_t tag, size_t *packet_size); 105 102 106 103 #endif /* _ASN_1_H */
Note:
See TracChangeset
for help on using the changeset viewer.