diff options
Diffstat (limited to 'lib/util/asn1.h')
-rw-r--r-- | lib/util/asn1.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/util/asn1.h b/lib/util/asn1.h index 8ecb85cb81..9abae50d64 100644 --- a/lib/util/asn1.h +++ b/lib/util/asn1.h @@ -46,7 +46,7 @@ typedef struct asn1_data ASN1_DATA; #define ASN1_OID 0x6 #define ASN1_BOOLEAN 0x1 #define ASN1_INTEGER 0x2 -#define ASN1_BITFIELD 0x3 +#define ASN1_BIT_STRING 0x3 #define ASN1_ENUMERATED 0xa #define ASN1_SET 0x31 @@ -60,6 +60,7 @@ bool asn1_push_tag(struct asn1_data *data, uint8_t tag); bool asn1_pop_tag(struct asn1_data *data); bool asn1_write_implicit_Integer(struct asn1_data *data, int i); bool asn1_write_Integer(struct asn1_data *data, int i); +bool asn1_write_BitString(struct asn1_data *data, const void *p, size_t length, uint8_t padding); bool ber_write_OID_String(DATA_BLOB *blob, const char *OID); bool asn1_write_OID(struct asn1_data *data, const char *OID); bool asn1_write_OctetString(struct asn1_data *data, const void *p, size_t length); @@ -70,6 +71,8 @@ bool asn1_write_ContextSimple(struct asn1_data *data, uint8_t num, DATA_BLOB *bl bool asn1_write_BOOLEAN(struct asn1_data *data, bool v); bool asn1_read_BOOLEAN(struct asn1_data *data, bool *v); bool asn1_check_BOOLEAN(struct asn1_data *data, bool v); +bool asn1_write_BOOLEAN_context(struct asn1_data *data, bool v, int context); +bool asn1_read_BOOLEAN_context(struct asn1_data *data, bool *v, int context); bool asn1_load(struct asn1_data *data, DATA_BLOB blob); bool asn1_peek(struct asn1_data *data, void *p, int len); bool asn1_read(struct asn1_data *data, void *p, int len); @@ -88,9 +91,12 @@ bool asn1_read_OctetString(struct asn1_data *data, TALLOC_CTX *mem_ctx, DATA_BLO bool asn1_read_ContextSimple(struct asn1_data *data, uint8_t num, DATA_BLOB *blob); bool asn1_read_implicit_Integer(struct asn1_data *data, int *i); bool asn1_read_Integer(struct asn1_data *data, int *i); +bool asn1_read_BitString(struct asn1_data *data, TALLOC_CTX *mem_ctx, DATA_BLOB *blob, uint8_t *padding); bool asn1_read_enumerated(struct asn1_data *data, int *v); bool asn1_check_enumerated(struct asn1_data *data, int v); bool asn1_write_enumerated(struct asn1_data *data, uint8_t v); +bool asn1_blob(const struct asn1_data *asn1, DATA_BLOB *blob); +void asn1_load_nocopy(struct asn1_data *data, uint8_t *buf, size_t len); NTSTATUS asn1_full_tag(DATA_BLOB blob, uint8_t tag, size_t *packet_size); #endif /* _ASN_1_H */ |