import * as asn1js from "asn1js"; import * as pvutils from "pvutils"; import { CertificateRevocationList } from "./CertificateRevocationList"; import { EMPTY_STRING } from "./constants"; import { AsnError } from "./errors"; import { id_CRLBag_X509CRL } from "./ObjectIdentifiers"; import { PkiObject, PkiObjectParameters } from "./PkiObject"; import * as Schema from "./Schema";
// Get internal properties from parsed schema this.crlId = asn1.result.crlId.valueBlock.toString(); this.crlValue = asn1.result.crlValue;
switch (this.crlId) { case id_CRLBag_X509CRL: // x509CRL
{ this.parsedValue = CertificateRevocationList.fromBER(this.certValue.valueBlock.valueHex);
} break; default: thrownew Error(`Incorrect CRL_ID value in CRLBag: ${this.crlId}`);
}
}
public toSchema(): asn1js.Sequence { // Construct and return new ASN.1 schema for this object if (this.parsedValue) { this.crlId = id_CRLBag_X509CRL; this.crlValue = new asn1js.OctetString({ valueHex: this.parsedValue.toSchema().toBER(false) });
}
return (new asn1js.Sequence({
value: [ new asn1js.ObjectIdentifier({ value: this.crlId }), new asn1js.Constructed({
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0// [0]
},
value: [this.crlValue.toSchema()]
})
]
}));
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.