Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* @property {string} [organizational_unit_names]
*/
const names = getParametersValue(parameters, "names", {});
return (new asn1js.Sequence({
optional,
value: [
new asn1js.Constructed({
optional: true,
idBlock: {
tagClass: 2, // APPLICATION-SPECIFIC
tagNumber: 1 // [1]
},
name: (names.country_name || ""),
value: [
new asn1js.Choice({
value: [
new asn1js.NumericString(),
new asn1js.PrintableString()
]
})
]
}),
new asn1js.Constructed({
optional: true,
idBlock: {
tagClass: 2, // APPLICATION-SPECIFIC
tagNumber: 2 // [2]
},
name: (names.administration_domain_name || ""),
value: [
new asn1js.Choice({
static schema(parameters = {})
{
/**
* @type {Object}
* @property {string} [blockName]
* @property {string} [issuer]
* @property {string} [serialNumber]
*/
const names = getParametersValue(parameters, "names", {});
return (new asn1js.Sequence({
name: (names.blockName || ""),
value: [
new asn1js.Integer({ name: (names.version || "") }),
Holder.schema(names.holder || {}),
new asn1js.Choice({
value: [
GeneralNames.schema({
names: {
blockName: (names.issuer || "")
}
}),
new asn1js.Constructed({
name: (names.issuer || ""),
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
},
value: V2Form.schema().valueBlock.value
})
]
}),
static schema(parameters = {})
{
/**
* @type {Object}
* @property {string} [blockName]
* @property {string} [crls]
*/
const names = getParametersValue(parameters, "names", {});
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()
]
})
]
})
})
]
static schema(parameters = {})
{
/**
* @type {Object}
* @property {string} [blockName]
*/
const names = getParametersValue(parameters, "names", {});
return (new asn1js.Choice({
value: [
IssuerAndSerialNumber.schema({
names: {
blockName: (names.blockName || "")
}
}),
new asn1js.Primitive({
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
},
name: (names.blockName || "")
}),
new asn1js.Constructed({
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
* @property {string} [cRLIssuer]
* @property {string} [cRLIssuerNames]
*/
const names = getParametersValue(parameters, "names", {});
return (new asn1js.Sequence({
name: (names.blockName || ""),
value: [
new asn1js.Constructed({
optional: true,
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
},
value: [
new asn1js.Choice({
value: [
new asn1js.Constructed({
name: (names.distributionPoint || ""),
optional: true,
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
},
value: [
new asn1js.Repeated({
name: (names.distributionPointNames || ""),
value: GeneralName.schema()
})
]
}),
new asn1js.Constructed({
}),
new asn1js.Constructed({
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 5 // [5]
},
name: (names.blockName || ""),
value: [
new asn1js.Constructed({
optional: true,
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
},
value: [
new asn1js.Choice({
value: [
new asn1js.TeletexString(),
new asn1js.PrintableString(),
new asn1js.UniversalString(),
new asn1js.Utf8String(),
new asn1js.BmpString()
]
})
]
}),
new asn1js.Constructed({
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 1 // [1]
},
value: [
static schema(parameters = {})
{
/**
* @type {Object}
* @property {string} [blockName]
* @property {string} [type]
* @property {string} [setName]
* @property {string} [values]
*/
const names = getParametersValue(parameters, "names", {});
return (new asn1js.Choice({
value: [
KeyTransRecipientInfo.schema({
names: {
blockName: (names.blockName || "")
}
}),
new asn1js.Constructed({
name: (names.blockName || ""),
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 1 // [1]
},
value: KeyAgreeRecipientInfo.schema().valueBlock.value
}),
new asn1js.Constructed({
name: (names.blockName || ""),
{
/**
* @type {Object}
* @property {string} [blockName]
* @property {string} [saltPrimitive]
* @property {string} [saltConstructed]
* @property {string} [iterationCount]
* @property {string} [keyLength]
* @property {string} [prf]
*/
const names = getParametersValue(parameters, "names", {});
return (new asn1js.Sequence({
name: (names.blockName || ""),
value: [
new asn1js.Choice({
value: [
new asn1js.OctetString({ name: (names.saltPrimitive || "") }),
AlgorithmIdentifier.schema(names.saltConstructed || {})
]
}),
new asn1js.Integer({ name: (names.iterationCount || "") }),
new asn1js.Integer({
name: (names.keyLength || ""),
optional: true
}),
AlgorithmIdentifier.schema(names.prf || {
names: {
optional: true
}
})
]
* @property {string} [ocspIdentifier]
* @property {string} [ocspRepHashSimple]
* @property {string} [ocspRepHashComplex]
*/
const names = getParametersValue(parameters, "names", {});
return (new asn1js.Sequence({
name: (names.blockName || ""),
optional: (names.optional || false),
value: [
OcspIdentifier.schema(names.ocspIdentifier || {
names: {
blockName: ""
}
}),
new asn1js.Choice({
optional: true,
value: [
new asn1js.OctetString({ name: (names.ocspRepHashSimple || "") }),
OtherHashAlgAndValue.schema(names.ocspRepHashComplex || {
names: {
blockName: ""
}
})
]
})
]
}));
}
//**********************************************************************************
* @type {Object}
* @property {string} [blockName]
* @property {string} [encryptionAlgorithm]
* @property {string} [encryptedData]
*/
const names = getParametersValue(parameters, "names", {});
return (new asn1js.Sequence({
name: (names.blockName || ""),
value: [
AlgorithmIdentifier.schema(names.encryptionAlgorithm || {
names: {
blockName: "encryptionAlgorithm"
}
}),
new asn1js.Choice({
value: [
new asn1js.OctetString({ name: (names.encryptedData || "encryptedData") }),
new asn1js.OctetString({
idBlock: {
isConstructed: true
},
name: (names.encryptedData || "encryptedData")
})
]
})
]
}));
}
//**********************************************************************************