Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const names = getParametersValue(parameters, "names", {});
if(("optional" in names) === false)
names.optional = false;
return (new asn1js.Sequence({
name: (names.blockName || "ContentInfo"),
optional: names.optional,
value: [
new asn1js.ObjectIdentifier({ name: (names.contentType || "contentType") }),
new asn1js.Constructed({
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
},
value: [new asn1js.Any({ name: (names.content || "content") })] // EXPLICIT ANY value
})
]
}));
}
//**********************************************************************************
return (new asn1js.Set({
name: (names.blockName || ""),
value: [
new asn1js.Repeated({
name: (names.crls || ""),
value: new asn1js.Choice({
value: [
CertificateRevocationList.schema(),
new asn1js.Constructed({
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 1 // [1]
},
value: [
new asn1js.ObjectIdentifier(),
new asn1js.Any()
]
})
]
})
})
]
}));
}
//**********************************************************************************
return (new asn1js.Choice({
value: [
new asn1js.Constructed({
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
},
name: (names.blockName || ""),
value: [
new asn1js.ObjectIdentifier(),
new asn1js.Constructed({
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
},
value: [new asn1js.Any()]
})
]
}),
new asn1js.Primitive({
name: (names.blockName || ""),
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 1 // [1]
}
}),
new asn1js.Primitive({
name: (names.blockName || ""),
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 2 // [2]
}
case 2:
this.value.idBlock.tagClass = 3; // CONTEXT-SPECIFIC
this.value.idBlock.tagNumber = 0; // [0]
return this.value;
case 3:
{
const _schema = this.value.toSchema();
_schema.idBlock.tagClass = 3; // CONTEXT-SPECIFIC
_schema.idBlock.tagNumber = 1; // [1]
return _schema;
}
default:
return new asn1js.Any();
}
//endregion
}
//**********************************************************************************
static defaultValues(memberName)
{
switch(memberName)
{
case "crlHash":
return new asn1js.Any();
case "crlIdentifier":
return new CrlIdentifier();
default:
throw new Error(`Invalid member name for CrlValidatedID class: ${memberName}`);
}
}
//**********************************************************************************
static defaultValues(memberName)
{
switch(memberName)
{
case "otherCertFormat":
return "";
case "otherCert":
return new asn1js.Any();
default:
throw new Error(`Invalid member name for OtherCertificateFormat class: ${memberName}`);
}
}
//**********************************************************************************
static constants(name)
{
switch(name)
{
case "timestamp":
return (new Date());
case "issuerKeyHash":
return (new ArrayBuffer(0));
case "tbsCertificate":
return (new asn1js.Any());
case "extensions":
return [];
default:
throw new Error(`Invalid constant name for TimestampedCertificateEntryDataV2 class: ${name}`);
}
}
//**********************************************************************************
static defaultValues(memberName)
{
switch(memberName)
{
case "crlId":
return "";
case "crlValue":
return (new asn1js.Any());
case "parsedValue":
return {};
default:
throw new Error(`Invalid member name for CRLBag class: ${memberName}`);
}
}
//**********************************************************************************
static defaultValues(memberName)
{
switch(memberName)
{
case "ocspIdentifier":
return new OcspIdentifier();
case "ocspRepHash":
return new asn1js.Any();
default:
throw new Error(`Invalid member name for OcspResponsesID class: ${memberName}`);
}
}
//**********************************************************************************
static defaultValues(memberName)
{
switch(memberName)
{
case "contentType":
return "";
case "content":
return new asn1js.Any();
default:
throw new Error(`Invalid member name for ContentInfo class: ${memberName}`);
}
}
//**********************************************************************************