summaryrefslogtreecommitdiff
path: root/sid.ml
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2018-11-06 21:34:30 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2018-11-06 21:37:02 +0100
commitec08b71fb47b82402f0fbb8859a2445519f79615 (patch)
treee0c5cefc8f2f62feb345ea9330633f91676b9a6b /sid.ml
parentdd55d557c61965d985e2f6f771bc7308e613aea8 (diff)
downloadocaml-sid-ec08b71fb47b82402f0fbb8859a2445519f79615.tar.gz
sid: sid_test: validate identifier authority on create()
Reject ia’s greater than six bytes can encompass.
Diffstat (limited to 'sid.ml')
-rw-r--r--sid.ml1
1 files changed, 1 insertions, 0 deletions
diff --git a/sid.ml b/sid.ml
index 0d5c89b..2cced76 100644
--- a/sid.ml
+++ b/sid.ml
@@ -22,6 +22,7 @@ let create_unsafe sa ia =
the number of subauths. *)
let create ?(sa=[||]) ia =
if Array.length sa > max_subauth_count then None else
+ if U64.compare ia max_ident_auth > 0 then None else
Some (create_unsafe sa ia)
let get_ident_auth s = s.sid_ident_auth