@peculiar/asn1-x509
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -34,3 +34,3 @@ "use strict"; | ||
exports.DirectoryString = DirectoryString; | ||
class AttributeValue extends DirectoryString { | ||
let AttributeValue = class AttributeValue extends DirectoryString { | ||
constructor(params = {}) { | ||
@@ -43,3 +43,3 @@ super(params); | ||
} | ||
} | ||
}; | ||
tslib_1.__decorate([ | ||
@@ -51,2 +51,5 @@ asn1_schema_1.AsnProp({ type: asn1_schema_1.AsnPropTypes.IA5String }) | ||
], AttributeValue.prototype, "anyValue", void 0); | ||
AttributeValue = tslib_1.__decorate([ | ||
asn1_schema_1.AsnType({ type: asn1_schema_1.AsnTypeTypes.Choice }) | ||
], AttributeValue); | ||
exports.AttributeValue = AttributeValue; | ||
@@ -53,0 +56,0 @@ class AttributeTypeAndValue { |
@@ -19,2 +19,9 @@ "use strict"; | ||
} | ||
getTime() { | ||
const time = this.utcTime || this.generalTime; | ||
if (!time) { | ||
throw new Error("Cannot get time from CHOICE object"); | ||
} | ||
return time; | ||
} | ||
}; | ||
@@ -21,0 +28,0 @@ tslib_1.__decorate([ |
@@ -32,3 +32,3 @@ import { __decorate } from "tslib"; | ||
export { DirectoryString }; | ||
export class AttributeValue extends DirectoryString { | ||
let AttributeValue = class AttributeValue extends DirectoryString { | ||
constructor(params = {}) { | ||
@@ -41,3 +41,3 @@ super(params); | ||
} | ||
} | ||
}; | ||
__decorate([ | ||
@@ -49,2 +49,6 @@ AsnProp({ type: AsnPropTypes.IA5String }) | ||
], AttributeValue.prototype, "anyValue", void 0); | ||
AttributeValue = __decorate([ | ||
AsnType({ type: AsnTypeTypes.Choice }) | ||
], AttributeValue); | ||
export { AttributeValue }; | ||
export class AttributeTypeAndValue { | ||
@@ -51,0 +55,0 @@ constructor(params = {}) { |
@@ -17,2 +17,9 @@ import { __decorate } from "tslib"; | ||
} | ||
getTime() { | ||
const time = this.utcTime || this.generalTime; | ||
if (!time) { | ||
throw new Error("Cannot get time from CHOICE object"); | ||
} | ||
return time; | ||
} | ||
}; | ||
@@ -19,0 +26,0 @@ __decorate([ |
@@ -12,2 +12,3 @@ /** | ||
constructor(time?: Date | string | number | Partial<Time>); | ||
getTime(): Date; | ||
} |
{ | ||
"name": "@peculiar/asn1-x509", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "ASN.1 schema of `Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile` (RFC5280)", | ||
@@ -35,3 +35,3 @@ "bugs": { | ||
"dependencies": { | ||
"@peculiar/asn1-schema": "^2.0.1", | ||
"@peculiar/asn1-schema": "^2.0.3", | ||
"asn1js": "^2.0.26", | ||
@@ -41,3 +41,3 @@ "pvtsutils": "^1.0.10", | ||
}, | ||
"gitHead": "7842b313b062bddd2fbbdd64b156762d751f9904" | ||
"gitHead": "af5e4f57c4db0c331f53d3bf22cebb1acf31ba30" | ||
} |
@@ -34,2 +34,10 @@ import { AsnProp, AsnPropTypes, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema"; | ||
public getTime() { | ||
const time = this.utcTime || this.generalTime; | ||
if (!time) { | ||
throw new Error("Cannot get time from CHOICE object") | ||
} | ||
return time; | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171491
4840
Updated@peculiar/asn1-schema@^2.0.3