paypro: parse error workaround.

This commit is contained in:
Christopher Jeffrey 2014-08-26 15:20:25 -07:00
parent c366a11145
commit 7115dc97a4
1 changed files with 5 additions and 10 deletions

View File

@ -201,15 +201,12 @@ var rfc5280 = {};
var AuthorityKeyIdentifier =
rfc5280.AuthorityKeyIdentifier = asn1.define('AuthorityKeyIdentifier', function() {
// XXX Parse Error
this.any();
return;
// decodedTag: {"cls":"context","primitive":true,"tag":0,"tagStr":"end"}
// expectedTag: "octstr"
this.seq().obj(
// this.key('_unknown').end(),
// XXX Workaround parser error:
this.key('_unknown').any(),
this.key('keyIdentifier').optional().use(KeyIdentifier),
this.key('authorityCertIssuer').optional().use(GeneralNames),
this.key('authorityCertSerialNumber').optional().use(CertificateSerialNumber)
@ -250,6 +247,7 @@ rfc5280.GeneralNames = asn1.define('GeneralNames', function() {
var GeneralName =
rfc5280.GeneralName = asn1.define('GeneralName', function() {
this.choice({
// XXX Workaround parser error:
_unknown: this.int(),
otherName: this.use(AnotherName),
// otherName: this.use(rfc3280.Name),
@ -826,10 +824,6 @@ rfc5280.DistributionPoint = asn1.define('DistributionPoint', function() {
var DistributionPointName =
rfc5280.DistributionPointName = asn1.define('DistributionPointName', function() {
// XXX Parse Error
this.any();
return;
// decodedTag: {"cls":"context","primitive":false,"tag":0,"tagStr":"end"}
// expectedTag: "seqof"
// decodedTag: {"cls":"context","primitive":false,"tag":0,"tagStr":"end"}
@ -841,7 +835,8 @@ rfc5280.DistributionPointName = asn1.define('DistributionPointName', function()
// function derDecodeTag(buf, fail) {
this.choice({
// _unknown: this.end(),
// XXX Workaround parser error:
_unknown: this.any(),
fullName: this.use(GeneralNames),
nameRelativeToCRLIssuer: this.use(RelativeDistinguishedName)
});