How to use the pkijs.GeneralNames function in pkijs

To help you get started, we’ve selected a few pkijs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PeculiarVentures / CAdES.js / src / IssuerSerial.js View on Github external
names: {
							blockName: "issuer"
						}
					},
					serialNumber: "serialNumber"
				}
			})
		);

		if(asn1.verified === false)
			throw new Error("Object's schema was not verified against input data for IssuerSerial");
		//endregion

		//region Get internal properties from parsed schema
		// noinspection JSUnusedGlobalSymbols
		this.issuer = new GeneralNames({ schema: asn1.result.issuer });
		// noinspection JSUnusedGlobalSymbols
		this.serialNumber = asn1.result.serialNumber;
		//endregion
	}
	//**********************************************************************************
github PeculiarVentures / CAdES.js / src / ESSCertIDv2.js View on Github external
result => {
				_this.certHash = new asn1js.OctetString({ valueHex: result });
				_this.issuerSerial = new IssuerSerial({
					issuer: new GeneralNames({
						names: [
							new GeneralName({
								type: 4,
								value: certificate.issuer
							})
						]
					}),
					serialNumber: certificate.serialNumber
				});
			},
			error => Promise.reject(error)
github PeculiarVentures / CAdES.js / src / OtherCertID.js View on Github external
result => {
				if(_this.otherCertHash instanceof asn1js.OctetString)
					_this.otherCertHash.valueBlock.valueHex = result;
				else
					_this.otherCertHash.hashValue = new asn1js.OctetString({ valueHex: result });
				
				_this.issuerSerial = new IssuerSerial({
					issuer: new GeneralNames({
						names: [
							new GeneralName({
								type: 4,
								value: certificate.issuer
							})
						]
					}),
					serialNumber: certificate.serialNumber
				});
			},
			error => Promise.reject(error)
github PeculiarVentures / CAdES.js / src / IssuerSerial.js View on Github external
static defaultValues(memberName)
	{
		switch(memberName)
		{
			case "issuer":
				return new GeneralNames();
			case "serialNumber":
				return new asn1js.Integer();
			default:
				throw new Error(`Invalid member name for IssuerSerial class: ${memberName}`);
		}
	}
	//**********************************************************************************

pkijs

Public Key Infrastructure (PKI) is the basis of how identity and key management is performed on the web today. PKIjs is a pure JavaScript library implementing the formats that are used in PKI applications. It is built on WebCrypto and aspires to make it p

BSD-3-Clause
Latest version published 4 months ago

Package Health Score

78 / 100
Full package analysis