Control parsing incorrect if criticality field ommitted
This commit is contained in:
parent
4cf4291c5b
commit
7b5bef86d5
|
@ -63,8 +63,10 @@ Control.prototype.parse = function(ber) {
|
||||||
|
|
||||||
if (ber.length) {
|
if (ber.length) {
|
||||||
this.type = ber.readString();
|
this.type = ber.readString();
|
||||||
if (ber.offset < end)
|
if (ber.offset < end) {
|
||||||
this.criticality = ber.readBoolean();
|
if (ber.peek() === 0x01) // Boolean, optional
|
||||||
|
this.criticality = ber.readBoolean();
|
||||||
|
}
|
||||||
|
|
||||||
if (ber.offset < end)
|
if (ber.offset < end)
|
||||||
this.value = ber.readString();
|
this.value = ber.readString();
|
||||||
|
|
Loading…
Reference in New Issue