diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/util/asn1.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c index c8e2d6f301..83044f8e30 100644 --- a/source4/libcli/util/asn1.c +++ b/source4/libcli/util/asn1.c @@ -423,6 +423,25 @@ BOOL asn1_start_tag(struct asn1_data *data, uint8_t tag) return !data->has_error; } +BOOL asn1_start_fake_tag(struct asn1_data *data) +{ + struct nesting *nesting; + + nesting = talloc(NULL, struct nesting); + if (!nesting) { + data->has_error = True; + return False; + } + + nesting->start = data->ofs; + nesting->taglen = data->length - data->ofs; + nesting->next = data->nesting; + data->nesting = nesting; + if (asn1_tag_remaining(data) == -1) { + return False; + } + return !data->has_error; +} /* stop reading a tag */ BOOL asn1_end_tag(struct asn1_data *data) |