diff --git a/lib/control.js b/lib/control.js index a7c2688..778b847 100644 --- a/lib/control.js +++ b/lib/control.js @@ -63,8 +63,10 @@ Control.prototype.parse = function(ber) { if (ber.length) { this.type = ber.readString(); - if (ber.offset < end) - this.criticality = ber.readBoolean(); + if (ber.offset < end) { + if (ber.peek() === 0x01) // Boolean, optional + this.criticality = ber.readBoolean(); + } if (ber.offset < end) this.value = ber.readString();