summaryrefslogtreecommitdiff
path: root/nss/lib/util/secasn1.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-08 10:53:01 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-08 10:53:01 +0000
commitf95d45c36e7c7131747259956821d844e8952e5d (patch)
treeeee14f8b212c48f8597c2a4927a167fcc3a15ea5 /nss/lib/util/secasn1.h
parentdc1565216a5d20ae0d75872151523252309a1292 (diff)
downloadnss-b19a93c699b707b69e1fddf599286578ff5363d5.tar.gz
Diffstat (limited to 'nss/lib/util/secasn1.h')
-rw-r--r--nss/lib/util/secasn1.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/nss/lib/util/secasn1.h b/nss/lib/util/secasn1.h
index b6292cd..78cab0a 100644
--- a/nss/lib/util/secasn1.h
+++ b/nss/lib/util/secasn1.h
@@ -54,6 +54,18 @@ extern void SEC_ASN1DecoderSetNotifyProc(SEC_ASN1DecoderContext *cx,
extern void SEC_ASN1DecoderClearNotifyProc(SEC_ASN1DecoderContext *cx);
+/* Sets the maximum size that should be allocated for a single ASN.1
+ * element. Set to 0 to indicate there is no limit.
+ *
+ * Note: This does not set the maximum size overall that may be allocated
+ * while parsing, nor does it guarantee that the decoder won't allocate
+ * more than |max_size| while parsing an individual element; rather, it
+ * merely guarantees that any individual allocation for returned data
+ * should not exceed |max_size|.
+*/
+extern void SEC_ASN1DecoderSetMaximumElementSize(SEC_ASN1DecoderContext *cx,
+ unsigned long max_size);
+
extern SECStatus SEC_ASN1Decode(PLArenaPool *pool, void *dest,
const SEC_ASN1Template *t,
const char *buf, long len);