summaryrefslogtreecommitdiffstats
path: root/node_modules/parse-asn1/certificate.js
diff options
context:
space:
mode:
authorGravatar Piotr Russ <mail@pruss.it> 2020-11-18 23:26:45 +0100
committerGravatar Piotr Russ <mail@pruss.it> 2020-11-18 23:26:45 +0100
commit81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 (patch)
tree8b959d50c5a614cbf9fcb346ed556140374d4b6d /node_modules/parse-asn1/certificate.js
parent1870f3fdf43707a15fda0f609a021f516f45eb63 (diff)
downloadwebsite_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.gz
website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.tar.bz2
website_creator-81ddf9b700bc48a1f8e472209f080f9c1d9a9b09.zip
rm node_modules
Diffstat (limited to 'node_modules/parse-asn1/certificate.js')
-rw-r--r--node_modules/parse-asn1/certificate.js89
1 files changed, 0 insertions, 89 deletions
diff --git a/node_modules/parse-asn1/certificate.js b/node_modules/parse-asn1/certificate.js
deleted file mode 100644
index 0ee17a2..0000000
--- a/node_modules/parse-asn1/certificate.js
+++ /dev/null
@@ -1,89 +0,0 @@
-// from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js
-// thanks to @Rantanen
-
-'use strict'
-
-var asn = require('asn1.js')
-
-var Time = asn.define('Time', function () {
- this.choice({
- utcTime: this.utctime(),
- generalTime: this.gentime()
- })
-})
-
-var AttributeTypeValue = asn.define('AttributeTypeValue', function () {
- this.seq().obj(
- this.key('type').objid(),
- this.key('value').any()
- )
-})
-
-var AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () {
- this.seq().obj(
- this.key('algorithm').objid(),
- this.key('parameters').optional(),
- this.key('curve').objid().optional()
- )
-})
-
-var SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () {
- this.seq().obj(
- this.key('algorithm').use(AlgorithmIdentifier),
- this.key('subjectPublicKey').bitstr()
- )
-})
-
-var RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () {
- this.setof(AttributeTypeValue)
-})
-
-var RDNSequence = asn.define('RDNSequence', function () {
- this.seqof(RelativeDistinguishedName)
-})
-
-var Name = asn.define('Name', function () {
- this.choice({
- rdnSequence: this.use(RDNSequence)
- })
-})
-
-var Validity = asn.define('Validity', function () {
- this.seq().obj(
- this.key('notBefore').use(Time),
- this.key('notAfter').use(Time)
- )
-})
-
-var Extension = asn.define('Extension', function () {
- this.seq().obj(
- this.key('extnID').objid(),
- this.key('critical').bool().def(false),
- this.key('extnValue').octstr()
- )
-})
-
-var TBSCertificate = asn.define('TBSCertificate', function () {
- this.seq().obj(
- this.key('version').explicit(0).int().optional(),
- this.key('serialNumber').int(),
- this.key('signature').use(AlgorithmIdentifier),
- this.key('issuer').use(Name),
- this.key('validity').use(Validity),
- this.key('subject').use(Name),
- this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo),
- this.key('issuerUniqueID').implicit(1).bitstr().optional(),
- this.key('subjectUniqueID').implicit(2).bitstr().optional(),
- this.key('extensions').explicit(3).seqof(Extension).optional()
- )
-})
-
-var X509Certificate = asn.define('X509Certificate', function () {
- this.seq().obj(
- this.key('tbsCertificate').use(TBSCertificate),
- this.key('signatureAlgorithm').use(AlgorithmIdentifier),
- this.key('signatureValue').bitstr()
- )
-})
-
-module.exports = X509Certificate