asn1: Add asn1_has_nesting
authorVolker Lendecke <vl@samba.org>
Mon, 4 Jan 2016 09:23:20 +0000 (10:23 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 5 Jan 2016 23:54:18 +0000 (00:54 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/asn1.c
lib/util/asn1.h

index a869f6d56d10900cd9e6e9587199c298900955c2..4fb84d528a638964606b038983c4ea79e8018106 100644 (file)
@@ -52,6 +52,11 @@ void asn1_set_error(struct asn1_data *data)
        data->has_error = true;
 }
 
+bool asn1_has_nesting(const struct asn1_data *data)
+{
+       return data->nesting != NULL;
+}
+
 /* write to the ASN1 buffer, advancing the buffer pointer */
 bool asn1_write(struct asn1_data *data, const void *p, int len)
 {
index 5c2daadb01a21c56c910e21247432f468f06d587..38dff34e60f672f648393f2dda0958949a7ed68a 100644 (file)
@@ -52,6 +52,7 @@ struct asn1_data *asn1_init(TALLOC_CTX *mem_ctx);
 void asn1_free(struct asn1_data *data);
 bool asn1_has_error(const struct asn1_data *data);
 void asn1_set_error(struct asn1_data *data);
+bool asn1_has_nesting(const struct asn1_data *data);
 bool asn1_write(struct asn1_data *data, const void *p, int len);
 bool asn1_write_uint8(struct asn1_data *data, uint8_t v);
 bool asn1_push_tag(struct asn1_data *data, uint8_t tag);