import * as asn1js from "asn1js"; import * as pvutils from "pvutils"; import { EMPTY_STRING } from "./constants"; import { AsnError } from "./errors"; import { OtherKeyAttribute, OtherKeyAttributeJson, OtherKeyAttributeSchema } from "./OtherKeyAttribute"; import { PkiObject, PkiObjectParameters } from "./PkiObject"; import * as Schema from "./Schema";
const KEY_IDENTIFIER = "keyIdentifier"; const DATE = "date"; const OTHER = "other"; const CLEAR_PROPS = [
KEY_IDENTIFIER,
DATE,
OTHER,
];
// Get internal properties from parsed schema this.keyIdentifier = asn1.result.keyIdentifier; if (DATE in asn1.result) this.date = asn1.result.date; if (OTHER in asn1.result) this.other = new OtherKeyAttribute({ schema: asn1.result.other });
}
public toSchema(): asn1js.Sequence { //#region Create array for output sequence const outputArray = [];
outputArray.push(this.keyIdentifier);
if (this.date) {
outputArray.push(this.date);
} if (this.other) {
outputArray.push(this.other.toSchema());
} //#endregion
//#region Construct and return new ASN.1 schema for this object
return (new asn1js.Sequence({
value: outputArray
})); //#endregion
}
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.