Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static schema(parameters = {})
{
/**
* @type {Object}
* @property {string} [blockName]
* @property {string} [issuerName]
* @property {string} [baseCertificateID]
* @property {string} [objectDigestInfo]
*/
const names = getParametersValue(parameters, "names", {});
return (new asn1js.Sequence({
name: (names.blockName || ""),
value: [
GeneralNames.schema({
names: {
blockName: names.issuerName
}
}, true),
new asn1js.Constructed({
optional: true,
name: (names.baseCertificateID || ""),
idBlock: {
tagClass: 3,
tagNumber: 0 // [0]
},
static schema(parameters = {})
{
/**
* @type {Object}
* @property {string} [blockName]
* @property {string} [certs]
* @property {string} [crls]
*/
const names = getParametersValue(parameters, "names", {});
return (new asn1js.Sequence({
name: (names.blockName || ""),
value: [
new asn1js.Constructed({
name: (names.certs || ""),
optional: true,
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
},
value: CertificateSet.schema().valueBlock.value
}),
new asn1js.Constructed({
name: (names.crls || ""),
optional: true,
// ocsp [1] EXPLICIT SEQUENCE of OCSP Responses, OPTIONAL
// otherRevInfo [2] EXPLICIT SEQUENCE of OtherRevInfo, OPTIONAL
//}
//OtherRevInfo ::= SEQUENCE {
// Type OBJECT IDENTIFIER
// Value OCTET STRING
//}
/**
* @type {Object}
* @property {string} [blockName]
* @property {string} [crl]
* @property {string} [ocsp]
* @property {string} [otherRevInfo]
*/
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.Sequence({
value: [
new asn1js.Repeated({
name: (names.crl || ""),
value: CertificateRevocationList.schema()
constructor(parameters = {})
{
//region Internal properties of the object
/**
* @type {AlgorithmIdentifier}
* @desc keyDerivationFunc
*/
this.keyDerivationFunc = getParametersValue(parameters, "keyDerivationFunc", PBES2Params.defaultValues("keyDerivationFunc"));
/**
* @type {AlgorithmIdentifier}
* @desc encryptionScheme
*/
this.encryptionScheme = getParametersValue(parameters, "encryptionScheme", PBES2Params.defaultValues("encryptionScheme"));
//endregion
//region If input argument array contains "schema" for this object
if("schema" in parameters)
this.fromSchema(parameters.schema);
//endregion
}
//**********************************************************************************
constructor(parameters = {})
{
//region Internal properties of the object
if("certs" in parameters)
/**
* @type {CertificateSet}
* @desc certs
*/
this.certs = getParametersValue(parameters, "certs", OriginatorInfo.defaultValues("certs"));
if("crls" in parameters)
/**
* @type {RevocationInfoChoices}
* @desc crls
*/
this.crls = getParametersValue(parameters, "crls", OriginatorInfo.defaultValues("crls"));
//endregion
//region If input argument array contains "schema" for this object
if("schema" in parameters)
this.fromSchema(parameters.schema);
//endregion
}
//**********************************************************************************
constructor(parameters = {})
{
//region Internal properties of the object
/**
* @type {RelativeDistinguishedNames}
* @description crlissuer
*/
this.crlissuer = getParametersValue(parameters, "crlissuer", CrlIdentifier.defaultValues("crlissuer"));
/**
* @type {Date}
* @description crlIssuedTime
*/
this.crlIssuedTime = getParametersValue(parameters, "crlIssuedTime", CrlIdentifier.defaultValues("crlIssuedTime"));
if("crlNumber" in parameters)
/**
* @type {Integer}
* @description crlNumber
*/
this.crlNumber = getParametersValue(parameters, "crlNumber", CrlIdentifier.defaultValues("crlNumber"));
//endregion
//region If input argument array contains "schema" for this object
if("schema" in parameters)
constructor(parameters = {})
{
//region Internal properties of the object
/**
* @type {OctetString|OtherHashAlgAndValue}
* @description otherCertHash
*/
this.otherCertHash = getParametersValue(parameters, "otherCertHash", OtherCertID.defaultValues("otherCertHash"));
/**
* @type {IssuerSerial}
* @description issuerSerial
*/
this.issuerSerial = getParametersValue(parameters, "issuerSerial", OtherCertID.defaultValues("issuerSerial"));
//endregion
//region If input argument array contains "schema" for this object
if("schema" in parameters)
this.fromSchema(parameters.schema);
//endregion
}
//**********************************************************************************
*/
this.crl = getParametersValue(parameters, "crl", RevocationInfoArchival.defaultValues("crl"));
if("ocsp" in parameters)
/**
* @type {Array.}
* @description ocsp
*/
this.ocsp = getParametersValue(parameters, "ocsp", RevocationInfoArchival.defaultValues("ocsp"));
if("otherRevInfo" in parameters)
/**
* @type {Array.}
* @description otherRevInfo
*/
this.otherRevInfo = getParametersValue(parameters, "otherRevInfo", RevocationInfoArchival.defaultValues("otherRevInfo"));
//endregion
//region If input argument array contains "schema" for this object
if("schema" in parameters)
this.fromSchema(parameters.schema);
//endregion
}
//**********************************************************************************
static schema(parameters = {})
{
/**
* @type {Object}
* @property {string} [blockName]
* @property {string} [signatureAlgorithm]
* @property {string} [signatureValue]
*/
const names = getParametersValue(parameters, "names", {});
return (new asn1js.Sequence({
name: (names.blockName || "CertificateList"),
value: [
tbsCertList(parameters),
AlgorithmIdentifier.schema(names.signatureAlgorithm || {
names: {
blockName: "signatureAlgorithm"
}
}),
new asn1js.BitString({ name: (names.signatureValue || "signatureValue") })
]
}));
}
//**********************************************************************************
static schema(parameters = {})
{
/**
* @type {Object}
* @property {string} [blockName]
* @property {Object} [acinfo]
* @property {Object} [signatureAlgorithm]
* @property {string} [signatureValue]
*/
const names = getParametersValue(parameters, "names", {});
return (new asn1js.Sequence({
name: (names.blockName || ""),
value: [
AttributeCertificateInfoV2.schema(names.acinfo || {}),
AlgorithmIdentifier.schema(names.signatureAlgorithm || {}),
new asn1js.BitString({ name: (names.signatureValue || "") })
]
}));
}
//**********************************************************************************