summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-19 19:28:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:28 -0500
commit3853f820e630641d302435933241875a64b5980c (patch)
tree727e4045703738c5ec819e3458079fe0d17cf1fe /source4
parentb55a68b368d2e14545f374938071a7f09af3c263 (diff)
downloadsamba-3853f820e630641d302435933241875a64b5980c.tar.gz
samba-3853f820e630641d302435933241875a64b5980c.tar.bz2
samba-3853f820e630641d302435933241875a64b5980c.zip
r20259: add function to start a fake tag so that asn1_read_OID_String()
can work alone metze (This used to be commit ea70f6ff07930951d98a952b03963d0ba358fec4)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/util/asn1.c19
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)