1 line
10 KiB
JSON
1 line
10 KiB
JSON
{"ast":null,"code":"// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js\n// Fedor, you are amazing.\n'use strict';\n\nvar asn1 = require('asn1.js');\n\nexports.certificate = require('./certificate');\nvar RSAPrivateKey = asn1.define('RSAPrivateKey', function () {\n this.seq().obj(this.key('version').int(), this.key('modulus').int(), this.key('publicExponent').int(), this.key('privateExponent').int(), this.key('prime1').int(), this.key('prime2').int(), this.key('exponent1').int(), this.key('exponent2').int(), this.key('coefficient').int());\n});\nexports.RSAPrivateKey = RSAPrivateKey;\nvar RSAPublicKey = asn1.define('RSAPublicKey', function () {\n this.seq().obj(this.key('modulus').int(), this.key('publicExponent').int());\n});\nexports.RSAPublicKey = RSAPublicKey;\nvar PublicKey = asn1.define('SubjectPublicKeyInfo', function () {\n this.seq().obj(this.key('algorithm').use(AlgorithmIdentifier), this.key('subjectPublicKey').bitstr());\n});\nexports.PublicKey = PublicKey;\nvar AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () {\n this.seq().obj(this.key('algorithm').objid(), this.key('none').null_().optional(), this.key('curve').objid().optional(), this.key('params').seq().obj(this.key('p').int(), this.key('q').int(), this.key('g').int()).optional());\n});\nvar PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () {\n this.seq().obj(this.key('version').int(), this.key('algorithm').use(AlgorithmIdentifier), this.key('subjectPrivateKey').octstr());\n});\nexports.PrivateKey = PrivateKeyInfo;\nvar EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () {\n this.seq().obj(this.key('algorithm').seq().obj(this.key('id').objid(), this.key('decrypt').seq().obj(this.key('kde').seq().obj(this.key('id').objid(), this.key('kdeparams').seq().obj(this.key('salt').octstr(), this.key('iters').int())), this.key('cipher').seq().obj(this.key('algo').objid(), this.key('iv').octstr()))), this.key('subjectPrivateKey').octstr());\n});\nexports.EncryptedPrivateKey = EncryptedPrivateKeyInfo;\nvar DSAPrivateKey = asn1.define('DSAPrivateKey', function () {\n this.seq().obj(this.key('version').int(), this.key('p').int(), this.key('q').int(), this.key('g').int(), this.key('pub_key').int(), this.key('priv_key').int());\n});\nexports.DSAPrivateKey = DSAPrivateKey;\nexports.DSAparam = asn1.define('DSAparam', function () {\n this.int();\n});\nvar ECPrivateKey = asn1.define('ECPrivateKey', function () {\n this.seq().obj(this.key('version').int(), this.key('privateKey').octstr(), this.key('parameters').optional().explicit(0).use(ECParameters), this.key('publicKey').optional().explicit(1).bitstr());\n});\nexports.ECPrivateKey = ECPrivateKey;\nvar ECParameters = asn1.define('ECParameters', function () {\n this.choice({\n namedCurve: this.objid()\n });\n});\nexports.signature = asn1.define('signature', function () {\n this.seq().obj(this.key('r').int(), this.key('s').int());\n});","map":{"version":3,"sources":["/Users/tylerkoenig/Code/personal/react-scss2/node_modules/parse-asn1/asn1.js"],"names":["asn1","require","exports","certificate","RSAPrivateKey","define","seq","obj","key","int","RSAPublicKey","PublicKey","use","AlgorithmIdentifier","bitstr","objid","null_","optional","PrivateKeyInfo","octstr","PrivateKey","EncryptedPrivateKeyInfo","EncryptedPrivateKey","DSAPrivateKey","DSAparam","ECPrivateKey","explicit","ECParameters","choice","namedCurve","signature"],"mappings":"AAAA;AACA;AACA;;AAEA,IAAIA,IAAI,GAAGC,OAAO,CAAC,SAAD,CAAlB;;AAEAC,OAAO,CAACC,WAAR,GAAsBF,OAAO,CAAC,eAAD,CAA7B;AAEA,IAAIG,aAAa,GAAGJ,IAAI,CAACK,MAAL,CAAY,eAAZ,EAA6B,YAAY;AAC3D,OAAKC,GAAL,GAAWC,GAAX,CACE,KAAKC,GAAL,CAAS,SAAT,EAAoBC,GAApB,EADF,EAEE,KAAKD,GAAL,CAAS,SAAT,EAAoBC,GAApB,EAFF,EAGE,KAAKD,GAAL,CAAS,gBAAT,EAA2BC,GAA3B,EAHF,EAIE,KAAKD,GAAL,CAAS,iBAAT,EAA4BC,GAA5B,EAJF,EAKE,KAAKD,GAAL,CAAS,QAAT,EAAmBC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I,CAACK,MAAL,CAAY,cAAZ,EAA4B,YAAY;AACzD,OAAKuB,MAAL,CAAY;AACVC,IAAAA,UAAU,EAAE,KAAKd,KAAL;AADF,GAAZ;AAGD,CAJkB,CAAnB;AAMAb,OAAO,CAAC4B,SAAR,GAAoB9B,IAAI,CAACK,MAAL,CAAY,WAAZ,EAAyB,YAAY;AACvD,OAAKC,GAAL,GAAWC,GAAX,CACE,KAAKC,GAAL,CAAS,GAAT,EAAcC,GAAd,EADF,EAEE,KAAKD,GAAL,CAAS,GAAT,EAAcC,GAAd,EAFF;AAID,CALmB,CAApB","sourcesContent":["// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js\n// Fedor, you are amazing.\n'use strict'\n\nvar asn1 = require('asn1.js')\n\nexports.certificate = require('./certificate')\n\nvar RSAPrivateKey = asn1.define('RSAPrivateKey', function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('modulus').int(),\n this.key('publicExponent').int(),\n this.key('privateExponent').int(),\n this.key('prime1').int(),\n this.key('prime2').int(),\n this.key('exponent1').int(),\n this.key('exponent2').int(),\n this.key('coefficient').int()\n )\n})\nexports.RSAPrivateKey = RSAPrivateKey\n\nvar RSAPublicKey = asn1.define('RSAPublicKey', function () {\n this.seq().obj(\n this.key('modulus').int(),\n this.key('publicExponent').int()\n )\n})\nexports.RSAPublicKey = RSAPublicKey\n\nvar PublicKey = asn1.define('SubjectPublicKeyInfo', function () {\n this.seq().obj(\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('subjectPublicKey').bitstr()\n )\n})\nexports.PublicKey = PublicKey\n\nvar AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () {\n this.seq().obj(\n this.key('algorithm').objid(),\n this.key('none').null_().optional(),\n this.key('curve').objid().optional(),\n this.key('params').seq().obj(\n this.key('p').int(),\n this.key('q').int(),\n this.key('g').int()\n ).optional()\n )\n})\n\nvar PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('subjectPrivateKey').octstr()\n )\n})\nexports.PrivateKey = PrivateKeyInfo\nvar EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () {\n this.seq().obj(\n this.key('algorithm').seq().obj(\n this.key('id').objid(),\n this.key('decrypt').seq().obj(\n this.key('kde').seq().obj(\n this.key('id').objid(),\n this.key('kdeparams').seq().obj(\n this.key('salt').octstr(),\n this.key('iters').int()\n )\n ),\n this.key('cipher').seq().obj(\n this.key('algo').objid(),\n this.key('iv').octstr()\n )\n )\n ),\n this.key('subjectPrivateKey').octstr()\n )\n})\n\nexports.EncryptedPrivateKey = EncryptedPrivateKeyInfo\n\nvar DSAPrivateKey = asn1.define('DSAPrivateKey', function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('p').int(),\n this.key('q').int(),\n this.key('g').int(),\n this.key('pub_key').int(),\n this.key('priv_key').int()\n )\n})\nexports.DSAPrivateKey = DSAPrivateKey\n\nexports.DSAparam = asn1.define('DSAparam', function () {\n this.int()\n})\n\nvar ECPrivateKey = asn1.define('ECPrivateKey', function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('privateKey').octstr(),\n this.key('parameters').optional().explicit(0).use(ECParameters),\n this.key('publicKey').optional().explicit(1).bitstr()\n )\n})\nexports.ECPrivateKey = ECPrivateKey\n\nvar ECParameters = asn1.define('ECParameters', function () {\n this.choice({\n namedCurve: this.objid()\n })\n})\n\nexports.signature = asn1.define('signature', function () {\n this.seq().obj(\n this.key('r').int(),\n this.key('s').int()\n )\n})\n"]},"metadata":{},"sourceType":"script"} |