JavaScript generic ASN.1 parser (mirror)

Compare changes

Choose any two refs to compare.

+4968 -461
+10
.editorconfig
··· 1 + root = true 2 + end_of_line = lf 3 + max_line_length = 120 4 + 5 + [*.{js,css}] 6 + charset = utf-8 7 + indent_size = 4 8 + indent_style = space 9 + insert_final_newline = true 10 + trim_trailing_whitespace = true
+11 -5
.github/workflows/node.js.yml
··· 12 12 13 13 strategy: 14 14 matrix: 15 - node-version: [ 12.20.0, latest ] 15 + node-version: [ 14.6.0, latest ] 16 16 17 17 steps: 18 - - uses: actions/checkout@v3 18 + - uses: actions/checkout@v4 19 + - name: Use pnpm 20 + uses: pnpm/action-setup@v4 21 + with: 22 + run_install: false 19 23 - name: Use Node.js ${{ matrix.node-version }} 20 - uses: actions/setup-node@v3 24 + uses: actions/setup-node@v4 21 25 with: 22 26 node-version: ${{ matrix.node-version }} 23 - - run: npm test all 24 - - run: npm run lint 27 + cache: pnpm 28 + - run: pnpm install 29 + - run: node test all 30 + - run: pnpm run lint 25 31 if: matrix.node-version == 'latest'
+2 -1
.gitignore
··· 2 2 .DS_Store/ 3 3 .vscode/ 4 4 node_modules/ 5 + dist/ 5 6 package-lock.json 6 - pnpm-lock.yaml 7 7 # Artifacts from release.sh 8 + index-local.html 8 9 sha256sums.asc 9 10 asn1js.zip 10 11 # Artifacts from mirror_to_github.sh
+2 -1
.mtn-ignore
··· 1 1 [.]DS_Store$ 2 2 [.]vscode$ 3 3 node_modules$ 4 + dist$ 4 5 package-lock[.]json 5 - pnpm-lock[.]yaml 6 6 # Artifacts from release.sh 7 + index-local.html 7 8 sha256sums[.]asc 8 9 asn1js[.]zip 9 10 # Artifacts from mirror_to_github.sh
+99
.vscode/launch.json
··· 1 + { 2 + // Use IntelliSense to learn about possible attributes. 3 + // Hover to view descriptions of existing attributes. 4 + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 + "version": "0.2.0", 6 + "configurations": [ 7 + { 8 + "type": "node", 9 + "request": "launch", 10 + "name": "test", 11 + "skipFiles": [ 12 + "<node_internals>/**" 13 + ], 14 + "program": "${workspaceFolder}/test.js", 15 + "args": [] 16 + }, 17 + { 18 + "type": "node", 19 + "request": "launch", 20 + "name": "dumpASN1", 21 + "skipFiles": [ 22 + "<node_internals>/**" 23 + ], 24 + "program": "${workspaceFolder}/dumpASN1.js", 25 + "args": [ 26 + "examples/ed25519.cer" 27 + ] 28 + }, 29 + { 30 + "type": "node", 31 + "request": "launch", 32 + "name": "parseRFC", 33 + "skipFiles": [ 34 + "<node_internals>/**" 35 + ], 36 + "program": "${workspaceFolder}/parseRFC.js", 37 + "args": [ 38 + "rfc/rfc4511.txt", 39 + "rfcdef.json" 40 + ] 41 + }, 42 + { 43 + "type": "node", 44 + "request": "launch", 45 + "name": "dumpASN1 X.509", 46 + "skipFiles": [ 47 + "<node_internals>/**" 48 + ], 49 + "program": "${workspaceFolder}/dumpASN1.js", 50 + "args": [ 51 + "examples/ed25519.cer", 52 + "1.3.6.1.5.5.7.0.18", 53 + "Certificate" 54 + ] 55 + }, 56 + { 57 + "type": "node", 58 + "request": "launch", 59 + "name": "dumpASN1 CRL", 60 + "skipFiles": [ 61 + "<node_internals>/**" 62 + ], 63 + "program": "${workspaceFolder}/dumpASN1.js", 64 + "args": [ 65 + "data:base64,MIG9AgEBMA0GCSqGSIb3DQEBCwUAMEExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxUUjM0IFNhbXBsZXMxGzAZBgNVBAMTElRSMzQgU2FtcGxlIENBIEtESBcNMTAxMTAyMTczMzMwWhcNMTAxMjAyMTczMzMwWjBIMBYCBTQAAAAIFw0xMDExMDIxNzI4MTNaMBYCBTQAAAAKFw0xMDExMDIxNzMxNDZaMBYCBTQAAAALFw0xMDExMDIxNzMzMjVa", 66 + "1.3.6.1.5.5.7.0.18", 67 + "TBSCertList" 68 + ] 69 + }, 70 + { 71 + "type": "node", 72 + "request": "launch", 73 + "name": "dumpASN1 CMS", 74 + "skipFiles": [ 75 + "<node_internals>/**" 76 + ], 77 + "program": "${workspaceFolder}/dumpASN1.js", 78 + "args": [ 79 + "examples/cms-password.p7m", 80 + "1.2.840.113549.1.9.16.0.14", 81 + "ContentInfo" 82 + ] 83 + }, 84 + { 85 + "type": "node", 86 + "request": "launch", 87 + "name": "dumpASN1 LDAP", 88 + "skipFiles": [ 89 + "<node_internals>/**" 90 + ], 91 + "program": "${workspaceFolder}/dumpASN1.js", 92 + "args": [ 93 + "data:base64,MDMCAQFjLgQACgEACgEAAgEAAgEAAQEAoA+jDQQFTnRWZXIEBAEAAAAwCgQITmV0bG9nb24===", 94 + "1.3.6.1.1.18", 95 + "LDAPMessage" 96 + ] 97 + } 98 + ] 99 + }
+9
.vscode/settings.json
··· 1 + { 2 + "editor.insertSpaces": true, 3 + "editor.tabSize": 8, 4 + "editor.indentSize": 4, 5 + "editor.stickyScroll.enabled": true, 6 + "explorer.excludeGitIgnore": true, 7 + "files.eol": "\n", 8 + "git.openRepositoryInParentFolders": "never" 9 + }
+27
CHANGELOG.md
··· 1 + # ChangeLog 2 + 3 + ## 2.1.0 - 2025-08-03 4 + 5 + ### Changed 6 + 7 + - when fields are CHOICEs now both the field name and the choice name are shown (fixes GitHub #102) 8 + - upgrade minimum NodeJS version supported from 12.20.0 to 14.6.0 due to usage of ?. and ?? operators in defs.js (ECMAScript 2020); older code is still linted against ECMAScript 2015 for now 9 + 10 + ### Added 11 + 12 + - add tests to check expected decoding 13 + 14 + ## 2.0.6 - 2025-07-29 15 + 16 + ### Added 17 + 18 + - add proper support for standard Base64 (we previously only supported Base64url) (fixes GitHub #99) 19 + - improve test harness 20 + 21 + ## 2.0.5 - 2025-04-12 22 + 23 + ### Added 24 + 25 + - add `index-local.html` for local `file://` usage without needing a web server 26 + - add definitions support for `LDAPMessage` 27 + - #TODO continue producing old ChangeLog entries
+1 -1
LICENSE
··· 1 1 ISC License 2 2 3 - Copyright (c) 2008-2024 Lapo Luchini <lapo@lapo.it> 3 + Copyright (c) 2008-2025 Lapo Luchini <lapo@lapo.it> 4 4 5 5 Permission to use, copy, modify, and/or distribute this software for any 6 6 purpose with or without fee is hereby granted, provided that the above
+52 -22
README.md
··· 3 3 4 4 asn1js is a JavaScript generic ASN.1 parser/decoder that can decode any valid ASN.1 DER or BER structures. 5 5 6 - An example page that can decode Base64-encoded (raw base64, PEM armoring and `begin-base64` are recognized) or Hex-encoded (or local files with some browsers) is included and can be used both [online on the official website](https://lapo.it/asn1js/) or [offline (ZIP file)](https://lapo.it/asn1js/asn1js.zip). 6 + An example page that can decode Base64-encoded (raw base64, PEM armoring and `begin-base64` are recognized) or Hex-encoded (or local files with some browsers) is included and can be used both [online on the official website](https://asn1js.eu/) or [offline (ZIP file)](https://lapo.it/asn1js/asn1js.zip) by opening `index-local.html`. 7 7 8 - Usage with `npm` / `yarn` 9 - ------------------------- 8 + Usage with `nodejs` 9 + ------------------- 10 10 11 11 This package can be installed with either npm or yarn via the following commands: 12 12 13 13 ```sh 14 14 npm install @lapo/asn1js 15 - # or with yarn 15 + # or other tools 16 + pnpm install @lapo/asn1js 16 17 yarn add @lapo/asn1js 17 18 ``` 18 19 19 - Assuming a standard javascript bundler is setup you can import it like so: 20 + You can import the classes like this: 20 21 21 22 ```js 22 - const ASN1 = require('@lapo/asn1js'); 23 - // or with ES modules 24 - import ASN1 from '@lapo/asn1js'; 23 + import { ASN1 } from '@lapo/asn1js'; 25 24 ``` 26 25 27 26 A submodule of this package can also be imported: 28 27 29 28 ```js 30 - const Hex = require('@lapo/asn1js/hex'); 31 - // or with ES modules 32 - import Hex from '@lapo/asn1js/hex'; 29 + import { Hex } from '@lapo/asn1js/hex.js'; 30 + ``` 31 + 32 + If your code is still not using ES6 Modules (and is using CommonJS) you can `require` it normally [since NodeJS 22](https://joyeecheung.github.io/blog/2024/03/18/require-esm-in-node-js/) (with parameter `--experimental-require-module`): 33 + 34 + ```js 35 + const 36 + { ASN1 } = require('@lapo/asn1js'), 37 + { Hex } = require('@lapo/asn1js/hex.js'); 38 + console.log(ASN1.decode(Hex.decode('06032B6570')).content()); 33 39 ``` 34 40 35 - Usage with RequireJS 41 + On older NodeJS you instead need to use async `import`: 42 + 43 + ```js 44 + async function main() { 45 + const 46 + { ASN1 } = await import('@lapo/asn1js'), 47 + { Hex } = await import('@lapo/asn1js/hex.js'); 48 + console.log(ASN1.decode(Hex.decode('06032B6570')).content()); 49 + } 50 + main(); 51 + ``` 52 + 53 + Usage on the web 36 54 -------------------- 37 55 38 - Can be [tested on JSFiddle](https://jsfiddle.net/lapo/tmdq35ug/). 56 + Can be [tested on JSFiddle](https://jsfiddle.net/lapo/y6t2wo7q/). 39 57 40 58 ```html 41 - <script type="text/javascript" src="https://unpkg.com/requirejs/require.js"></script> 42 59 <script> 43 - require([ 44 - 'https://unpkg.com/@lapo/asn1js/asn1.js', 45 - 'https://unpkg.com/@lapo/asn1js/hex.js' 46 - ], function(ASN1, Hex) { 47 - document.body.innerText = ASN1.decode(Hex.decode('06032B6570')).content(); 48 - }); 60 + import { ASN1 } from 'https://unpkg.com/@lapo/asn1js@2.0.0/asn1.js'; 61 + import { Hex } from 'https://unpkg.com/@lapo/asn1js@2.0.0/hex.js'; 62 + 63 + document.body.innerText = ASN1.decode(Hex.decode('06032B6570')).content(); 49 64 </script> 50 65 ``` 51 66 67 + Local usage 68 + -------------------- 69 + 70 + Since unfortunately ESM modules are not working on `file:` protocol due to [CORS issues](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#other_differences_between_modules_and_standard_scripts), there is a bundled [single-file version working locally](https://asn1js.eu/index-local.html). It doesn't work online (due to [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) restrictions about inline content) but can be saved locally and opened in a browser. 71 + 72 + Usage from CLI 73 + -------------------- 74 + 75 + You can dump an ASN.1 structure from the command line using the following command (no need to even install it): 76 + 77 + ```sh 78 + npx @lapo/asn1js ed25519.cer 79 + ``` 80 + 52 81 ISC license 53 82 ----------- 54 83 55 - ASN.1 JavaScript decoder Copyright (c) 2008-2024 Lapo Luchini <lapo@lapo.it> 84 + ASN.1 JavaScript decoder Copyright (c) 2008-2025 Lapo Luchini <lapo@lapo.it> 56 85 57 86 Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 58 87 ··· 66 95 - extended tag support added by [Pรฉter Budai](https://www.peterbudai.eu/) 67 96 - patches by [Gergely Nagy](https://github.com/ngg) 68 97 - Relative OID support added by [Mistial Developer](https://github.com/mistial-dev) 69 - - dark mode support added by [Oliver Burgmaier](https://github.com/olibu/) 98 + - dark mode and other UI improvements by [Oliver Burgmaier](https://github.com/olibu/) 70 99 - patches by [Nicolai Sรธborg](https://github.com/NicolaiSoeborg) 71 100 72 101 links ··· 76 105 - [dedicated domain](https://asn1js.eu/) 77 106 - [InDefero tracker](http://idf.lapo.it/p/asn1js/) 78 107 - [GitHub mirror](https://github.com/lapo-luchini/asn1js) 108 + - [ChangeLog on GitHub](https://github.com/lapo-luchini/asn1js/blob/trunk/CHANGELOG.md) 79 109 - [Ohloh code stats](https://www.openhub.net/p/asn1js)
+94 -41
asn1.js
··· 1 1 // ASN.1 JavaScript decoder 2 - // Copyright (c) 2008-2024 Lapo Luchini <lapo@lapo.it> 2 + // Copyright (c) 2008 Lapo Luchini <lapo@lapo.it> 3 3 4 4 // Permission to use, copy, modify, and/or distribute this software for any 5 5 // purpose with or without fee is hereby granted, provided that the above 6 6 // copyright notice and this permission notice appear in all copies. 7 - // 7 + // 8 8 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 9 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 10 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ··· 21 21 reTimeS = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|(-(?:0\d|1[0-2])|[+](?:0\d|1[0-4]))([0-5]\d)?)?$/, 22 22 reTimeL = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|(-(?:0\d|1[0-2])|[+](?:0\d|1[0-4]))([0-5]\d)?)?$/, 23 23 hexDigits = '0123456789ABCDEF', 24 - b64Safe = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', 24 + b64Std = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', 25 + b64URL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', 25 26 tableT61 = [ 26 27 ['', ''], 27 28 ['AEIOUaeiou', 'ร€รˆรŒร’ร™ร รจรฌรฒรน'], // Grave ··· 38 39 ['', ''], 39 40 ['OUou', 'ลลฐล‘ลฑ'], // Double Acute 40 41 ['AEIUaeiu', 'ฤ„ฤ˜ฤฎลฒฤ…ฤ™ฤฏลณ'], // Ogonek 41 - ['CDELNRSTZcdelnrstz', 'ฤŒฤŽฤšฤฝล‡ล˜ล ลคลฝฤฤฤ›ฤพลˆล™ลกลฅลพ'] // Caron 42 + ['CDELNRSTZcdelnrstz', 'ฤŒฤŽฤšฤฝล‡ล˜ล ลคลฝฤฤฤ›ฤพลˆล™ลกลฅลพ'], // Caron 42 43 ]; 43 44 44 45 function stringCut(str, len) { ··· 56 57 } 57 58 } 58 59 59 - class Stream { 60 + /** Class to manage a stream of bytes, with a zero-copy approach. 61 + * It uses an existing array or binary string and advances a position index. */ 62 + export class Stream { 60 63 64 + /** 65 + * @param {Stream|array|string} enc data (will not be copied) 66 + * @param {?number} pos starting position (mandatory when `end` is not a Stream) 67 + */ 61 68 constructor(enc, pos) { 62 69 if (enc instanceof Stream) { 63 70 this.enc = enc.enc; 64 71 this.pos = enc.pos; 65 72 } else { 66 - // enc should be an array or a binary string 67 73 this.enc = enc; 68 74 this.pos = pos; 69 75 } 76 + if (typeof this.pos != 'number') 77 + throw new Error('"pos" must be a numeric value'); 78 + if (typeof this.enc == 'string') 79 + this.getRaw = pos => this.enc.charCodeAt(pos); 80 + else if (typeof this.enc[0] == 'number') 81 + this.getRaw = pos => this.enc[pos]; 82 + else 83 + throw new Error('"enc" must be a numeric array or a string'); 70 84 } 85 + /** Get the byte at current position (and increment it) or at a specified position (and avoid moving current position). 86 + * @param {?number} pos read position if specified, else current position (and increment it) */ 71 87 get(pos) { 72 88 if (pos === undefined) 73 89 pos = this.pos++; 74 90 if (pos >= this.enc.length) 75 - throw 'Requesting byte offset ' + pos + ' on a stream of length ' + this.enc.length; 76 - return (typeof this.enc == 'string') ? this.enc.charCodeAt(pos) : this.enc[pos]; 91 + throw new Error('Requesting byte offset ' + pos + ' on a stream of length ' + this.enc.length); 92 + return this.getRaw(pos); 77 93 } 78 - hexByte(b) { 94 + /** Convert a single byte to an hexadcimal string (of length 2). 95 + * @param {number} b */ 96 + static hexByte(b) { 79 97 return hexDigits.charAt((b >> 4) & 0xF) + hexDigits.charAt(b & 0xF); 80 98 } 81 - hexDump(start, end, raw) { 99 + /** Hexadecimal dump of a specified region of the stream. 100 + * @param {number} start starting position (included) 101 + * @param {number} end ending position (excluded) 102 + * @param {string} type 'raw', 'byte' or 'dump' (default) */ 103 + hexDump(start, end, type = 'dump') { 82 104 let s = ''; 83 105 for (let i = start; i < end; ++i) { 84 - s += this.hexByte(this.get(i)); 85 - if (raw !== true) 106 + if (type == 'byte' && i > start) 107 + s += ' '; 108 + s += Stream.hexByte(this.get(i)); 109 + if (type == 'dump') 86 110 switch (i & 0xF) { 87 111 case 0x7: s += ' '; break; 88 112 case 0xF: s += '\n'; break; ··· 91 115 } 92 116 return s; 93 117 } 94 - b64Dump(start, end) { 118 + /** Base64url dump of a specified region of the stream (according to RFC 4648 section 5). 119 + * @param {number} start starting position (included) 120 + * @param {number} end ending position (excluded) 121 + * @param {string} type 'url' (default, section 5 without padding) or 'std' (section 4 with padding) */ 122 + b64Dump(start, end, type = 'url') { 123 + const b64 = type === 'url' ? b64URL : b64Std; 95 124 let extra = (end - start) % 3, 96 125 s = '', 97 126 i, c; 98 127 for (i = start; i + 2 < end; i += 3) { 99 128 c = this.get(i) << 16 | this.get(i + 1) << 8 | this.get(i + 2); 100 - s += b64Safe.charAt(c >> 18 & 0x3F); 101 - s += b64Safe.charAt(c >> 12 & 0x3F); 102 - s += b64Safe.charAt(c >> 6 & 0x3F); 103 - s += b64Safe.charAt(c & 0x3F); 129 + s += b64.charAt(c >> 18 & 0x3F); 130 + s += b64.charAt(c >> 12 & 0x3F); 131 + s += b64.charAt(c >> 6 & 0x3F); 132 + s += b64.charAt(c & 0x3F); 104 133 } 105 134 if (extra > 0) { 106 135 c = this.get(i) << 16; 107 136 if (extra > 1) c |= this.get(i + 1) << 8; 108 - s += b64Safe.charAt(c >> 18 & 0x3F); 109 - s += b64Safe.charAt(c >> 12 & 0x3F); 110 - if (extra == 2) s += b64Safe.charAt(c >> 6 & 0x3F); 137 + s += b64.charAt(c >> 18 & 0x3F); 138 + s += b64.charAt(c >> 12 & 0x3F); 139 + if (extra == 2) s += b64.charAt(c >> 6 & 0x3F); 140 + if (b64 === b64Std) s += '==='.slice(0, 3 - extra); 111 141 } 112 142 return s; 113 143 } ··· 190 220 let s = this.parseStringISO(start, end).str, 191 221 m = (shortYear ? reTimeS : reTimeL).exec(s); 192 222 if (!m) 193 - return 'Unrecognized time: ' + s; 223 + throw new Error('Unrecognized time: ' + s); 194 224 if (shortYear) { 195 225 // to avoid querying the timer, use the fixed range [1970, 2069] 196 226 // it will conform with ITU X.400 [-10, +40] sliding window until 2030 ··· 245 275 parseBitString(start, end, maxLength) { 246 276 let unusedBits = this.get(start); 247 277 if (unusedBits > 7) 248 - throw 'Invalid BitString with unusedBits=' + unusedBits; 278 + throw new Error('Invalid BitString with unusedBits=' + unusedBits); 249 279 let lenBit = ((end - start - 1) << 3) - unusedBits, 250 280 s = ''; 251 281 for (let i = start + 1; i < end; ++i) { ··· 265 295 s = this.parseStringUTF(start, end, maxLength); 266 296 checkPrintable(s.str); 267 297 return { size: end - start, str: s.str }; 268 - } catch (e) { 298 + } catch (ignore) { 269 299 // ignore 270 300 } 271 301 maxLength /= 2; // we work in bytes ··· 273 303 end = start + maxLength; 274 304 s = ''; 275 305 for (let i = start; i < end; ++i) 276 - s += this.hexByte(this.get(i)); 306 + s += Stream.hexByte(this.get(i)); 277 307 if (len > maxLength) 278 308 s += ellipsis; 279 309 return { size: len, str: s }; ··· 368 398 369 399 export class ASN1 { 370 400 constructor(stream, header, length, tag, tagLen, sub) { 371 - if (!(tag instanceof ASN1Tag)) throw 'Invalid tag value.'; 401 + if (!(tag instanceof ASN1Tag)) throw new Error('Invalid tag value.'); 372 402 this.stream = stream; 373 403 this.header = header; 374 404 this.length = length; ··· 431 461 } 432 462 switch (this.tag.tagNumber) { 433 463 case 0x01: // BOOLEAN 464 + if (len === 0) return 'invalid length 0'; 434 465 return (this.stream.get(content) === 0) ? 'false' : 'true'; 435 466 case 0x02: // INTEGER 467 + if (len === 0) return 'invalid length 0'; 436 468 return this.stream.parseInteger(content, content + len); 437 469 case 0x03: { // BIT_STRING 438 470 let d = recurse(this, 'parseBitString', maxLength); 439 471 return '(' + d.size + ' bit)\n' + d.str; 440 472 } 441 473 case 0x04: { // OCTET_STRING 474 + if (len === 0) return 'invalid length 0'; 442 475 let d = recurse(this, 'parseOctetString', maxLength); 443 476 return '(' + d.size + ' byte)\n' + d.str; 444 477 } ··· 485 518 } 486 519 toPrettyString(indent) { 487 520 if (indent === undefined) indent = ''; 488 - let s = indent + this.typeName() + ' @' + this.stream.pos; 521 + let s = indent; 522 + if (this.def) { 523 + if (this.def.id) 524 + s += this.def.id + ' '; 525 + if (this.def.name && this.def.name != this.typeName().replace(/_/g, ' ')) 526 + s+= this.def.name + ' '; 527 + if (this.def.mismatch) 528 + s += '[?] '; 529 + } 530 + s += this.typeName() + ' @' + this.stream.pos; 489 531 if (this.length >= 0) 490 532 s += '+'; 491 533 s += this.length; ··· 517 559 posLen() { 518 560 return this.stream.pos + this.tagLen; 519 561 } 520 - toHexString() { 521 - return this.stream.hexDump(this.posStart(), this.posEnd(), true); 562 + /** Hexadecimal dump of the node. 563 + * @param type 'raw', 'byte' or 'dump' */ 564 + toHexString(type = 'raw') { 565 + return this.stream.hexDump(this.posStart(), this.posEnd(), type); 522 566 } 523 - toB64String() { 524 - return this.stream.b64Dump(this.posStart(), this.posEnd()); 567 + /** Base64url dump of the node (according to RFC 4648 section 5). 568 + * @param {string} type 'url' (default, section 5 without padding) or 'std' (section 4 with padding) 569 + */ 570 + toB64String(type = 'url') { 571 + return this.stream.b64Dump(this.posStart(), this.posEnd(), type); 525 572 } 526 573 static decodeLength(stream) { 527 574 let buf = stream.get(), ··· 531 578 if (len === 0) // long form with length 0 is a special case 532 579 return null; // undefined length 533 580 if (len > 6) // no reason to use Int10, as it would be a huge buffer anyways 534 - throw 'Length over 48 bits not supported at position ' + (stream.pos - 1); 581 + throw new Error('Length over 48 bits not supported at position ' + (stream.pos - 1)); 535 582 buf = 0; 536 583 for (let i = 0; i < len; ++i) 537 584 buf = (buf * 256) + stream.get(); ··· 539 586 } 540 587 static decode(stream, offset, type = ASN1) { 541 588 if (!(type == ASN1 || type.prototype instanceof ASN1)) 542 - throw 'Must pass a class that extends ASN1'; 589 + throw new Error('Must pass a class that extends ASN1'); 543 590 if (!(stream instanceof Stream)) 544 591 stream = new Stream(stream, offset || 0); 545 592 let streamStart = new Stream(stream), ··· 555 602 // definite length 556 603 let end = start + len; 557 604 if (end > stream.enc.length) 558 - throw 'Container at offset ' + start + ' has a length of ' + len + ', which is past the end of the stream'; 605 + throw new Error('Container at offset ' + start + ' has a length of ' + len + ', which is past the end of the stream'); 559 606 while (stream.pos < end) 560 607 sub[sub.length] = type.decode(stream); 561 608 if (stream.pos != end) 562 - throw 'Content size is not correct for container at offset ' + start; 609 + throw new Error('Content size is not correct for container at offset ' + start); 563 610 } else { 564 611 // undefined length 565 612 try { ··· 571 618 } 572 619 len = start - stream.pos; // undefined lengths are represented as negative values 573 620 } catch (e) { 574 - throw 'Exception while decoding undefined length content at offset ' + start + ': ' + e; 621 + throw new Error('Exception while decoding undefined length content at offset ' + start + ': ' + e); 575 622 } 576 623 } 577 624 }; ··· 583 630 try { 584 631 if (tag.tagNumber == 0x03) 585 632 if (stream.get() != 0) 586 - throw 'BIT STRINGs with unused bits cannot encapsulate.'; 633 + throw new Error('BIT STRINGs with unused bits cannot encapsulate.'); 587 634 getSub(); 588 - for (let i = 0; i < sub.length; ++i) 589 - if (sub[i].tag.isEOC()) 590 - throw 'EOC is not supposed to be actual content.'; 591 - } catch (e) { 635 + for (let s of sub) { 636 + if (s.tag.isEOC()) 637 + throw new Error('EOC is not supposed to be actual content.'); 638 + try { 639 + s.content(); 640 + } catch (e) { 641 + throw new Error('Unable to parse content: ' + e); 642 + } 643 + } 644 + } catch (ignore) { 592 645 // but silently ignore when they don't 593 646 sub = null; 594 647 //DEBUG console.log('Could not decode structure at ' + start + ':', e); ··· 596 649 } 597 650 if (sub === null) { 598 651 if (len === null) 599 - throw "We can't skip over an invalid tag with undefined length at offset " + start; 652 + throw new Error("We can't skip over an invalid tag with undefined length at offset " + start); 600 653 stream.pos = start + Math.abs(len); 601 654 } 602 655 return new type(streamStart, header, len, tag, tagLen, sub);
+8 -7
base64.js
··· 1 1 // Base64 JavaScript decoder 2 - // Copyright (c) 2008-2024 Lapo Luchini <lapo@lapo.it> 2 + // Copyright (c) 2008 Lapo Luchini <lapo@lapo.it> 3 3 4 4 // Permission to use, copy, modify, and/or distribute this software for any 5 5 // purpose with or without fee is hereby granted, provided that the above 6 6 // copyright notice and this permission notice appear in all copies. 7 - // 7 + // 8 8 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 9 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 10 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ··· 31 31 decoder[b64.charCodeAt(i)] = i; 32 32 for (i = 0; i < ignore.length; ++i) 33 33 decoder[ignore.charCodeAt(i)] = -1; 34 - // RFC 3548 URL & file safe encoding 34 + // also support decoding Base64url (RFC 4648 section 5) 35 35 decoder['-'.charCodeAt(0)] = decoder['+'.charCodeAt(0)]; 36 36 decoder['_'.charCodeAt(0)] = decoder['/'.charCodeAt(0)]; 37 37 } ··· 75 75 76 76 static pretty(str) { 77 77 // fix padding 78 - if (str.length % 4 > 0) 79 - str = (str + '===').slice(0, str.length + str.length % 4); 80 - // convert RFC 3548 to standard Base64 78 + let pad = 4 - str.length % 4; 79 + if (pad < 4) 80 + str += '==='.slice(0, pad); 81 + // convert Base64url (RFC 4648 section 5) to standard Base64 (RFC 4648 section 4) 81 82 str = str.replace(/-/g, '+').replace(/_/g, '/'); 82 83 // 80 column width 83 - return str.replace(/(.{80})/g, '$1\n'); 84 + return str.replace(/.{80}/g, '$&\n'); 84 85 } 85 86 86 87 static unarmor(a) {
+1 -1
check.sh
··· 1 1 #!/bin/sh 2 - type gsha256sum >/dev/null && SHA256=gsha256sum || SHA256=sha256sum 2 + type gsha256sum >/dev/null 2>/dev/null && SHA256=gsha256sum || SHA256=sha256sum 3 3 gpg --verify -o - sha256sums.asc | $SHA256 -c --quiet
+53
context.js
··· 1 + const 2 + id = (elem) => document.getElementById(elem), 3 + contextMenu = id('contextmenu'), 4 + btnCopyHex = id('btnCopyHex'), 5 + btnCopyB64 = id('btnCopyB64'), 6 + btnCopyTree = id('btnCopyTree'), 7 + btnCopyValue = id('btnCopyValue'); 8 + 9 + export function bindContextMenu(node) { 10 + const type = node.asn1.typeName(); 11 + const valueEnabled = type != 'SET' && type != 'SEQUENCE'; 12 + node.onclick = function (event) { 13 + // do not show the menu in case of clicking the icon 14 + if (event.srcElement.nodeName != 'SPAN') return; 15 + contextMenu.style.left = event.pageX + 'px'; 16 + contextMenu.style.top = event.pageY + 'px'; 17 + contextMenu.style.visibility = 'visible'; 18 + contextMenu.node = this; 19 + btnCopyValue.style.display = valueEnabled ? 'block' : 'none'; 20 + event.preventDefault(); 21 + event.stopPropagation(); 22 + }; 23 + } 24 + 25 + function close(event) { 26 + contextMenu.style.visibility = 'hidden'; 27 + event.stopPropagation(); 28 + } 29 + 30 + contextMenu.onmouseleave = close; 31 + 32 + btnCopyHex.onclick = function (event) { 33 + navigator.clipboard.writeText(contextMenu.node.asn1.toHexString('byte')); 34 + close(event); 35 + }; 36 + 37 + btnCopyB64.onclick = function (event) { 38 + event.stopPropagation(); 39 + navigator.clipboard.writeText(contextMenu.node.asn1.toB64String()); 40 + close(event); 41 + }; 42 + 43 + btnCopyTree.onclick = function (event) { 44 + event.stopPropagation(); 45 + navigator.clipboard.writeText(contextMenu.node.asn1.toPrettyString()); 46 + close(event); 47 + }; 48 + 49 + btnCopyValue.onclick = function (event) { 50 + event.stopPropagation(); 51 + navigator.clipboard.writeText(contextMenu.node.asn1.content()); 52 + close(event); 53 + };
+31 -15
defs.js
··· 1 1 // ASN.1 RFC definitions matcher 2 - // Copyright (c) 2023-2024 Lapo Luchini <lapo@lapo.it> 2 + // Copyright (c) 2023 Lapo Luchini <lapo@lapo.it> 3 3 4 4 // Permission to use, copy, modify, and/or distribute this software for any 5 5 // purpose with or without fee is hereby granted, provided that the above 6 6 // copyright notice and this permission notice appear in all copies. 7 - // 7 + // 8 8 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 9 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 10 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ··· 23 23 try { 24 24 // hope current OIDs contain the type name (will need to parse from RFC itself) 25 25 def = Defs.searchType(firstUpper(stats.defs[def.definedBy][1])); 26 - } catch (e) {} 26 + } catch (ignore) { /*ignore*/ } 27 27 while (def?.type == 'defined' || def?.type?.type == 'defined') { 28 28 const name = def?.type?.type ? def.type.name : def.name; 29 29 def = Object.assign({}, def); 30 30 def.type = Defs.searchType(name).type; 31 31 } 32 - if (def?.type?.name == 'CHOICE') { 33 - for (let c of def.type.content) { 34 - c = translate(c); 32 + if (def?.name == 'CHOICE' || def?.type?.name == 'CHOICE') { 33 + for (let c of def.content ?? def.type.content) { 34 + if (tn != c.type.name && tn != c.name) 35 + c = translate(c); 35 36 if (tn == c.type.name || tn == c.name) { 36 37 def = Object.assign({}, def); 38 + if (c.id) // show the CHOICE id, but add it to existing one if present 39 + def.id = def.id ? def.id + ' ' + c.id : c.id; 37 40 def.type = c.type.name ? c.type : c; 38 41 break; 39 42 } ··· 62 65 // return r.types[name]; 63 66 return Defs.moduleAndType(mod, name); 64 67 } 65 - throw 'Type not found: ' + name; 68 + throw new Error('Type not found: ' + name); 66 69 } 67 70 68 71 static match(value, def, stats = { total: 0, recognized: 0, defs: {} }) { 69 72 value.def = {}; 70 - let tn = value.typeName().replaceAll('_', ' '); 73 + let tn = value.typeName().replace(/_/g, ' '); 71 74 def = translate(def, tn, stats); 72 75 ++stats.total; 73 76 if (def?.type) { ··· 88 91 if (def.typeOf) 89 92 type = def.content[0]; 90 93 else { 91 - let tn = subval.typeName().replaceAll('_', ' '); 92 - do { 94 + let tn = subval.typeName().replace(/_/g, ' '); 95 + for (;;) { 93 96 type = def.content[j++]; 94 - // type = translate(type, tn); 97 + if (!type || typeof type != 'object') break; 95 98 if (type?.type?.type) 96 - type = type.type; 97 - } while (type && typeof type == 'object' && ('optional' in type || 'default' in type) && type.name != 'ANY' && type.name != tn); 99 + // type = type.type; 100 + type = Object.assign({}, type.type, {id: type.id}); 101 + if (type.type == 'defined') { 102 + let t2 = translate(type, tn); 103 + if (t2.type.name == tn) break; // exact match 104 + if (t2.type.name == 'ANY') break; // good enough 105 + } 106 + if (type.name == tn) break; // exact match 107 + if (type.name == 'ANY') break; // good enough 108 + if (!('optional' in type || 'default' in type)) break; 109 + } 98 110 if (type?.type == 'builtin' || type?.type == 'defined') { 99 111 let v = subval.content(); 100 112 if (typeof v == 'string') ··· 103 115 } else if (type?.definedBy && stats.defs?.[type.definedBy]?.[1]) { // hope current OIDs contain the type name (will need to parse from RFC itself) 104 116 try { 105 117 type = Defs.searchType(firstUpper(stats.defs[type.definedBy][1])); 106 - } catch (e) {} 118 + } catch (ignore) { /*ignore*/ } 107 119 } 108 120 } 109 121 } ··· 118 130 Defs.RFC = rfcdef; 119 131 120 132 Defs.commonTypes = [ 121 - [ 'X.509 certificate', '1.3.6.1.5.5.7.0.18', 'Certificate' ], 133 + [ 'X.509 certificate', '1.3.6.1.5.5.7.0.18', 'Certificate' ], 134 + [ 'X.509 public key info', '1.3.6.1.5.5.7.0.18', 'SubjectPublicKeyInfo' ], 135 + [ 'X.509 certificate revocation list', '1.3.6.1.5.5.7.0.18', 'CertificateList' ], 122 136 [ 'CMS / PKCS#7 envelope', '1.2.840.113549.1.9.16.0.14', 'ContentInfo' ], 137 + [ 'PKCS#1 RSA private key', '1.2.840.113549.1.1.0.1', 'RSAPrivateKey' ], 123 138 [ 'PKCS#8 encrypted private key', '1.2.840.113549.1.8.1.1', 'EncryptedPrivateKeyInfo' ], 124 139 [ 'PKCS#8 private key', '1.2.840.113549.1.8.1.1', 'PrivateKeyInfo' ], 125 140 [ 'PKCS#10 certification request', '1.2.840.113549.1.10.1.1', 'CertificationRequest' ], 126 141 [ 'CMP PKI Message', '1.3.6.1.5.5.7.0.16', 'PKIMessage' ], 142 + [ 'LDAP Message', '1.3.6.1.1.18', 'LDAPMessage' ], 127 143 ].map(arr => ({ description: arr[0], ...Defs.moduleAndType(rfcdef[arr[1]], arr[2]) }));
+42 -22
dom.js
··· 1 1 // ASN.1 JavaScript decoder 2 - // Copyright (c) 2008-2024 Lapo Luchini <lapo@lapo.it> 2 + // Copyright (c) 2008 Lapo Luchini <lapo@lapo.it> 3 3 4 4 // Permission to use, copy, modify, and/or distribute this software for any 5 5 // purpose with or without fee is hereby granted, provided that the above 6 6 // copyright notice and this permission notice appear in all copies. 7 - // 7 + // 8 8 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 9 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 10 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ··· 15 15 16 16 import { ASN1 } from './asn1.js'; 17 17 import { oids } from './oids.js'; 18 + import { bindContextMenu } from './context.js'; 18 19 19 20 const 20 21 lineLength = 80, ··· 23 24 ellipsis: '\u2026', 24 25 tag: function (tagName, className, text) { 25 26 let t = document.createElement(tagName); 26 - t.className = className; 27 + if (className) t.className = className; 27 28 if (text) t.innerText = text; 28 29 return t; 29 30 }, ··· 47 48 o += line; 48 49 } 49 50 return o; 50 - } 51 + }, 51 52 }; 52 53 53 54 export class ASN1DOM extends ASN1 { ··· 55 56 toDOM(spaces) { 56 57 spaces = spaces || ''; 57 58 let isOID = (typeof oids === 'object') && (this.tag.isUniversal() && (this.tag.tagNumber == 0x06) || (this.tag.tagNumber == 0x0D)); 58 - let node = DOM.tag('div', 'node'); 59 + let node = DOM.tag('li'); 59 60 node.asn1 = this; 60 - let head = DOM.tag('div', 'head'); 61 - head.appendChild(DOM.tag('span', 'spaces', spaces)); 61 + let head = DOM.tag('span', 'head'); 62 62 const typeName = this.typeName().replace(/_/g, ' '); 63 63 if (this.def) { 64 64 if (this.def.id) { ··· 75 75 } 76 76 } 77 77 head.appendChild(DOM.text(typeName)); 78 - let content = this.content(contentLength); 78 + let content; 79 + try { 80 + content = this.content(contentLength); 81 + } catch (e) { 82 + content = 'Cannot decode: ' + e; 83 + } 79 84 let oid; 80 85 if (content !== null) { 81 86 let preview = DOM.tag('span', 'preview'), ··· 105 110 content = content.replace(/</g, '&lt;'); 106 111 content = content.replace(/\n/g, '<br>'); 107 112 } 108 - node.appendChild(head); 109 - this.node = node; 113 + // add the li and details section for this node 114 + let contentNode; 115 + let childNode; 116 + if (this.sub !== null) { 117 + let details = DOM.tag('details'); 118 + details.setAttribute('open', ''); 119 + node.appendChild(details); 120 + let summary = DOM.tag('summary', 'node'); 121 + details.appendChild(summary); 122 + summary.appendChild(head); 123 + contentNode = summary; 124 + childNode = details; 125 + } else { 126 + contentNode = node; 127 + contentNode.classList.add('node'); 128 + contentNode.appendChild(head); 129 + } 130 + this.node = contentNode; 110 131 this.head = head; 111 132 let value = DOM.tag('div', 'value'); 112 133 let s = 'Offset: ' + this.stream.pos + '<br>'; ··· 129 150 } 130 151 } 131 152 value.innerHTML = s; 132 - node.appendChild(value); 133 - let sub = DOM.tag('div', 'sub'); 153 + contentNode.appendChild(value); 134 154 if (this.sub !== null) { 155 + let sub = DOM.tag('ul'); 156 + childNode.appendChild(sub); 135 157 spaces += '\xA0 '; 136 158 for (let i = 0, max = this.sub.length; i < max; ++i) 137 159 sub.appendChild(this.sub[i].toDOM(spaces)); 138 160 } 139 - node.appendChild(sub); 140 - head.onclick = function () { 141 - node.className = (node.className == 'node collapsed') ? 'node' : 'node collapsed'; 142 - }; 161 + bindContextMenu(node); 143 162 return node; 144 163 } 145 164 fakeHover(current) { 146 - this.node.className += ' hover'; 165 + this.node.classList.add('hover'); 147 166 if (current) 148 - this.head.className += ' hover'; 167 + this.head.classList.add('hover'); 149 168 } 150 169 fakeOut(current) { 151 - let re = / ?hover/; 152 - this.node.className = this.node.className.replace(re, ''); 170 + this.node.classList.remove('hover'); 153 171 if (current) 154 - this.head.className = this.head.className.replace(re, ''); 172 + this.head.classList.remove('hover'); 155 173 } 156 174 toHexDOM_sub(node, className, stream, start, end) { 157 175 if (start >= end) ··· 166 184 this.head.onmouseover = function () { this.hexNode.className = 'hexCurrent'; }; 167 185 this.head.onmouseout = function () { this.hexNode.className = 'hex'; }; 168 186 node.asn1 = this; 169 - node.onmouseover = function () { 187 + node.onmouseover = function (event) { 170 188 let current = !root.selected; 171 189 if (current) { 172 190 root.selected = this.asn1; 173 191 this.className = 'hexCurrent'; 174 192 } 175 193 this.asn1.fakeHover(current); 194 + event.stopPropagation(); 176 195 }; 177 196 node.onmouseout = function () { 178 197 let current = (root.selected == this.asn1); ··· 182 201 this.className = 'hex'; 183 202 } 184 203 }; 204 + bindContextMenu(node); 185 205 if (root == node) { 186 206 let lineStart = this.posStart() & 0xF; 187 207 if (lineStart != 0) {
+32 -19
dumpASN1.js
··· 1 1 #!/usr/bin/env node 2 2 3 + // usage: 4 + // ./dumpASN1.js filename 5 + // ./dumpASN1.js data:base64,MDMCAQFjLgQACgEACgEAAgEAAgEAAQEAoA+jDQQFTnRWZXIEBAEAAAAwCgQITmV0bG9nb24=== 6 + 3 7 import * as fs from 'node:fs'; 4 8 import { Base64 } from './base64.js'; 5 9 import { ASN1 } from './asn1.js'; ··· 8 12 const 9 13 colYellow = '\x1b[33m', 10 14 colBlue = '\x1b[34m', 11 - colReset = '\x1b[0m'; 15 + colReset = '\x1b[0m', 16 + reDataURI = /^data:(?:[a-z-]+[/][a-z.+-]+;)?base64,([A-Za-z0-9+/=\s]+)$/; 12 17 13 18 function print(value, indent) { 14 19 if (indent === undefined) indent = ''; ··· 40 45 return s; 41 46 } 42 47 43 - let content = fs.readFileSync(process.argv[2]); 48 + const filename = process.argv[2]; 49 + const match = reDataURI.exec(filename); 50 + let content = match 51 + ? Buffer.from(match[1]) 52 + : fs.readFileSync(filename); 44 53 try { // try PEM first 45 54 content = Base64.unarmor(content); 46 - } catch (e) { // try DER/BER then 55 + } catch (ignore) { // try DER/BER then 47 56 } 48 57 let result = ASN1.decode(content); 49 58 content = null; 50 59 const t0 = performance.now(); 51 - const types = Defs.commonTypes 52 - .map(type => { 53 - const stats = Defs.match(result, type); 54 - return { type, match: stats.recognized / stats.total }; 55 - }) 56 - .sort((a, b) => b.match - a.match); 57 - const t1 = performance.now(); 58 - console.log('Parsed in ' + (t1 - t0).toFixed(2) + ' ms; possible types:'); 59 - for (const t of types) 60 - console.log((t.match * 100).toFixed(2).padStart(6) + '% ' + t.type.description); 61 - Defs.match(result, types[0].type); 62 - // const stats = Defs.match(result, types[0].type); 63 - // console.log('Stats:', stats); 64 - console.log('Parsed as:', result.def); 65 - // const type = searchType(process.argv[2]); 66 - // const stats = applyDef(result, type); 60 + if (process.argv.length == 5) { 61 + Defs.match(result, Defs.moduleAndType(Defs.RFC[process.argv[3]], process.argv[4])); 62 + } else { 63 + const types = Defs.commonTypes 64 + .map(type => { 65 + const stats = Defs.match(result, type); 66 + return { type, match: stats.recognized / stats.total }; 67 + }) 68 + .sort((a, b) => b.match - a.match); 69 + const t1 = performance.now(); 70 + console.log('Parsed in ' + (t1 - t0).toFixed(2) + ' ms; possible types:'); 71 + for (const t of types) 72 + console.log((t.match * 100).toFixed(2).padStart(6) + '% ' + t.type.description); 73 + Defs.match(result, types[0].type); 74 + // const stats = Defs.match(result, types[0].type); 75 + // console.log('Stats:', stats); 76 + console.log('Parsed as:', result.def); 77 + // const type = searchType(process.argv[2]); 78 + // const stats = applyDef(result, type); 79 + } 67 80 console.log(print(result)); 68 81 // console.log('Stats:', (stats.recognized * 100 / stats.total).toFixed(2) + '%'); 69 82 // // print(result, searchType(process.argv[2]), stats);
+69
eslint.config.js
··· 1 + import globals from 'globals'; 2 + import js from '@eslint/js'; 3 + 4 + export default [ 5 + js.configs.recommended, 6 + { 7 + languageOptions: { 8 + globals: { 9 + ...globals.browser, 10 + ...globals.node, 11 + Uint8Array: 'readonly', 12 + }, 13 + ecmaVersion: 2015, 14 + }, 15 + rules: { 16 + indent: ['error', 4], 17 + 'no-trailing-spaces': ['error'], 18 + 'linebreak-style': ['error', 'unix'], 19 + 'eol-last': ['error', 'always'], 20 + semi: ['warn', 'always'], 21 + quotes: [ 'error', 'single', { 22 + avoidEscape: true, 23 + }], 24 + 'no-var': ['warn'], 25 + 'comma-dangle': ['error', 'always-multiline'], 26 + 'no-unused-vars': ['error', { 27 + caughtErrorsIgnorePattern: 'ignore', 28 + }], 29 + }, 30 + }, 31 + { 32 + files: ['defs.js'], 33 + languageOptions: { 34 + ecmaVersion: 2020, // by use of optional chaining operator (?.) and null coalesching operator (??) 35 + }, 36 + }, 37 + { 38 + files: ['oids.js'], 39 + rules: { 40 + indent: 'off', 41 + quotes: ['warn', 'double'], 42 + }, 43 + }, 44 + { 45 + files: ['tags.js', 'rfcdef.js'], 46 + rules: { 47 + indent: [ 48 + 'error', 49 + 2, 50 + { 51 + ignoredNodes: [ 52 + "Program > ExpressionStatement > CallExpression > FunctionExpression > BlockStatement > ExpressionStatement[directive='use strict']:first-child", 53 + ], 54 + }, 55 + ], 56 + 'comma-dangle': 'off', 57 + quotes: ['warn', 'double'], 58 + }, 59 + }, 60 + { 61 + files: ['test.js', 'parseRFC.js', 'dumpASN1.js', 'testDefs.js', 'eslint.config.js'], 62 + languageOptions: { 63 + ecmaVersion: 'latest', 64 + }, 65 + rules: { 66 + strict: ['error', 'global'], 67 + }, 68 + }, 69 + ];
+9
examples/cms-password.p7m
··· 1 + This is a PKCS#7/CMS encrypted with passwod. 2 + $ echo content | openssl cms -encrypt -pwri_password test -aes256 -outform pem -out examples/cms-password.p7m 3 + -----BEGIN CMS----- 4 + MIHYBgkqhkiG9w0BBwOggcowgccCAQMxgYOjgYACAQCgGwYJKoZIhvcNAQUMMA4E 5 + CED/DSxXMtH6AgIIADAsBgsqhkiG9w0BCRADCTAdBglghkgBZQMEASoEEDIQbJMC 6 + Sfb3LpwHduj/meQEMKwrwq5M4V0stztm6OUTAsFY2zKDY20SApwSEeEcAh9TM42E 7 + 1palnHeqHTBpC8pIpjA8BgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBByt+scPrdM 8 + giR7WUOJyB3hgBDcD3UDMtZSep8X/3yy1/Yq 9 + -----END CMS-----
+12
examples/crl-rfc5280.b64
··· 1 + CRL example from RFC5280 as found here: 2 + https://csrc.nist.gov/projects/pki-testing/sample-certificates-and-crls 3 + 4 + begin-base64 644 crl-rfc5280.der 5 + MIIBYDCBygIBATANBgkqhkiG9w0BAQUFADBDMRMwEQYKCZImiZPyLGQBGRYDY29tMRcwFQYKCZIm 6 + iZPyLGQBGRYHZXhhbXBsZTETMBEGA1UEAxMKRXhhbXBsZSBDQRcNMDUwMjA1MTIwMDAwWhcNMDUw 7 + MjA2MTIwMDAwWjAiMCACARIXDTA0MTExOTE1NTcwM1owDDAKBgNVHRUEAwoBAaAvMC0wHwYDVR0j 8 + BBgwFoAUCGivhTPIOUp6+IKTjnBqSiCELDIwCgYDVR0UBAMCAQwwDQYJKoZIhvcNAQEFBQADgYEA 9 + ItwYffcIzsx10NBqm60Q9HYjtIFutW2+DvsVFGzIF20f7pAXom9g5L2qjFXejoRvkvifEBInr0rU 10 + L4XiNkR9qqNMJTgV/wD9Pn7uPSYS69jnK2LiK8NGgO94gtEVxtCccmrLznrtZ5mLbnCBfUNCdMGm 11 + r8FVF6IzTNYGmCuk/C4= 12 + ====
+45
examples/crl-rfc5280.b64.dump
··· 1 + CertificateList SEQUENCE @0+352 (constructed): (3 elem) 2 + tbsCertList TBSCertList SEQUENCE @4+202 (constructed): (7 elem) 3 + version Version INTEGER @7+1: 1 4 + signature AlgorithmIdentifier SEQUENCE @10+13 (constructed): (2 elem) 5 + algorithm OBJECT_IDENTIFIER @12+9: 1.2.840.113549.1.1.5|sha1WithRSAEncryption|PKCS #1 6 + parameters ANY NULL @23+0 7 + issuer rdnSequence Name SEQUENCE @25+67 (constructed): (3 elem) 8 + RelativeDistinguishedName SET @27+19 (constructed): (1 elem) 9 + AttributeTypeAndValue SEQUENCE @29+17 (constructed): (2 elem) 10 + type AttributeType OBJECT_IDENTIFIER @31+10: 0.9.2342.19200300.100.1.25|domainComponent|Men are from Mars, this OID is from Pluto 11 + value AttributeValue [?] IA5String @43+3: com 12 + RelativeDistinguishedName SET @48+23 (constructed): (1 elem) 13 + AttributeTypeAndValue SEQUENCE @50+21 (constructed): (2 elem) 14 + type AttributeType OBJECT_IDENTIFIER @52+10: 0.9.2342.19200300.100.1.25|domainComponent|Men are from Mars, this OID is from Pluto 15 + value AttributeValue [?] IA5String @64+7: example 16 + RelativeDistinguishedName SET @73+19 (constructed): (1 elem) 17 + AttributeTypeAndValue SEQUENCE @75+17 (constructed): (2 elem) 18 + type AttributeType OBJECT_IDENTIFIER @77+3: 2.5.4.3|commonName|X.520 DN component 19 + value AttributeValue [?] PrintableString @82+10: Example CA 20 + thisUpdate utcTime Time UTCTime @94+13: 2005-02-05 12:00:00 UTC 21 + nextUpdate utcTime Time UTCTime @109+13: 2005-02-06 12:00:00 UTC 22 + revokedCertificates SEQUENCE @124+34 (constructed): (1 elem) 23 + SEQUENCE @126+32 (constructed): (3 elem) 24 + userCertificate CertificateSerialNumber INTEGER @128+1: 18 25 + revocationDate utcTime Time UTCTime @131+13: 2004-11-19 15:57:03 UTC 26 + crlEntryExtensions Extensions SEQUENCE @146+12 (constructed): (1 elem) 27 + Extension SEQUENCE @148+10 (constructed): (2 elem) 28 + extnID OBJECT_IDENTIFIER @150+3: 2.5.29.21|cRLReason|X.509 extension 29 + extnValue OCTET_STRING @155+3 (encapsulates): (3 byte)|0A0101 30 + ENUMERATED @157+1: 1 31 + crlExtensions [0] @160+47 (constructed): (1 elem) 32 + Extensions SEQUENCE @162+45 (constructed): (2 elem) 33 + Extension SEQUENCE @164+31 (constructed): (2 elem) 34 + extnID OBJECT_IDENTIFIER @166+3: 2.5.29.35|authorityKeyIdentifier|X.509 extension 35 + extnValue OCTET_STRING @171+24 (encapsulates): (24 byte)|301680140868AF8533C8394A7AF882938E706A4A20842C32 36 + SEQUENCE @173+22 (constructed): (1 elem) 37 + [0] @175+20: (20 byte)|0868AF8533C8394A7AF882938E706A4A20842C32 38 + Extension SEQUENCE @197+10 (constructed): (2 elem) 39 + extnID OBJECT_IDENTIFIER @199+3: 2.5.29.20|cRLNumber|X.509 extension 40 + extnValue OCTET_STRING @204+3 (encapsulates): (3 byte)|02010C 41 + INTEGER @206+1: 12 42 + signatureAlgorithm AlgorithmIdentifier SEQUENCE @209+13 (constructed): (2 elem) 43 + algorithm OBJECT_IDENTIFIER @211+9: 1.2.840.113549.1.1.5|sha1WithRSAEncryption|PKCS #1 44 + parameters ANY NULL @222+0 45 + signature BIT_STRING @224+129: (1024 bit)|0010001011011100000110000111110111110111000010001100111011001100011101011101000011010000011010101001101110101101000100001111010001110110001000111011010010000001011011101011010101101101101111100000111011111011000101010001010001101100110010000001011101101101000111111110111010010000000101111010001001101111011000001110010010111101101010101000110001010101110111101000111010000100011011111001001011111000100111110001000000010010001001111010111101001010110101000010111110000101111000100011011001000100011111011010101010100011010011000010010100111000000101011111111100000000111111010011111001111110111011100011110100100110000100101110101111011000111001110010101101100010111000100010101111000011010001101000000011101111011110001000001011010001000101011100011011010000100111000111001001101010110010111100111001111010111011010110011110011001100010110110111001110000100000010111110101000011010000100111010011000001101001101010111111000001010101010001011110100010001100110100110011010110000001101001100000101011101001001111110000101110
+60
examples/ed25519.cer.dump
··· 1 + Certificate SEQUENCE @0+383 (constructed): (3 elem) 2 + tbsCertificate TBSCertificate SEQUENCE @4+305 (constructed): (8 elem) 3 + version [0] @8+3 (constructed): (1 elem) 4 + Version INTEGER @10+1: 2 5 + serialNumber CertificateSerialNumber INTEGER @13+20: (159 bit)|711090297755414526861352146244170174161660335942 6 + signature AlgorithmIdentifier SEQUENCE @35+5 (constructed): (1 elem) 7 + algorithm OBJECT_IDENTIFIER @37+3: 1.3.101.112|curveEd25519|EdDSA 25519 signature algorithm 8 + issuer rdnSequence Name SEQUENCE @42+53 (constructed): (3 elem) 9 + RelativeDistinguishedName SET @44+11 (constructed): (1 elem) 10 + AttributeTypeAndValue SEQUENCE @46+9 (constructed): (2 elem) 11 + type AttributeType OBJECT_IDENTIFIER @48+3: 2.5.4.6|countryName|X.520 DN component 12 + value AttributeValue [?] PrintableString @53+2: IT 13 + RelativeDistinguishedName SET @57+15 (constructed): (1 elem) 14 + AttributeTypeAndValue SEQUENCE @59+13 (constructed): (2 elem) 15 + type AttributeType OBJECT_IDENTIFIER @61+3: 2.5.4.7|localityName|X.520 DN component 16 + value AttributeValue [?] UTF8String @66+6: Milano 17 + RelativeDistinguishedName SET @74+21 (constructed): (1 elem) 18 + AttributeTypeAndValue SEQUENCE @76+19 (constructed): (2 elem) 19 + type AttributeType OBJECT_IDENTIFIER @78+3: 2.5.4.3|commonName|X.520 DN component 20 + value AttributeValue [?] UTF8String @83+12: Test ed25519 21 + validity Validity SEQUENCE @97+30 (constructed): (2 elem) 22 + notBefore utcTime Time UTCTime @99+13: 2020-09-02 13:25:26 UTC 23 + notAfter utcTime Time UTCTime @114+13: 2030-09-02 13:25:26 UTC 24 + subject rdnSequence Name SEQUENCE @129+53 (constructed): (3 elem) 25 + RelativeDistinguishedName SET @131+11 (constructed): (1 elem) 26 + AttributeTypeAndValue SEQUENCE @133+9 (constructed): (2 elem) 27 + type AttributeType OBJECT_IDENTIFIER @135+3: 2.5.4.6|countryName|X.520 DN component 28 + value AttributeValue [?] PrintableString @140+2: IT 29 + RelativeDistinguishedName SET @144+15 (constructed): (1 elem) 30 + AttributeTypeAndValue SEQUENCE @146+13 (constructed): (2 elem) 31 + type AttributeType OBJECT_IDENTIFIER @148+3: 2.5.4.7|localityName|X.520 DN component 32 + value AttributeValue [?] UTF8String @153+6: Milano 33 + RelativeDistinguishedName SET @161+21 (constructed): (1 elem) 34 + AttributeTypeAndValue SEQUENCE @163+19 (constructed): (2 elem) 35 + type AttributeType OBJECT_IDENTIFIER @165+3: 2.5.4.3|commonName|X.520 DN component 36 + value AttributeValue [?] UTF8String @170+12: Test ed25519 37 + subjectPublicKeyInfo SubjectPublicKeyInfo SEQUENCE @184+42 (constructed): (2 elem) 38 + algorithm AlgorithmIdentifier SEQUENCE @186+5 (constructed): (1 elem) 39 + algorithm OBJECT_IDENTIFIER @188+3: 1.3.101.112|curveEd25519|EdDSA 25519 signature algorithm 40 + subjectPublicKey BIT_STRING @193+33: (256 bit)|0011101110101001001011111111110111001011000101110110011011011110010000001010001010010010111101111001001111011110001100001111100000001010001000111010100000110001001000010101110111010000000001111101100001100011001001000010111011111111011010000010000110000101 41 + extensions [3] @228+83 (constructed): (1 elem) 42 + Extensions SEQUENCE @230+81 (constructed): (3 elem) 43 + Extension SEQUENCE @232+29 (constructed): (2 elem) 44 + extnID OBJECT_IDENTIFIER @234+3: 2.5.29.14|subjectKeyIdentifier|X.509 extension 45 + extnValue OCTET_STRING @239+22 (encapsulates): (22 byte)|04146BA5BDCF9DFA235978126417AE1E72D89A804AE8 46 + OCTET_STRING @241+20: (20 byte)|6BA5BDCF9DFA235978126417AE1E72D89A804AE8 47 + Extension SEQUENCE @263+31 (constructed): (2 elem) 48 + extnID OBJECT_IDENTIFIER @265+3: 2.5.29.35|authorityKeyIdentifier|X.509 extension 49 + extnValue OCTET_STRING @270+24 (encapsulates): (24 byte)|301680146BA5BDCF9DFA235978126417AE1E72D89A804AE8 50 + SEQUENCE @272+22 (constructed): (1 elem) 51 + [0] @274+20: (20 byte)|6BA5BDCF9DFA235978126417AE1E72D89A804AE8 52 + Extension SEQUENCE @296+15 (constructed): (3 elem) 53 + extnID OBJECT_IDENTIFIER @298+3: 2.5.29.19|basicConstraints|X.509 extension 54 + critical BOOLEAN @303+1: true 55 + extnValue OCTET_STRING @306+5 (encapsulates): (5 byte)|30030101FF 56 + SEQUENCE @308+3 (constructed): (1 elem) 57 + BOOLEAN @310+1: true 58 + signatureAlgorithm AlgorithmIdentifier SEQUENCE @313+5 (constructed): (1 elem) 59 + algorithm OBJECT_IDENTIFIER @315+3: 1.3.101.112|curveEd25519|EdDSA 25519 signature algorithm 60 + signature BIT_STRING @320+65: (512 bit)|01101111011100110111011110111110001010001001011001011010001100110011011011010111111001010011010011111101100100001111001111111101010000000111111100011111000000101111100100000000010101111111001000010110000011110001011001101011000001001011111101100101100001001011011010011000110100101101000011010010101111110100110011010110011011110000111010110110111000101110100010011101000001001010001111100000100110010101000011111001110000100110110111011110011100111010110100011101001101010101011110000101011001011000011000000110
+8
examples/ldapmessage.b64
··· 1 + LDAPMessage example as found on ldap.com. 2 + 3 + Original link: 4 + https://ldap.com/ldapv3-wire-protocol-reference-ldap-message/ 5 + 6 + begin-base64 644 ldapmessage.der 7 + MDUCAQVKEWRjPWV4YW1wbGUsZGM9Y29toB0wGwQWMS4yLjg0MC4xMTM1NTYuMS40LjgwNQEB/w== 8 + ====
+7
examples/ldapmessage.b64.dump
··· 1 + LDAPMessage SEQUENCE @0+53 (constructed): (3 elem) 2 + messageID MessageID INTEGER @2+1: 5 3 + protocolOp delRequest CHOICE Application_10 @5+17: (17 byte)|dc=example,dc=com 4 + Controls [?] [0] @24+29 (constructed): (1 elem) 5 + AttributeTypeAndValue SEQUENCE @26+27 (constructed): (2 elem) 6 + type AttributeType [?] OCTET_STRING @28+22: (22 byte)|1.2.840.113556.1.4.805 7 + value AttributeValue [?] BOOLEAN @52+1: true
+18
examples/pkcs1.pem
··· 1 + PKCS#1 RSA key 2 + $ openssl genrsa -out examples/pkcs8-rsa.pem 1024 3 + $ openssl rsa -in examples/pkcs8-rsa.pem -out examples/pkcs1.pem -traditional 4 + -----BEGIN RSA PRIVATE KEY----- 5 + MIICXQIBAAKBgQCmy23ifN9pi5LO4MR3LUhU0v+LZmv78H+jd+R6kFcWZf1qW4yf 6 + KTDkryjjLlIhYqxmzXCqGyaIjj7uJoorWf7KfkxpOuJrh4swJ/WGhCn9i+voW/7T 7 + sOXfDp1yqrEhaQKwdPot1ZAB78TNsecwX/SODTEMCk95jvx1j5cDxPlskwIDAQAB 8 + AoGBAINn4bp+BsVwYMj768y4sDOjyBBbMNfcMbLn0el9rh7HW09fsPnzycFg/iV9 9 + aNdEle6oDAr4OPN8nbeiRVjCHijEnVdHCwAtkKODyuu1ghpZWD0VUC8AEskjX4Bs 10 + Ysl/HjyvvHIRj89gdDFoElgB4GzHKTzeZNJBM5qtUW57zBCBAkEA0A6N5l98MglL 11 + cypWKM7+3DXteWt86mKXYUVF33HY28Z+oUVlU0v8m8XxpoAjkicYnC1JOSSlvWRk 12 + EWlTMgHW5QJBAM06yIHMR6p3apgpwOUp49DbtaQ8NmhCV4NBoFHa+vT2Fk8twOcq 13 + O9OzP4svhKbPNfB4HnxGbmd/+OVT3lySxhcCQHRPPpqD1K0wLwKxrzrfBPDcIOaY 14 + 5VsuRIw3KqmQPngWTiIf5lYbi5sVnFLFHZ2Nx58/XcjZKOJopdxp8f1ps9UCQQC3 15 + rOqSsF9bg3DVKllHQAxyepDAolsXSHjGMk/nspJz9mLVDl/dBAFzYLN4QFj6ae0e 16 + gILYOrjIzNHXfQ4/z+SVAkBPebkAzpGFgzVzu6VOGx0Vft/ow3/DKNJSDM58yASp 17 + ootY2TdibrrV/ellNLvuTiku6AEM/8jbHlRsmfxRe0xn 18 + -----END RSA PRIVATE KEY-----
+10
examples/pkcs1.pem.dump
··· 1 + RSAPrivateKey SEQUENCE @0+605 (constructed): (9 elem) 2 + version Version INTEGER @4+1: 0 3 + modulus INTEGER @7+129: (1024 bit)|117127183230921204401013393277767517103803021018182691416238029726599496957198017684901559383009459523071384847726671610377559004781710040051270748910270447756432733966622455162759462672603884318432883204215291756888413811504344870556870978773843838353155520698675084344179957236491745093327422201227604749459 4 + publicExponent INTEGER @139+3: 65537 5 + privateExponent INTEGER @144+129: (1024 bit)|92276282475226568589241550905865273709561889943250510752753436239739158443231274686159532997597455087892667385718350070754140814118578097684166368734227728473322161416664690885212698653195373932779792506838124961141214987311742627151011567342689730655630521241854903774681567286735997541758916977964830429313 6 + prime1 INTEGER @276+65: (512 bit)|10896821561662485361386011233938116142526936125648167362054539174681694465821232677159478832161550957167298418313068706031799276527005193877616679381489381 7 + prime2 INTEGER @343+65: (512 bit)|10748747473575365133625210720374663113238804836624829882840358384492696273600075746246298849279878235356215808273663889910189484797595139778277124898735639 8 + exponent1 INTEGER @410+64: (511 bit)|6091625365131581796315047890165719534213640521161662994088715561328917102465668272778610952193459304175325574129665657306361751287362700277617869028176853 9 + exponent2 INTEGER @476+65: (512 bit)|9619864112105977791898517014707043200694399482542575521432448550956476604540013165392532656448448632323473488540572223305800601817570919153380021725291669 10 + coefficient INTEGER @543+64: (511 bit)|4162468593383244686217782691133418477400302049612992866028022118893358867845916127581019785866484075341057799618361552573853678007698434146811407259880551
+18
examples/pkcs8-rsa.pem
··· 1 + PKCS#8 RSA key 2 + $ openssl genrsa -out examples/pkcs8-rsa.pem 1024 3 + -----BEGIN PRIVATE KEY----- 4 + MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKbLbeJ832mLks7g 5 + xHctSFTS/4tma/vwf6N35HqQVxZl/WpbjJ8pMOSvKOMuUiFirGbNcKobJoiOPu4m 6 + iitZ/sp+TGk64muHizAn9YaEKf2L6+hb/tOw5d8OnXKqsSFpArB0+i3VkAHvxM2x 7 + 5zBf9I4NMQwKT3mO/HWPlwPE+WyTAgMBAAECgYEAg2fhun4GxXBgyPvrzLiwM6PI 8 + EFsw19wxsufR6X2uHsdbT1+w+fPJwWD+JX1o10SV7qgMCvg483ydt6JFWMIeKMSd 9 + V0cLAC2Qo4PK67WCGllYPRVQLwASySNfgGxiyX8ePK+8chGPz2B0MWgSWAHgbMcp 10 + PN5k0kEzmq1RbnvMEIECQQDQDo3mX3wyCUtzKlYozv7cNe15a3zqYpdhRUXfcdjb 11 + xn6hRWVTS/ybxfGmgCOSJxicLUk5JKW9ZGQRaVMyAdblAkEAzTrIgcxHqndqmCnA 12 + 5Snj0Nu1pDw2aEJXg0GgUdr69PYWTy3A5yo707M/iy+Eps818HgefEZuZ3/45VPe 13 + XJLGFwJAdE8+moPUrTAvArGvOt8E8Nwg5pjlWy5EjDcqqZA+eBZOIh/mVhuLmxWc 14 + UsUdnY3Hnz9dyNko4mil3Gnx/Wmz1QJBALes6pKwX1uDcNUqWUdADHJ6kMCiWxdI 15 + eMYyT+eyknP2YtUOX90EAXNgs3hAWPpp7R6Agtg6uMjM0dd9Dj/P5JUCQE95uQDO 16 + kYWDNXO7pU4bHRV+3+jDf8Mo0lIMznzIBKmii1jZN2JuutX96WU0u+5OKS7oAQz/ 17 + yNseVGyZ/FF7TGc= 18 + -----END PRIVATE KEY-----
+16
examples/pkcs8-rsa.pem.dump
··· 1 + PrivateKeyInfo SEQUENCE @0+631 (constructed): (3 elem) 2 + version Version INTEGER @4+1: 0 3 + privateKeyAlgorithm AlgorithmIdentifier SEQUENCE @7+13 (constructed): (2 elem) 4 + algorithm OBJECT_IDENTIFIER @9+9: 1.2.840.113549.1.1.1|rsaEncryption|PKCS #1 5 + parameters ANY NULL @20+0 6 + privateKey PrivateKey OCTET_STRING @22+609 (encapsulates): (609 byte)|3082025D02010002818100A6CB6DE27CDF698B92CEE0C4772D4854D2FF8B666BFBF07FA377E47A90571665FD6A5B8C9F2930E4AF28E32E522162AC66CD70AA1B26888E3EEE268A2B59FECA7E4C693AE26B878B3027F5868429FD8BEBE85BFED3B0E5DF0E9D72AAB1216902B074FA2DD59001EFC4CDB1E7305FF48E0D310C0A4F798EFC758F9703C4F96C930203010001028181008367E1BA7E06C57060C8FBEBCCB8B033A3C8105B30D7DC31B2E7D1E97DAE1EC75B4F5FB0F9F3C9C160FE257D68D74495EEA80C0AF838F37C9DB7A24558C21E28C49D57470B002D90A383CAEBB5821A59583D15502F0012C9235F806C62C97F1E3CAFBC72118FCF60743168125801E06CC7293CDE64D241339AAD516E7BCC1081024100D00E8DE65F7C32094B732A5628CEFEDC35ED796B7CEA6297614545DF71D8DBC67EA14565534BFC9BC5F1A680239227189C2D493924A5BD64641169533201D6E5024100CD3AC881CC47AA776A9829C0E529E3D0DBB5A43C366842578341A051DAFAF4F6164F2DC0E72A3BD3B33F8B2F84A6CF35F0781E7C466E677FF8E553DE5C92C6170240744F3E9A83D4AD302F02B1AF3ADF04F0DC20E698E55B2E448C372AA9903E78164E221FE6561B8B9B159C52C51D9D8DC79F3F5DC8D928E268A5DC69F1FD69B3D5024100B7ACEA92B05F5B8370D52A5947400C727A90C0A25B174878C6324FE7B29273F662D50E5FDD04017360B3784058FA69ED1E8082D83AB8C8CCD1D77D0E3FCFE49502404F79B900CE9185833573BBA54E1B1D157EDFE8C37FC328D2520CCE7CC804A9A28B58D937626EBAD5FDE96534BBEE4E292EE8010CFFC8DB1E546C99FC517B4C67 7 + SEQUENCE @26+605 (constructed): (9 elem) 8 + INTEGER @30+1: 0 9 + INTEGER @33+129: (1024 bit)|117127183230921204401013393277767517103803021018182691416238029726599496957198017684901559383009459523071384847726671610377559004781710040051270748910270447756432733966622455162759462672603884318432883204215291756888413811504344870556870978773843838353155520698675084344179957236491745093327422201227604749459 10 + INTEGER @165+3: 65537 11 + INTEGER @170+129: (1024 bit)|92276282475226568589241550905865273709561889943250510752753436239739158443231274686159532997597455087892667385718350070754140814118578097684166368734227728473322161416664690885212698653195373932779792506838124961141214987311742627151011567342689730655630521241854903774681567286735997541758916977964830429313 12 + INTEGER @302+65: (512 bit)|10896821561662485361386011233938116142526936125648167362054539174681694465821232677159478832161550957167298418313068706031799276527005193877616679381489381 13 + INTEGER @369+65: (512 bit)|10748747473575365133625210720374663113238804836624829882840358384492696273600075746246298849279878235356215808273663889910189484797595139778277124898735639 14 + INTEGER @436+64: (511 bit)|6091625365131581796315047890165719534213640521161662994088715561328917102465668272778610952193459304175325574129665657306361751287362700277617869028176853 15 + INTEGER @502+65: (512 bit)|9619864112105977791898517014707043200694399482542575521432448550956476604540013165392532656448448632323473488540572223305800601817570919153380021725291669 16 + INTEGER @569+64: (511 bit)|4162468593383244686217782691133418477400302049612992866028022118893358867845916127581019785866484075341057799618361552573853678007698434146811407259880551
+118
examples/sig-p256-der.p7m.dump
··· 1 + ContentInfo SEQUENCE @0+10868 (constructed): (2 elem) 2 + contentType ContentType OBJECT_IDENTIFIER @4+9: 1.2.840.113549.1.7.2|signedData|PKCS #7 3 + content [0] @15+10853 (constructed): (1 elem) 4 + SignedData SEQUENCE @19+10849 (constructed): (5 elem) 5 + version CMSVersion INTEGER @23+1: 1 6 + digestAlgorithms DigestAlgorithmIdentifiers SET @26+15 (constructed): (1 elem) 7 + DigestAlgorithmIdentifier SEQUENCE @28+13 (constructed): (2 elem) 8 + algorithm OBJECT_IDENTIFIER @30+9: 2.16.840.1.101.3.4.2.1|sha-256|NIST Algorithm 9 + parameters ANY NULL @41+0 10 + encapContentInfo EncapsulatedContentInfo SEQUENCE @43+10053 (constructed): (2 elem) 11 + eContentType ContentType OBJECT_IDENTIFIER @47+9: 1.2.840.113549.1.7.1|data|PKCS #7 12 + eContent [0] @58+10038 (constructed): (1 elem) 13 + OCTET_STRING @62+10034: (10034 byte)|Inizio contenuto.|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA|Fine contenuto. 14 + CertificateSet [?] [0] @10100+370 (constructed): (1 elem) 15 + certificate CertificateChoices SEQUENCE @10104+366 (constructed): (3 elem) 16 + tbsCertificate TBSCertificate SEQUENCE @10108+276 (constructed): (8 elem) 17 + version [0] @10112+3 (constructed): (1 elem) 18 + Version INTEGER @10114+1: 2 19 + serialNumber CertificateSerialNumber INTEGER @10117+16: (127 bit)|128087855099855233032551836648087377254 20 + signature AlgorithmIdentifier SEQUENCE @10135+10 (constructed): (1 elem) 21 + algorithm OBJECT_IDENTIFIER @10137+8: 1.2.840.10045.4.3.2|ecdsaWithSHA256|ANSI X9.62 ECDSA algorithm with SHA256 22 + issuer rdnSequence Name SEQUENCE @10147+15 (constructed): (1 elem) 23 + RelativeDistinguishedName SET @10149+13 (constructed): (1 elem) 24 + AttributeTypeAndValue SEQUENCE @10151+11 (constructed): (2 elem) 25 + type AttributeType OBJECT_IDENTIFIER @10153+3: 2.5.4.3|commonName|X.520 DN component 26 + value AttributeValue [?] UTF8String @10158+4: Test 27 + validity Validity SEQUENCE @10164+30 (constructed): (2 elem) 28 + notBefore utcTime Time UTCTime @10166+13: 2018-07-16 14:56:35 UTC 29 + notAfter utcTime Time UTCTime @10181+13: 2019-07-16 14:56:35 UTC 30 + subject rdnSequence Name SEQUENCE @10196+15 (constructed): (1 elem) 31 + RelativeDistinguishedName SET @10198+13 (constructed): (1 elem) 32 + AttributeTypeAndValue SEQUENCE @10200+11 (constructed): (2 elem) 33 + type AttributeType OBJECT_IDENTIFIER @10202+3: 2.5.4.3|commonName|X.520 DN component 34 + value AttributeValue [?] UTF8String @10207+4: Test 35 + subjectPublicKeyInfo SubjectPublicKeyInfo SEQUENCE @10213+89 (constructed): (2 elem) 36 + algorithm AlgorithmIdentifier SEQUENCE @10215+19 (constructed): (2 elem) 37 + algorithm OBJECT_IDENTIFIER @10217+7: 1.2.840.10045.2.1|ecPublicKey|ANSI X9.62 public key type 38 + parameters ANY OBJECT_IDENTIFIER @10226+8: 1.2.840.10045.3.1.7|prime256v1|ANSI X9.62 named elliptic curve 39 + subjectPublicKey BIT_STRING @10236+66: (520 bit)|0000010000100100010011001011011011001100000111000110100100100001111111110100100111011000101111100010011000111110000010110111110011010000010110100010100001100101010110101000010001101100100000100101111011001010111001101110110011100110100110100110101000100001110001001110010011110010001000000010010011000000111010011111010011100100011101001001110010011000101000011010110111110010010111111001000011011110011011101111100101001000001010110110011100011000100000111010011100001110101101001011011110101011100111110000011001000011 40 + extensions [3] @10304+82 (constructed): (1 elem) 41 + Extensions SEQUENCE @10306+80 (constructed): (3 elem) 42 + Extension SEQUENCE @10308+14 (constructed): (3 elem) 43 + extnID OBJECT_IDENTIFIER @10310+3: 2.5.29.15|keyUsage|X.509 extension 44 + critical BOOLEAN @10315+1: true 45 + extnValue OCTET_STRING @10318+4 (encapsulates): (4 byte)|030204F0 46 + BIT_STRING @10320+2: (4 bit)|1111 47 + Extension SEQUENCE @10324+29 (constructed): (2 elem) 48 + extnID OBJECT_IDENTIFIER @10326+3: 2.5.29.14|subjectKeyIdentifier|X.509 extension 49 + extnValue OCTET_STRING @10331+22 (encapsulates): (22 byte)|0414C3C084DF7B040DB038AF518CE397F6EC20D626E6 50 + OCTET_STRING @10333+20: (20 byte)|C3C084DF7B040DB038AF518CE397F6EC20D626E6 51 + Extension SEQUENCE @10355+31 (constructed): (2 elem) 52 + extnID OBJECT_IDENTIFIER @10357+3: 2.5.29.35|authorityKeyIdentifier|X.509 extension 53 + extnValue OCTET_STRING @10362+24 (encapsulates): (24 byte)|30168014C3C084DF7B040DB038AF518CE397F6EC20D626E6 54 + SEQUENCE @10364+22 (constructed): (1 elem) 55 + [0] @10366+20: (20 byte)|C3C084DF7B040DB038AF518CE397F6EC20D626E6 56 + signatureAlgorithm AlgorithmIdentifier SEQUENCE @10388+10 (constructed): (1 elem) 57 + algorithm OBJECT_IDENTIFIER @10390+8: 1.2.840.10045.4.3.2|ecdsaWithSHA256|ANSI X9.62 ECDSA algorithm with SHA256 58 + signature BIT_STRING @10400+72 (encapsulates): (568 bit)|0011000001000101000000100010000100000000110111100110000000011110010101110011110110101111101101011001101111000101010100011101010110001110001111100111101110011110110110100000011000010010110111010000000100010010100000000101101000100010000101111011011100110100011101011001101110001000010001000001011100000010001000000110011111000011111111011110011000000111100000001101010000011100000111010111101000111011100100000010100100011111001111010011100111000100110111000010111100100000011011011100110010111010001011111001100000101100000001101011011001111100000010011011001000110010 59 + SEQUENCE @10403+69 (constructed): (2 elem) 60 + INTEGER @10405+33: (256 bit)|100583279108105959323277080420227859612360091217401498640290749528265835693079 61 + INTEGER @10440+32: (255 bit)|46934510925111877438867701170553238261516280994969183555881415710868278719026 62 + signerInfos SignerInfos SET @10474+394 (constructed): (1 elem) 63 + SignerInfo SEQUENCE @10478+390 (constructed): (6 elem) 64 + version CMSVersion INTEGER @10482+1: 1 65 + sid issuerAndSerialNumber SignerIdentifier SEQUENCE @10485+35 (constructed): (2 elem) 66 + issuer rdnSequence Name SEQUENCE @10487+15 (constructed): (1 elem) 67 + RelativeDistinguishedName SET @10489+13 (constructed): (1 elem) 68 + AttributeTypeAndValue SEQUENCE @10491+11 (constructed): (2 elem) 69 + type AttributeType OBJECT_IDENTIFIER @10493+3: 2.5.4.3|commonName|X.520 DN component 70 + value AttributeValue [?] UTF8String @10498+4: Test 71 + serialNumber CertificateSerialNumber INTEGER @10504+16: (127 bit)|128087855099855233032551836648087377254 72 + digestAlgorithm DigestAlgorithmIdentifier SEQUENCE @10522+13 (constructed): (2 elem) 73 + algorithm OBJECT_IDENTIFIER @10524+9: 2.16.840.1.101.3.4.2.1|sha-256|NIST Algorithm 74 + parameters ANY NULL @10535+0 75 + SignedAttributes [?] [0] @10537+247 (constructed): (5 elem) 76 + Attribute SEQUENCE @10540+24 (constructed): (2 elem) 77 + type AttributeType OBJECT_IDENTIFIER @10542+9: 1.2.840.113549.1.9.3|contentType|PKCS #9 78 + values SET @10553+11 (constructed): (1 elem) 79 + AttributeValue [?] OBJECT_IDENTIFIER @10555+9: 1.2.840.113549.1.7.1|data|PKCS #7 80 + Attribute SEQUENCE @10566+28 (constructed): (2 elem) 81 + type AttributeType OBJECT_IDENTIFIER @10568+9: 1.2.840.113549.1.9.5|signingTime|PKCS #9 82 + values SET @10579+15 (constructed): (1 elem) 83 + AttributeValue [?] UTCTime @10581+13: 2018-07-16 14:56:35 UTC 84 + Attribute SEQUENCE @10596+42 (constructed): (2 elem) 85 + type AttributeType OBJECT_IDENTIFIER @10598+9: 1.2.840.113549.1.9.52|cmsAlgorithmProtection|RFC 6211 86 + values SET @10609+29 (constructed): (1 elem) 87 + AttributeValue [?] SEQUENCE @10611+27 (constructed): (2 elem) 88 + SEQUENCE @10613+13 (constructed): (2 elem) 89 + OBJECT_IDENTIFIER @10615+9: 2.16.840.1.101.3.4.2.1|sha-256|NIST Algorithm 90 + NULL @10626+0 91 + [1] @10628+10 (constructed): (1 elem) 92 + OBJECT_IDENTIFIER @10630+8: 1.2.840.10045.4.3.2|ecdsaWithSHA256|ANSI X9.62 ECDSA algorithm with SHA256 93 + Attribute SEQUENCE @10640+47 (constructed): (2 elem) 94 + type AttributeType OBJECT_IDENTIFIER @10642+9: 1.2.840.113549.1.9.4|messageDigest|PKCS #9 95 + values SET @10653+34 (constructed): (1 elem) 96 + AttributeValue [?] OCTET_STRING @10655+32: (32 byte)|724C51BBE76DA05AFB20CBE8EB037CDAE1AFD713125D2DC13D552DA9F442D24D 97 + Attribute SEQUENCE @10689+96 (constructed): (2 elem) 98 + type AttributeType OBJECT_IDENTIFIER @10691+11: 1.2.840.113549.1.9.16.2.47|signingCertificateV2|S/MIME Authenticated Attributes 99 + values SET @10704+81 (constructed): (1 elem) 100 + AttributeValue [?] SEQUENCE @10706+79 (constructed): (1 elem) 101 + SEQUENCE @10708+77 (constructed): (1 elem) 102 + SEQUENCE @10710+75 (constructed): (2 elem) 103 + OCTET_STRING @10712+32: (32 byte)|BABC08434C58267301E006861D27ECA125670E792797248E76A5717A5BF993C2 104 + SEQUENCE @10746+39 (constructed): (2 elem) 105 + SEQUENCE @10748+19 (constructed): (1 elem) 106 + [4] @10750+17 (constructed): (1 elem) 107 + SEQUENCE @10752+15 (constructed): (1 elem) 108 + SET @10754+13 (constructed): (1 elem) 109 + SEQUENCE @10756+11 (constructed): (2 elem) 110 + OBJECT_IDENTIFIER @10758+3: 2.5.4.3|commonName|X.520 DN component 111 + UTF8String @10763+4: Test 112 + INTEGER @10769+16: (127 bit)|128087855099855233032551836648087377254 113 + signatureAlgorithm SignatureAlgorithmIdentifier SEQUENCE @10787+10 (constructed): (1 elem) 114 + algorithm OBJECT_IDENTIFIER @10789+8: 1.2.840.10045.4.3.2|ecdsaWithSHA256|ANSI X9.62 ECDSA algorithm with SHA256 115 + signature SignatureValue OCTET_STRING @10799+71 (encapsulates): (71 byte)|3045022100F104302EABB428ECC8E71CE2E38F6CBED848A8E9A2B5D5DA19933E485C83CC7102200CBB40A0B7B9B2E048920622FB286FD14695F24CF650BDAA40B885F84C34BBB9 116 + SEQUENCE @10801+69 (constructed): (2 elem) 117 + INTEGER @10803+33: (256 bit)|109014796438891021115527318269695135443977065935278579101750090430030910049393 118 + INTEGER @10838+32: (252 bit)|5758600628818957274240888478952309319266088628943097300803726649607194983353
+1 -2
favicon.svg
··· 1 - <?xml version="1.0" encoding="UTF-8"?> 2 - <svg width="192" height="192" version="1.1" viewBox="0 0 50.8 50.8" xmlns="http://www.w3.org/2000/svg"><rect width="50.8" height="50.8" stroke-width=".25275"/><g transform="translate(0 .23698)"><g transform="translate(0 -.30431)"><path transform="matrix(.26458 0 0 .26458 .72192 -3.1337)" d="m65.411 87.986h-31.354l-4.9479 14.167h-20.156l28.802-77.761h23.906l28.802 77.761h-20.156zm-26.354-14.427h21.302l-10.625-30.938zm125.83-46.719v16.458q-6.4063-2.8646-12.5-4.3229t-11.51-1.4583q-7.1875 0-10.625 1.9792t-3.4375 6.1459q0 3.125 2.2917 4.8958 2.3438 1.7188 8.4375 2.9688l8.5417 1.7188q12.969 2.6042 18.438 7.9167 5.4688 5.3125 5.4688 15.104 0 12.865-7.6563 19.167-7.6042 6.25-23.281 6.25-7.3958 0-14.844-1.4062-7.4479-1.4063-14.896-4.1667v-16.927q7.4479 3.9583 14.375 5.9896 6.9792 1.9792 13.438 1.9792 6.5625 0 10.052-2.1875t3.4896-6.25q0-3.6458-2.3958-5.625-2.3438-1.9792-9.4271-3.5417l-7.7604-1.7188q-11.667-2.5-17.083-7.9688-5.3646-5.4688-5.3646-14.74 0-11.615 7.5-17.865 7.5-6.25 21.563-6.25 6.4063 0 13.177 0.98959 6.7708 0.9375 14.01 2.8646z" fill="#58a6ff" aria-label="AS"/><g transform="matrix(.26458 0 0 .26458 2.807 20.959)" style="white-space:pre" aria-label="N1"><path d="m7.2136 24.392h22.396l28.281 53.334v-53.334h19.01v77.761h-22.396l-28.281-53.334v53.334h-19.01z" fill="#58a6ff"/><path d="m109.19 88.298h17.708v-50.261l-18.177 3.75v-13.646l18.073-3.75h19.063v63.906h17.708v13.854h-54.375z" fill="#fffe58"/></g></g></g></svg> 1 + <svg xmlns="http://www.w3.org/2000/svg" width="192" height="192" viewBox="0 0 50.8 50.8"><path d="M0 0h50.8v50.8H0z"/><path fill="#58a6ff" d="M18.028 20.078H9.733l-1.31 3.749H3.092l7.62-20.574h6.325l7.62 20.574h-5.332zm-6.972-3.817h5.636L13.88 8.076zm33.292-12.36v4.354q-1.695-.758-3.308-1.144t-3.045-.386q-1.902 0-2.811.524t-.91 1.626q0 .827.607 1.295.62.455 2.232.786l2.26.454q3.432.69 4.879 2.095t1.446 3.996q0 3.404-2.025 5.072-2.012 1.653-6.16 1.653-1.957 0-3.927-.372t-3.942-1.102v-4.479q1.971 1.047 3.804 1.585 1.846.523 3.555.523 1.737 0 2.66-.578t.923-1.654q0-.965-.634-1.488-.62-.524-2.494-.937l-2.053-.455q-3.087-.661-4.52-2.108-1.42-1.447-1.42-3.9 0-3.073 1.985-4.727 1.984-1.654 5.705-1.654 1.695 0 3.486.262 1.792.248 3.707.758z" aria-label="AS"/><g aria-label="N1" style="white-space:pre"><path fill="#58a6ff" d="M4.716 27.345h5.925l7.483 14.111v-14.11h5.03v20.573h-5.926L9.745 33.81v14.11h-5.03z"/><path fill="#fffe58" d="M31.696 44.254h4.686V30.955l-4.81.993v-3.61l4.782-.993h5.044v16.908h4.685v3.666H31.696z"/></g></svg>
+2 -2
hex.js
··· 1 1 // Hex JavaScript decoder 2 - // Copyright (c) 2008-2024 Lapo Luchini <lapo@lapo.it> 2 + // Copyright (c) 2008 Lapo Luchini <lapo@lapo.it> 3 3 4 4 // Permission to use, copy, modify, and/or distribute this software for any 5 5 // purpose with or without fee is hereby granted, provided that the above 6 6 // copyright notice and this permission notice appear in all copies. 7 - // 7 + // 8 8 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 9 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 10 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-42
index-dark.css
··· 1 - :root { 2 - --main-bg-color: #0d1116; 3 - --main-text-color: #f8f8f2; 4 - --headline-text-color: #8be9fd; 5 - --button-border-color: #505050; 6 - --button-bg-color: #303030; 7 - --button-bghover-color: #404040; 8 - --input-border-color: #505050; 9 - --input-bg-color: #0c0e11; 10 - --link-color: #58a6ff; 11 - --link-hover-color: #9b9bea; 12 - --header-bg-color: #161b22; 13 - --page-bg-color: #000000; 14 - --license-bg-color: #4b4a4a; 15 - --license-border-color: black; 16 - --sub-border-color: #383838; 17 - --preview-bg-color: #989797; 18 - --preview-border-color: #b5b3b3; 19 - --dump-bg-color: #0c0e11; 20 - --dump-border-color: #505050; 21 - } 22 - h1 { 23 - font-weight: 200; 24 - } 25 - .license .hidden { 26 - background-color: #4b4a4a; /*minimal support for IE11*/ 27 - background-color: var(--license-bg-color); 28 - } 29 - .value { 30 - background-color: #303030; /*minimal support for IE11*/ 31 - background-color: var(--button-bg-color); 32 - } 33 - #dump .tag { color: #58a6ff; } 34 - #dump .dlen { color: darkcyan; } 35 - #dump .ulen { color: #00b6b6; } 36 - #dump .intro { color: #58a6ff; } 37 - #dump .outro { color: #00b6b6; } 38 - #dump .skip { color: #707070; background-color: #222222; } 39 - #dump .hexCurrent { background-color: #727272; } 40 - #dump .hexCurrent .hex { background-color: #474747; } 41 - #dump .hexCurrent .tag { color: #6db0fc; } 42 - #dump .hexCurrent .dlen { color: #00b6b6; }
+177 -29
index.css
··· 1 - :root { 1 + html { 2 2 --main-bg-color: #C0C0C0; 3 3 --main-text-color: #000000; 4 4 --headline-text-color: #8be9fd; ··· 18 18 --preview-border-color: #505050; 19 19 --dump-bg-color: #C0C0C0; 20 20 --dump-border-color: #E0E0E0; 21 + --dump-tag: blue; 22 + --dump-dlen: darkcyan; 23 + --dump-ulen: darkgreen; 24 + --dump-intro: blue; 25 + --dump-outro: darkgreen; 26 + --dump-skip: #666666; 27 + --dump-skip-bg: #C0C0C0; 28 + --dump-hex-current: #808080; 29 + --dump-hex-current-hex: #A0A0A0; 30 + --dump-hex-current-dlen: #004040; 31 + --hover-bg-color: #E0E0E0; 32 + --tree-zoom-fix: -1px; 33 + --tree-line: #999; 34 + } 35 + html[data-theme="dark"] { 36 + --main-bg-color: #0d1116; 37 + --main-text-color: #f8f8f2; 38 + --headline-text-color: #8be9fd; 39 + --button-border-color: #505050; 40 + --button-bg-color: #303030; 41 + --button-bghover-color: #404040; 42 + --input-border-color: #505050; 43 + --input-bg-color: #0c0e11; 44 + --link-color: #58a6ff; 45 + --link-hover-color: #9b9bea; 46 + --header-bg-color: #161b22; 47 + --page-bg-color: #000000; 48 + --license-bg-color: #4b4a4a; 49 + --license-border-color: black; 50 + --sub-border-color: #383838; 51 + --preview-bg-color: #989797; 52 + --preview-border-color: #b5b3b3; 53 + --dump-bg-color: #0c0e11; 54 + --dump-border-color: #505050; 55 + --dump-tag: #58a6ff; 56 + --dump-dlen: darkcyan; 57 + --dump-ulen: #00b6b6; 58 + --dump-intro: #58a6ff; 59 + --dump-outro: #00b6b6; 60 + --dump-skip: #707070; 61 + --dump-skip-bg: #222222; 62 + --dump-hex-current: #727272; 63 + --dump-hex-current-hex: #474747; 64 + --dump-hex-current-dlen: #00b6b6; 65 + --hover-bg-color: #505050; 66 + --tree-line: #333; 21 67 } 22 68 html, body { 23 69 background-color: var(--page-bg-color); ··· 83 129 #main-page { 84 130 background-color: var(--main-bg-color); 85 131 border: 0px; 86 - padding: 15px; 132 + padding: 5px; 87 133 } 88 134 #main-page > div { 89 135 position: relative; ··· 115 161 /*display: block;*/ 116 162 visibility: visible; 117 163 } 118 - .node { 119 - position: relative; 120 - } 121 - .sub { 122 - padding-left: 1.5em; 123 - border-left: solid 1px var(--sub-border-color); 124 - } 125 164 .head { 126 165 height: 1em; 127 166 white-space: nowrap; 128 167 } 129 - .head:hover::before { 130 - position: absolute; 131 - content: '-'; 132 - color: red; 133 - border: solid 1px red; 134 - border-radius: 20px; 135 - background-color: black; 136 - /*TODO: use vars instead of hex*/ 137 - } 138 168 .node:hover > .head, .node.hover > .head { 139 169 color: var(--link-color); 140 - font-weight: bold; 170 + background-color: var(--hover-bg-color); 141 171 } 142 172 .node:hover > .head:hover, .node.hover > .head.hover { 143 173 color: var(--link-hover-color); ··· 163 193 position: absolute; 164 194 z-index: 2; 165 195 top: 1.2em; 166 - left: 0; 196 + left: 30px; 167 197 background-color: #efefef; /*minimal support for IE11*/ 168 198 background-color: var(--button-bg-color); 169 199 border: solid 1px var(--button-border-color); ··· 201 231 white-space: pre; 202 232 padding: 5px; 203 233 } 204 - #dump .tag { color: blue; } 205 - #dump .dlen { color: darkcyan; } 206 - #dump .ulen { color: darkgreen; } 207 - #dump .intro { color: blue; } 208 - #dump .outro { color: darkgreen; } 209 - #dump .skip { color: #666666; background-color: #C0C0C0; } 210 - #dump .hexCurrent { background-color: #808080; } 211 - #dump .hexCurrent .hex { background-color: #A0A0A0; } 212 - #dump .hexCurrent .dlen { color: #004040; } 234 + #dump .tag { color: var(--dump-tag); } 235 + #dump .dlen { color: var(--dump-dlen); } 236 + #dump .ulen { color: var(--dump-ulen); } 237 + #dump .intro { color: var(--dump-intro); } 238 + #dump .outro { color: var(--dump-outro); } 239 + #dump .skip { color: var(--dump-skip); background-color: var(--dump-skip-bg); } 240 + #dump .hexCurrent { background-color: var(--dump-hex-current); } 241 + #dump .hexCurrent .hex { background-color: var(--dump-hex-current-hex); } 242 + #dump .hexCurrent .dlen { color: var(--dump-hex-current-dlen); } 213 243 #file { display: none; } 214 244 #area { width: 100%; } 245 + #contextmenu { 246 + position: absolute; 247 + visibility: hidden; 248 + top: 0; 249 + left: 0; 250 + padding: 2px; 251 + background-color: var(--button-bg-color); 252 + border: 1px solid var(--button-bg-color); 253 + z-index: 2; 254 + } 255 + #contextmenu > button { 256 + display: block; 257 + width: 120px; 258 + background-color: var(--button-bg-color); 259 + color: var(--main-text-color); 260 + border: 1px solid var(--button-border-color); 261 + text-align: left; 262 + } 263 + #contextmenu > button:hover { 264 + background-color: var(--button-bghover-color); 265 + } 266 + 267 + .treecollapse { 268 + --spacing: 1.5rem; 269 + --radius: 7px; 270 + padding-inline-start: 0px; 271 + } 272 + .treecollapse li{ 273 + display: block; 274 + position: relative; 275 + padding-left: calc(2 * var(--spacing) - var(--radius) - 2px); 276 + } 277 + .treecollapse ul{ 278 + padding-left: 0; 279 + margin-left: calc(var(--radius) - var(--spacing)); 280 + } 281 + .treecollapse ul li{ 282 + border-left: 1px solid var(--tree-line); 283 + } 284 + .treecollapse ul li:last-child{ 285 + border-color: transparent; 286 + } 287 + .treecollapse ul li::before{ 288 + content: ''; 289 + display: block; 290 + position: absolute; 291 + top: calc(var(--spacing) / -1.6); 292 + left: var(--tree-zoom-fix); 293 + width: calc(var(--spacing) + 2px); 294 + height: calc(var(--spacing) + 1px); 295 + border: solid var(--tree-line); 296 + border-width: 0 0 1px 1px; 297 + } 298 + .treecollapse summary{ 299 + display : block; 300 + cursor : pointer; 301 + } 302 + .treecollapse summary::marker, 303 + .treecollapse summary::-webkit-details-marker{ 304 + display : none; 305 + } 306 + .treecollapse summary:focus{ 307 + outline : none; 308 + } 309 + .treecollapse summary:focus-visible{ 310 + outline : 1px dotted #000; 311 + } 312 + .treecollapse summary::before{ 313 + content: ''; 314 + display: block; 315 + position: absolute; 316 + top: calc(var(--spacing) / 2 - var(--radius)); 317 + left: calc(var(--spacing) - var(--radius) - 1px); 318 + width: calc(2 * var(--radius)); 319 + height: calc(2 * var(--radius)); 320 + } 321 + .treecollapse summary::before{ 322 + z-index: 1; 323 + top: 1px; 324 + background: url('tree-icon-light.svg'); 325 + } 326 + html[data-theme="dark"] .treecollapse summary::before{ 327 + background: url('tree-icon-dark.svg'); 328 + } 329 + .treecollapse details[open] > summary::before{ 330 + background-position : calc(-2 * var(--radius)) 0; 331 + } 332 + 333 + /* 334 + Zoom fix to have straight lines in treeview 335 + Zoom level and dpi resolution: 336 + - 175%: 336dpi 337 + - 150%: 288dpi 338 + - 110%: 212dpi 339 + - 100%: 192dpi 340 + - 90%: 173dpi 341 + - 80%: 154dpi 342 + */ 343 + @media (resolution <= 154dpi) { 344 + :root{ 345 + --tree-zoom-fix: -0.6px; 346 + } 347 + } 348 + @media (155dpi <= resolution < 192dpi) { 349 + :root{ 350 + --tree-zoom-fix: -0.7px; 351 + } 352 + } 353 + @media (192dpi <= resolution < 336dpi) { 354 + :root{ 355 + --tree-zoom-fix: -1px; 356 + } 357 + } 358 + @media (336dpi <= resolution) { 359 + :root{ 360 + --tree-zoom-fix: -0.9px; 361 + } 362 + }
+28 -23
index.html
··· 1 1 <!DOCTYPE html> 2 - <html> 2 + <html data-theme="dark"> 3 3 <head> 4 - <meta charset="US-ASCII"> 4 + <meta charset="UTF-8"> 5 5 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 6 + <meta name="theme-color" content="#0d1116" media="(prefers-color-scheme: dark)"> 7 + <meta name="theme-color" content="#C0C0C0" media="(prefers-color-scheme: light)"> 6 8 <title>ASN.1 JavaScript decoder</title> 7 - <link rel="stylesheet" href="index.css" type="text/css" id="theme-base"> 9 + <link rel="stylesheet" href="index.css" type="text/css"> 8 10 <link rel="icon" type="image/svg+xml" sizes="192x192" href="favicon.svg"> 9 11 </head> 10 12 <body> 13 + <div id="contextmenu"> 14 + <button id="btnCopyHex">Copy hex dump</button> 15 + <button id="btnCopyB64">Copy Base64</button> 16 + <button id="btnCopyTree">Copy subtree</button> 17 + <button id="btnCopyValue">Copy value</button> 18 + </div> 11 19 <header> 12 20 <div class="title"> 13 21 <h1>ASN.1 JavaScript decoder</h1> ··· 29 37 <div id="tree"></div> 30 38 </div> 31 39 <form> 32 - <textarea id="area" rows="8"></textarea> 40 + <textarea id="area" rows="8" placeholder="Paste hex or base64 or PEM encoded ASN.1 BER or DER structures here, or load a file."></textarea> 33 41 <br> 34 42 <br> 35 43 <label title="can be slow with big files"><input type="checkbox" id="wantHex" checked="checked"> with hex dump</label> ··· 39 47 <br><br> 40 48 <table> 41 49 <tr><td>Drag or load file:</td><td><input type="file" id="file"></td></tr> 42 - <tr><td>Load examples:</td><td> 50 + <tr id="rowExamples"><td>Load examples:</td><td> 43 51 <select id="examples"> 44 52 <option value="sig-p256-der.p7m">PKCS#7/CMS attached signature (DER)</option> 45 53 <option value="sig-p256-ber.p7m">PKCS#7/CMS attached signature (BER)</option> 46 54 <option value="sig-rsa1024-sha1.p7s">PKCS#7/CMS detached signature (old)</option> 55 + <option value="cms-password.p7m">PKCS#7/CMS encrypted with password</option> 47 56 <option value="letsencrypt-x3.cer">X.509 certificate: Let's Encrypt X3</option> 48 57 <option value="ed25519.cer">X.509 certificate: ed25519 (RFC 8410)</option> 58 + <option value="pkcs1.pem">PKCS#1 RSA key (RFC 8017)</option> 59 + <option value="pkcs8-rsa.pem">PKCS#8 RSA key (RFC 5208)</option> 49 60 <option value="pkcs10.pem">PKCS#10 certification request (RFC 2986)</option> 61 + <option value="crl-rfc5280.b64">CRL example (RFC 5280)</option> 50 62 <option value="cmpv2.b64">CMP PKI message (RFC 4210)</option> 63 + <option value="ldapmessage.b64">LDAP message (RFC 4511)</option> 51 64 </select> 52 65 <input id="butExample" type="button" value="load"><br> 53 66 </td></tr> ··· 59 72 <div id="help"> 60 73 <h2>Instructions</h2> 61 74 <p>This page contains a JavaScript generic ASN.1 parser that can decode any valid ASN.1 DER or BER structure whether Base64-encoded (raw base64, PEM armoring and <span class="tt">begin-base64</span> are recognized) or Hex-encoded. </p> 62 - <p>This tool can be used online at the address <a href="http://lapo.it/asn1js/"><span class="tt">http://lapo.it/asn1js/</span></a> or offline, unpacking <a href="http://lapo.it/asn1js/asn1js.zip">the ZIP file</a> in a directory and opening <span class="tt">index.html</span> in a browser</p> 75 + <p>This tool can be used online at the address <a href="https://asn1js.eu/"><span class="tt">https://asn1js.eu/</span></a> or offline, unpacking <a href="https://asn1js.eu/asn1js.zip">the ZIP file</a> in a directory and opening <span class="tt">index-local.html</span> in a browser.</p> 63 76 <p>On the left of the page will be printed a tree representing the hierarchical structure, on the right side an hex dump will be shown. <br> 64 77 Hovering on the tree highlights ancestry (the hovered node and all its ancestors get colored) and the position of the hovered node gets highlighted in the hex dump (with header and content in a different colors). <br> 65 78 Clicking a node in the tree will hide its sub-nodes (collapsed nodes can be noticed because they will become <i>italic</i>).</p> 66 - <p><b>WARNING:</b> starting from 2023-02-26 this website is using some ES6 features, which can break it for older browsers (though it is <a href="https://www.browserling.com/browse/win7/ie11/https://asn1js.eu/">still working on IE11</a>).<br> 67 - You can access <a href="https://rawcdn.githack.com/lapo-luchini/asn1js/1.2.4/index.html">last version before ES6 on githack</a>.</p> 79 + <p><b>WARNING:</b> starting from 2024-03-28 this website is using ES6 features (and modules), which can break it for <a href="https://caniuse.com/es6-module">very old browsers</a>.<br> 80 + You can access <a href="https://rawcdn.githack.com/lapo-luchini/asn1js/1.2.4/index.html">last version before ES6 on githack</a> (which <a href="https://www.browserling.com/browse/win7/ie11/https://rawcdn.githack.com/lapo-luchini/asn1js/1.2.4/index.html">still works on IE11</a>).</p> 68 81 <div class="license"> 69 82 <h3>Copyright</h3> 70 83 <div><p class="hidden"> 71 84 ASN.1 JavaScript decoder<br> 72 - Copyright &copy; 2008-2024 Lapo Luchini <a href="mailto:lapo@lapo.it?subject=ASN1js">&lt;lapo@lapo.it&gt;</a><br> 85 + Copyright &copy; 2008-2025 Lapo Luchini <a href="mailto:lapo@lapo.it?subject=ASN1js">&lt;lapo@lapo.it&gt;</a><br> 73 86 <br> 74 87 Permission to use, copy, modify, and/or distribute this software for any 75 88 purpose with or without fee is hereby granted, provided that the above ··· 83 96 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 84 97 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 85 98 </p></div> 86 - <p>ASN.1 JavaScript decoder Copyright &copy; 2008-2024 <a href="http://lapo.it/">Lapo Luchini</a>; released as <a href="http://opensource.org/licenses/isc-license.txt">opensource</a> under the <a href="http://en.wikipedia.org/wiki/ISC_licence">ISC license</a>.</p> 99 + <p>ASN.1 JavaScript decoder Copyright &copy; 2008-2025 <a href="https://lapo.it/">Lapo Luchini</a>; released as <a href="https://opensource.org/licenses/isc-license.txt">opensource</a> under the <a href="https://en.wikipedia.org/wiki/ISC_licence">ISC license</a>.</p> 87 100 </div> 88 - <p><span class="tt">OBJECT&nbsp;IDENTIFIER</span> values are recognized using data taken from Peter Gutmann's <a href="http://www.cs.auckland.ac.nz/~pgut001/#standards">dumpasn1</a> program.</p> 101 + <p><span class="tt">OBJECT&nbsp;IDENTIFIER</span> values are recognized using data taken from Peter Gutmann's <a href="https://www.cs.auckland.ac.nz/~pgut001/#standards">dumpasn1</a> program.</p> 89 102 <h3>Links</h3> 90 103 <ul> 91 - <li><a href="http://lapo.it/asn1js/">official website</a></li> 92 - <li><a href="http://asn1js.eu/">dedicated domain</a></li> 104 + <li><a href="https://asn1js.eu/">official website</a></li> 105 + <li><a href="https://lapo.it/asn1js/">alternate website</a></li> 106 + <li><a href="https://asn1js.eu/index-local.html">single-file version working locally</a> (just save this link)</li> 93 107 <li>previous versions on githack: <select id="tags"><option>[select tag]</option></select></li> 94 108 <li><a href="http://idf.lapo.it/p/asn1js/">InDefero tracker</a> (currently offline)</li> 95 109 <li><a href="https://github.com/lapo-luchini/asn1js">github mirror</a></li> 110 + <li><a href="https://github.com/lapo-luchini/asn1js/blob/trunk/CHANGELOG.md">ChangeLog on GitHub</a></li> 96 111 <li><a href="https://www.openhub.net/p/asn1js">OpenHub code stats</a></li> 97 112 </ul> 98 113 </div> 99 - 100 - <script type="module" src="tags.js"></script> 101 - <script type="module" src="hex.js"></script> 102 - <script type="module" src="base64.js"></script> 103 - <script type="module" src="oids.js"></script> 104 - <script type="module" src="rfcdef.js"></script> 105 - <script type="module" src="defs.js"></script> 106 - <script type="module" src="int10.js"></script> 107 - <script type="module" src="asn1.js"></script> 108 - <script type="module" src="dom.js"></script> 109 114 <script type="module" src="index.js"></script> 110 115 </body> 111 116 </html>
+41 -58
index.js
··· 1 + import './theme.js'; 1 2 import { ASN1DOM } from './dom.js'; 2 3 import { Base64 } from './base64.js'; 3 4 import { Hex } from './hex.js'; ··· 15 16 area = id('area'), 16 17 file = id('file'), 17 18 examples = id('examples'), 18 - selectTheme = id('theme-select'), 19 19 selectDefs = id('definitions'), 20 20 selectTag = id('tags'); 21 21 ··· 41 41 function show(asn1) { 42 42 tree.innerHTML = ''; 43 43 dump.innerHTML = ''; 44 - tree.appendChild(asn1.toDOM()); 44 + let ul = document.createElement('ul'); 45 + ul.className = 'treecollapse'; 46 + tree.appendChild(ul); 47 + ul.appendChild(asn1.toDOM()); 45 48 if (wantHex.checked) dump.appendChild(asn1.toHexDOM(undefined, trimHex.checked)); 46 49 } 47 - function decode(der, offset) { 50 + export function decode(der, offset) { 48 51 offset = offset || 0; 49 52 try { 50 53 const asn1 = ASN1DOM.decode(der, offset); ··· 83 86 if (area.value === '') area.value = Base64.pretty(b64); 84 87 try { 85 88 window.location.hash = hash = '#' + b64; 86 - } catch (e) { 89 + } catch (ignore) { 87 90 // fails with "Access Denied" on IE with URLs longer than ~2048 chars 88 91 window.location.hash = hash = '#'; 89 92 } ··· 103 106 text(tree, e); 104 107 } 105 108 } 106 - function decodeText(val) { 109 + export function decodeText(val) { 107 110 try { 108 111 let der = reHex.test(val) ? Hex.decode(val) : Base64.unarmor(val); 109 112 decode(der); ··· 112 115 dump.innerHTML = ''; 113 116 } 114 117 } 115 - function decodeBinaryString(str) { 118 + export function decodeBinaryString(str) { 116 119 let der; 117 120 try { 118 121 if (reHex.test(str)) der = Hex.decode(str); 119 122 else if (Base64.re.test(str)) der = Base64.unarmor(str); 120 123 else der = str; 121 124 decode(der); 122 - } catch (e) { 125 + } catch (ignore) { 123 126 text(tree, 'Cannot decode file.'); 124 127 dump.innerHTML = ''; 125 128 } 126 129 } 127 130 // set up buttons 128 - id('butDecode').onclick = function () { 129 - decodeText(area.value); 131 + const butClickHandlers = { 132 + butDecode: () => { 133 + decodeText(area.value); 134 + }, 135 + butClear: () => { 136 + area.value = ''; 137 + file.value = ''; 138 + tree.innerHTML = ''; 139 + dump.innerHTML = ''; 140 + selectDefs.innerHTML = ''; 141 + hash = window.location.hash = ''; 142 + }, 143 + butExample: () => { 144 + console.log('Loading example:', examples.value); 145 + let request = new XMLHttpRequest(); 146 + request.open('GET', 'examples/' + examples.value, true); 147 + request.onreadystatechange = function () { 148 + if (this.readyState !== 4) return; 149 + if (this.status >= 200 && this.status < 400) { 150 + area.value = this.responseText; 151 + decodeText(this.responseText); 152 + } else { 153 + console.log('Error loading example.'); 154 + } 155 + }; 156 + request.send(); 157 + }, 130 158 }; 131 - id('butClear').onclick = function () { 132 - area.value = ''; 133 - file.value = ''; 134 - tree.innerHTML = ''; 135 - dump.innerHTML = ''; 136 - selectDefs.innerHTML = ''; 137 - hash = window.location.hash = ''; 138 - }; 139 - id('butExample').onclick = function () { 140 - console.log('Loading example:', examples.value); 141 - let request = new XMLHttpRequest(); 142 - request.open('GET', 'examples/' + examples.value, true); 143 - request.onreadystatechange = function () { 144 - if (this.readyState !== 4) return; 145 - if (this.status >= 200 && this.status < 400) { 146 - area.value = this.responseText; 147 - decodeText(this.responseText); 148 - } else { 149 - console.log('Error loading example.'); 150 - } 151 - }; 152 - request.send(); 153 - }; 154 - // set dark theme depending on OS settings 155 - function setTheme() { 156 - let storedTheme = localStorage.getItem('theme'); 157 - let theme = 'os'; 158 - if (storedTheme) 159 - theme = storedTheme; 160 - selectTheme.value = theme; 161 - if (theme == 'os') { 162 - let prefersDarkScheme = window.matchMedia('(prefers-color-scheme: dark)'); 163 - theme = prefersDarkScheme.matches ? 'dark': 'light'; 164 - } 165 - if (theme == 'dark') { 166 - const css1 = id('theme-base'); 167 - const css2 = css1.cloneNode(); 168 - css2.id = 'theme-override'; 169 - css2.href = 'index-' + theme + '.css'; 170 - css1.parentElement.appendChild(css2); 171 - } else { 172 - const css2 = id('theme-override'); 173 - if (css2) css2.remove(); 174 - } 159 + for (const [name, onClick] of Object.entries(butClickHandlers)) { 160 + let elem = id(name); 161 + if (elem) 162 + elem.onclick = onClick; 175 163 } 176 - setTheme(); 177 - selectTheme.addEventListener('change', function () { 178 - localStorage.setItem('theme', selectTheme.value); 179 - setTheme(); 180 - }); 181 164 // this is only used if window.FileReader 182 165 function read(f) { 183 166 area.value = ''; // clear text area, will get b64 content
+15 -9
int10.js
··· 1 1 // Big integer base-10 printing library 2 - // Copyright (c) 2008-2024 Lapo Luchini <lapo@lapo.it> 2 + // Copyright (c) 2008 Lapo Luchini <lapo@lapo.it> 3 3 4 4 // Permission to use, copy, modify, and/or distribute this software for any 5 5 // purpose with or without fee is hereby granted, provided that the above 6 6 // copyright notice and this permission notice appear in all copies. 7 - // 7 + // 8 8 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 9 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 10 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ··· 13 13 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 14 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 15 16 - let max = 10000000000000; // biggest 10^n integer that can still fit 2^53 when multiplied by 256 16 + /** Biggest 10^n integer that can still fit 2^53 when multiplied by 256. */ 17 + const max = 10000000000000; 17 18 18 19 export class Int10 { 19 20 /** ··· 26 27 27 28 /** 28 29 * Multiply value by m and add c. 29 - * @param {number} m - multiplier, must be < =256 30 - * @param {number} c - value to add 30 + * @param {number} m - multiplier, must be 0<m<=256 31 + * @param {number} c - value to add, must be c>=0 31 32 */ 32 33 mulAdd(m, c) { 34 + // assert(m > 0) 33 35 // assert(m <= 256) 36 + // assert(c >= 0) 34 37 let b = this.buf, 35 38 l = b.length, 36 39 i, t; ··· 71 74 72 75 /** 73 76 * Convert to decimal string representation. 74 - * @param {*} base - optional value, only value accepted is 10 77 + * @param {number} [base=10] - optional value, only value accepted is 10 78 + * @returns {string} The decimal string representation. 75 79 */ 76 - toString(base) { 77 - if ((base || 10) != 10) 78 - throw 'only base 10 is supported'; 80 + toString(base = 10) { 81 + if (base != 10) 82 + throw new Error('only base 10 is supported'); 79 83 let b = this.buf, 80 84 s = b[b.length - 1].toString(); 81 85 for (let i = b.length - 2; i >= 0; --i) ··· 86 90 /** 87 91 * Convert to Number value representation. 88 92 * Will probably overflow 2^53 and thus become approximate. 93 + * @returns {number} The numeric value. 89 94 */ 90 95 valueOf() { 91 96 let b = this.buf, ··· 97 102 98 103 /** 99 104 * Return value as a simple Number (if it is <= 10000000000000), or return this. 105 + * @returns {number | Int10} The simplified value. 100 106 */ 101 107 simplify() { 102 108 let b = this.buf;
-1
oids.js
··· 2722 2722 "1.3.6.1.4.1.40869.1.1.22.3": { "d": "TWCA EV policy", "c": "TWCA Root Certification Authority" }, 2723 2723 "2.16.840.1.113733.1.7.23.6": { "d": "VeriSign EV policy", "c": "VeriSign Class 3 Public Primary Certification Authority" }, 2724 2724 "2.16.840.1.114171.500.9": { "d": "Wells Fargo EV policy", "c": "Wells Fargo WellsSecure Public Root Certificate Authority" }, 2725 - "END": "" 2726 2725 };
+48 -61
package.json
··· 1 1 { 2 2 "name": "@lapo/asn1js", 3 - "version": "2.0.0", 3 + "version": "2.1.0", 4 4 "description": "Generic ASN.1 parser/decoder that can decode any valid ASN.1 DER or BER structures.", 5 5 "type": "module", 6 6 "main": "asn1.js", ··· 8 8 "type": "git", 9 9 "url": "git+https://github.com/lapo-luchini/asn1js.git" 10 10 }, 11 - "keywords": [ "asn1", "ber", "der", "pem" ], 11 + "keywords": [ 12 + "asn1", 13 + "ber", 14 + "der", 15 + "pem" 16 + ], 12 17 "author": "Lapo Luchini <lapo@lapo.it>", 13 18 "license": "ISC", 14 - "bugs": { "url": "https://github.com/lapo-luchini/asn1js/issues" }, 19 + "bugs": { 20 + "url": "https://github.com/lapo-luchini/asn1js/issues" 21 + }, 15 22 "homepage": "https://lapo.it/asn1js/", 16 - "files": [ "asn1.js", "base64.js", "hex.js", "int10.js", "oids.js" ], 23 + "files": [ 24 + "asn1.js", 25 + "base64.js", 26 + "hex.js", 27 + "int10.js", 28 + "dom.js", 29 + "defs.js", 30 + "oids.js", 31 + "rfcdef.js", 32 + "dumpASN1.js" 33 + ], 17 34 "scripts": { 18 - "lint": "npx eslint asn1.js base64.js hex.js int10.js oids.js tags.js index.js parseRFC.js dumpASN1.js", 35 + "lint": "npx eslint asn1.js base64.js hex.js int10.js dom.js defs.js oids.js rfcdef.js tags.js context.js index.js parseRFC.js dumpASN1.js test.js testDefs.js vite.config.js theme.js", 19 36 "lint-action": "npx @action-validator/cli .github/workflows/node.js.yml", 20 - "serve": "echo 'Connect to http://localhost:3000/' ; npx statik --port 3000 .", 21 - "test": "node test" 37 + "build": "vite build", 38 + "serve": "npx -p local-web-server ws", 39 + "test": "node test", 40 + "testdefs": "node testDefs" 41 + }, 42 + "bin": { 43 + "dumpASN1": "./dumpASN1.js" 22 44 }, 23 45 "engines": { 24 - "node": ">=12.20.0" 46 + "node": ">=14.6.0" 25 47 }, 48 + "packageManager": "pnpm@7.33.7", 26 49 "devDependencies": { 27 - "eslint": "^8.34.0" 50 + "@eslint/eslintrc": "^3.3.1", 51 + "@eslint/js": "^9.32.0", 52 + "@rollup/wasm-node": "^4.46.2", 53 + "diff": "^8.0.2", 54 + "eslint": "^9.32.0", 55 + "globals": "^16.3.0", 56 + "htmlparser2": "^9.1.0", 57 + "vite": "^5.4.19", 58 + "vite-plugin-dom": "^1.0.4", 59 + "vite-plugin-singlefile": "^2.3.0" 28 60 }, 29 - "eslintConfig": { 30 - "env": { 31 - "es6": true, 32 - "browser": true, 33 - "node": true 34 - }, 35 - "parserOptions": { 36 - "ecmaVersion": 2015, 37 - "sourceType": "module" 38 - }, 39 - "extends": [ "eslint:recommended" ], 40 - "globals": { 41 - "Uint8Array": "readonly" 42 - }, 43 - "rules": { 44 - "strict": [ "error", "function" ], 45 - "indent": [ "error", 4 ], 46 - "linebreak-style": [ "error", "unix" ], 47 - "semi": [ "warn", "always" ], 48 - "quotes": [ "error", "single", { "avoidEscape": true } ], 49 - "no-var": [ "warn" ], 50 - "comma-dangle": [ "error", "never" ] 51 - }, 52 - "overrides": [ 53 - { 54 - "files": [ "test.js", "parseRFC.js", "dumpASN1.js" ], 55 - "parserOptions": { 56 - "ecmaVersion": 2021 57 - }, 58 - "rules": { 59 - "strict": [ "error", "global" ], 60 - "comma-dangle": [ "error", "always-multiline" ] 61 - } 62 - }, { 63 - "files": [ "oids.js" ], 64 - "rules": { 65 - "indent": "off", 66 - "quotes": [ "warn", "double" ] 67 - } 68 - }, { 69 - "files": [ "tags.js" ], 70 - "rules": { 71 - "comma-dangle": [ "error", "always-multiline" ], 72 - "quotes": [ "warn", "double" ] 73 - } 74 - }, { 75 - "files": [ "defs.js" ], 76 - "parserOptions": { 77 - "ecmaVersion": 2021 78 - } 79 - } 80 - ] 61 + "overrides": { 62 + "rollup": "npm:@rollup/wasm-node" 63 + }, 64 + "pnpm": { 65 + "overrides": { 66 + "rollup": "npm:@rollup/wasm-node" 67 + } 81 68 } 82 69 }
+77 -11
parseRFC.js
··· 1 1 #! /usr/bin/env node 2 2 3 + // RFC ASN.1 definition parser 4 + // Copyright (c) 2021 Lapo Luchini <lapo@lapo.it> 5 + 6 + // Permission to use, copy, modify, and/or distribute this software for any 7 + // purpose with or without fee is hereby granted, provided that the above 8 + // copyright notice and this permission notice appear in all copies. 9 + // 10 + // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 + // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 + // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 + // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 + // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 + // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 + // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 + 3 18 import * as fs from 'node:fs'; 4 19 5 20 const ··· 45 60 4210: [ 46 61 [ /^\s+-- .*\r?\n/mg, '' ], // comments 47 62 ], 63 + 8017: [ // this RFC uses a lot of currently unsupported syntax 64 + [ /ALGORITHM-IDENTIFIER ::= CLASS[^-]+--/, '--' ], 65 + [ /\n +\S+ +ALGORITHM-IDENTIFIER[^\n]+(\n {6}[^\n]+)+\n {3}[}]/g, '' ], 66 + [ /AlgorithmIdentifier [{] ALGORITHM-IDENTIFIER:InfoObjectSet [}] ::=(\n {6}[^\n]+)+\n {3}[}]/, 'AlgorithmIdentifier ::= ANY'], 67 + [ /algorithm +id-[^,\n]+,/g, 'algorithm ANY,' ], 68 + [ / (sha1 {4}HashAlgorithm|mgf1SHA1 {4}MaskGenAlgorithm|pSpecifiedEmpty {4}PSourceAlgorithm|rSAES-OAEP-Default-Identifier {4}RSAES-AlgorithmIdentifier|rSASSA-PSS-Default-Identifier {4}RSASSA-AlgorithmIdentifier) ::= [{](\n( {6}[^\n]+)?)+\n {3}[}]/g, '' ], 69 + [ / ::= AlgorithmIdentifier [{]\s+[{][^}]+[}]\s+[}]/g, ' ::= AlgorithmIdentifier' ], 70 + [ /OCTET STRING[(]SIZE[(]0..MAX[)][)]/g, 'OCTET STRING' ], 71 + [ /emptyString {4}EncodingParameters ::= ''H/g, '' ], 72 + [ /[(]CONSTRAINED BY[^)]+[)]/g, '' ], 73 + ], 74 + 4511: [ 75 + [ /^\s+-- .*\r?\n/mg, '' ], // comments 76 + [ 'EXTENSIBILITY IMPLIED', '' ], 77 + [ /\.\.\.(,| {2})/g, '' ], 78 + [ /value AttributeValue/g, 'AttributeValue' ], 79 + [ /control Control/g, 'Control' ], 80 + [ /Attribute ::= PartialAttribute\(WITH COMPONENTS \{[^}]+\}\)/g, 'PartialAttribute ::= SEQUENCE { type AttributeDescription, vals SET SIZE (1..MAX) OF AttributeValue }' ], 81 + [ /,\s+\}/g, '}' ], 82 + [ /SaslCredentials,/g, 'SaslCredentials' ], 83 + [ /(BindResponse|ExtendedResponse) ::= \[APPLICATION [0-9]+\] SEQUENCE \{[^}]+\}/g, '$1 ::= ANY' ], 84 + [ /selector LDAPString/g, 'LDAPString' ], 85 + [ /filter Filter/g, 'Filter' ], 86 + [ /MatchingRuleAssertion,/g, 'MatchingRuleAssertion' ], 87 + [ /OF substring CHOICE/g, 'OF CHOICE' ], 88 + [ /partialAttribute PartialAttribute/g, 'PartialAttribute' ], 89 + [ /uri URI/g, 'URI' ], 90 + [ /OF change SEQUENCE/g, 'OF SEQUENCE' ], 91 + [ /attribute Attribute/g, 'Attribute' ], 92 + ], 48 93 }; 49 94 50 95 // const reWhitespace = /(?:\s|--(?:[}-]?[^\n}-])*(?:\n|--))*/y; ··· 52 97 const reIdentifier = /[a-zA-Z](?:[-]?[a-zA-Z0-9])*/y; 53 98 const reNumber = /0|[1-9][0-9]*/y; 54 99 const reToken = /[(){},[\];]|::=|OPTIONAL|DEFAULT|NULL|TRUE|FALSE|\.\.|OF|SIZE|MIN|MAX|DEFINED BY|DEFINITIONS|TAGS|BEGIN|EXPORTS|IMPORTS|FROM|END/y; 55 - const reType = /ANY|BOOLEAN|INTEGER|(?:BIT|OCTET)\s+STRING|OBJECT\s+IDENTIFIER|SEQUENCE|SET|CHOICE|ENUMERATED|(?:Generalized|UTC)Time|(?:BMP|General|Graphic|IA5|ISO64|Numeric|Printable|Teletex|T61|Universal|UTF8|Videotex|Visible)String/y; 100 + const reType = /ANY|NULL|BOOLEAN|INTEGER|(?:BIT|OCTET)\s+STRING|OBJECT\s+IDENTIFIER|SEQUENCE|SET|CHOICE|ENUMERATED|(?:Generalized|UTC)Time|(?:BMP|General|Graphic|IA5|ISO64|Numeric|Printable|Teletex|T61|Universal|UTF8|Videotex|Visible)String/y; 56 101 const reTagClass = /UNIVERSAL|APPLICATION|PRIVATE|/y; 57 102 const reTagType = /IMPLICIT|EXPLICIT|/y; 58 103 const reTagDefault = /(AUTOMATIC|IMPLICIT|EXPLICIT) TAGS|/y; ··· 168 213 tryToken(expect) { 169 214 let p = this.pos; 170 215 let t; 171 - try { t = this.parseToken(); } catch (e) { /*ignore*/ } 216 + try { t = this.parseToken(); } catch (ignore) { /*ignore*/ } 172 217 // console.log('[debug] tryToken(' + expect + ') = ' + t); 173 218 if (t == expect) 174 219 return true; ··· 213 258 if (this.tryToken('DEFINED BY')) 214 259 x.definedBy = this.parseIdentifier(); 215 260 break; 261 + case 'NULL': 216 262 case 'BOOLEAN': 217 263 case 'OCTET STRING': 218 264 case 'OBJECT IDENTIFIER': ··· 277 323 this.expectToken(')'); 278 324 } 279 325 break; 326 + case 'UTCTime': 327 + case 'GeneralizedTime': 328 + break; 280 329 default: 281 - x.content = 'TODO:unknown'; 330 + x.warning = 'type unknown'; 282 331 } 283 332 } catch (e) { 284 333 console.log('[debug] parseBuiltinType content', e); 285 - x.content = 'TODO:exception'; 334 + x.warning = 'type exception'; 286 335 } 287 336 return x; 288 337 } ··· 294 343 let plicit = this.getRegEx('explicit/implicit', reTagType); 295 344 if (plicit == '') plicit = currentMod.tagDefault; 296 345 let x = this.parseType(); 346 + let name; 347 + switch (tagClass) { // keep in sync with ASN1.typeName 348 + case 'APPLICATION': 349 + name = 'Application ' + t; 350 + break; 351 + case 'PRIVATE': 352 + name = 'Private ' + t; 353 + break; 354 + case 'CONTEXT': 355 + // fall through 356 + default: 357 + name = '[' + t + ']'; 358 + break; 359 + } 297 360 return { 298 - name: '[' + t + ']', 361 + name, 299 362 type: 'tag', 300 363 'class': tagClass, 301 364 explicit: (plicit == 'EXPLICIT'), ··· 308 371 let p = this.pos; 309 372 try { 310 373 return this.parseBuiltinType(); 311 - } catch (e) { 374 + } catch (ignore) { 312 375 // console.log('[debug] parseAssignment failed on parseType', e); 313 376 this.pos = p; 314 377 let x = { ··· 349 412 } else { 350 413 if (id in currentMod.values) // defined in local module 351 414 val = currentMod.values[id].value; 352 - else 415 + else try { 353 416 val = searchImportedValue(id); 417 + } catch (e) { 418 + this.exception(e.message); 419 + } 354 420 } 355 421 } 356 422 if (v.length) v += '.'; ··· 376 442 case 'NULL': 377 443 return null; 378 444 } 379 - } catch (e) { 445 + } catch (ignore) { 380 446 this.pos = p; 381 447 } 382 448 p = this.pos; 383 449 try { 384 450 return this.parseIdentifier(); 385 - } catch (e) { 451 + } catch (ignore) { 386 452 this.pos = p; 387 453 } 388 454 this.exception('Unknown value type.'); ··· 501 567 asn1[currentMod.oid] = currentMod; 502 568 } 503 569 /*asn1 = Object.keys(asn1).sort().reduce( 504 - (obj, key) => { 570 + (obj, key) => { 505 571 obj[key] = asn1[key]; 506 572 return obj; 507 - }, 573 + }, 508 574 {} 509 575 );*/ 510 576 fs.writeFileSync(process.argv[3], JSON.stringify(asn1, null, 2) + '\n', 'utf8');
+1348
pnpm-lock.yaml
··· 1 + lockfileVersion: '9.0' 2 + 3 + settings: 4 + autoInstallPeers: true 5 + excludeLinksFromLockfile: false 6 + 7 + overrides: 8 + rollup: npm:@rollup/wasm-node 9 + 10 + importers: 11 + 12 + .: 13 + devDependencies: 14 + '@eslint/eslintrc': 15 + specifier: ^3.3.1 16 + version: 3.3.1 17 + '@eslint/js': 18 + specifier: ^9.32.0 19 + version: 9.32.0 20 + '@rollup/wasm-node': 21 + specifier: ^4.46.2 22 + version: 4.46.2 23 + diff: 24 + specifier: ^8.0.2 25 + version: 8.0.2 26 + eslint: 27 + specifier: ^9.32.0 28 + version: 9.32.0 29 + globals: 30 + specifier: ^16.3.0 31 + version: 16.3.0 32 + htmlparser2: 33 + specifier: ^9.1.0 34 + version: 9.1.0 35 + vite: 36 + specifier: ^5.4.19 37 + version: 5.4.19 38 + vite-plugin-dom: 39 + specifier: ^1.0.4 40 + version: 1.0.4(vite@5.4.19) 41 + vite-plugin-singlefile: 42 + specifier: ^2.3.0 43 + version: 2.3.0(rollup@4.46.2)(vite@5.4.19) 44 + 45 + packages: 46 + 47 + '@esbuild/aix-ppc64@0.21.5': 48 + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} 49 + engines: {node: '>=12'} 50 + cpu: [ppc64] 51 + os: [aix] 52 + 53 + '@esbuild/android-arm64@0.21.5': 54 + resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} 55 + engines: {node: '>=12'} 56 + cpu: [arm64] 57 + os: [android] 58 + 59 + '@esbuild/android-arm@0.21.5': 60 + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} 61 + engines: {node: '>=12'} 62 + cpu: [arm] 63 + os: [android] 64 + 65 + '@esbuild/android-x64@0.21.5': 66 + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} 67 + engines: {node: '>=12'} 68 + cpu: [x64] 69 + os: [android] 70 + 71 + '@esbuild/darwin-arm64@0.21.5': 72 + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} 73 + engines: {node: '>=12'} 74 + cpu: [arm64] 75 + os: [darwin] 76 + 77 + '@esbuild/darwin-x64@0.21.5': 78 + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} 79 + engines: {node: '>=12'} 80 + cpu: [x64] 81 + os: [darwin] 82 + 83 + '@esbuild/freebsd-arm64@0.21.5': 84 + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} 85 + engines: {node: '>=12'} 86 + cpu: [arm64] 87 + os: [freebsd] 88 + 89 + '@esbuild/freebsd-x64@0.21.5': 90 + resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} 91 + engines: {node: '>=12'} 92 + cpu: [x64] 93 + os: [freebsd] 94 + 95 + '@esbuild/linux-arm64@0.21.5': 96 + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} 97 + engines: {node: '>=12'} 98 + cpu: [arm64] 99 + os: [linux] 100 + 101 + '@esbuild/linux-arm@0.21.5': 102 + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} 103 + engines: {node: '>=12'} 104 + cpu: [arm] 105 + os: [linux] 106 + 107 + '@esbuild/linux-ia32@0.21.5': 108 + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} 109 + engines: {node: '>=12'} 110 + cpu: [ia32] 111 + os: [linux] 112 + 113 + '@esbuild/linux-loong64@0.21.5': 114 + resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} 115 + engines: {node: '>=12'} 116 + cpu: [loong64] 117 + os: [linux] 118 + 119 + '@esbuild/linux-mips64el@0.21.5': 120 + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} 121 + engines: {node: '>=12'} 122 + cpu: [mips64el] 123 + os: [linux] 124 + 125 + '@esbuild/linux-ppc64@0.21.5': 126 + resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} 127 + engines: {node: '>=12'} 128 + cpu: [ppc64] 129 + os: [linux] 130 + 131 + '@esbuild/linux-riscv64@0.21.5': 132 + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} 133 + engines: {node: '>=12'} 134 + cpu: [riscv64] 135 + os: [linux] 136 + 137 + '@esbuild/linux-s390x@0.21.5': 138 + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} 139 + engines: {node: '>=12'} 140 + cpu: [s390x] 141 + os: [linux] 142 + 143 + '@esbuild/linux-x64@0.21.5': 144 + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} 145 + engines: {node: '>=12'} 146 + cpu: [x64] 147 + os: [linux] 148 + 149 + '@esbuild/netbsd-x64@0.21.5': 150 + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} 151 + engines: {node: '>=12'} 152 + cpu: [x64] 153 + os: [netbsd] 154 + 155 + '@esbuild/openbsd-x64@0.21.5': 156 + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} 157 + engines: {node: '>=12'} 158 + cpu: [x64] 159 + os: [openbsd] 160 + 161 + '@esbuild/sunos-x64@0.21.5': 162 + resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} 163 + engines: {node: '>=12'} 164 + cpu: [x64] 165 + os: [sunos] 166 + 167 + '@esbuild/win32-arm64@0.21.5': 168 + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} 169 + engines: {node: '>=12'} 170 + cpu: [arm64] 171 + os: [win32] 172 + 173 + '@esbuild/win32-ia32@0.21.5': 174 + resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} 175 + engines: {node: '>=12'} 176 + cpu: [ia32] 177 + os: [win32] 178 + 179 + '@esbuild/win32-x64@0.21.5': 180 + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} 181 + engines: {node: '>=12'} 182 + cpu: [x64] 183 + os: [win32] 184 + 185 + '@eslint-community/eslint-utils@4.7.0': 186 + resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} 187 + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} 188 + peerDependencies: 189 + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 190 + 191 + '@eslint-community/regexpp@4.12.1': 192 + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} 193 + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} 194 + 195 + '@eslint/config-array@0.21.0': 196 + resolution: {integrity: sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==} 197 + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 198 + 199 + '@eslint/config-helpers@0.3.0': 200 + resolution: {integrity: sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==} 201 + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 202 + 203 + '@eslint/core@0.15.1': 204 + resolution: {integrity: sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==} 205 + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 206 + 207 + '@eslint/eslintrc@3.3.1': 208 + resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} 209 + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 210 + 211 + '@eslint/js@9.32.0': 212 + resolution: {integrity: sha512-BBpRFZK3eX6uMLKz8WxFOBIFFcGFJ/g8XuwjTHCqHROSIsopI+ddn/d5Cfh36+7+e5edVS8dbSHnBNhrLEX0zg==} 213 + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 214 + 215 + '@eslint/object-schema@2.1.6': 216 + resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} 217 + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 218 + 219 + '@eslint/plugin-kit@0.3.4': 220 + resolution: {integrity: sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==} 221 + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 222 + 223 + '@humanfs/core@0.19.1': 224 + resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} 225 + engines: {node: '>=18.18.0'} 226 + 227 + '@humanfs/node@0.16.6': 228 + resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} 229 + engines: {node: '>=18.18.0'} 230 + 231 + '@humanwhocodes/module-importer@1.0.1': 232 + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} 233 + engines: {node: '>=12.22'} 234 + 235 + '@humanwhocodes/retry@0.3.1': 236 + resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} 237 + engines: {node: '>=18.18'} 238 + 239 + '@humanwhocodes/retry@0.4.3': 240 + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} 241 + engines: {node: '>=18.18'} 242 + 243 + '@rollup/rollup-android-arm-eabi@4.46.2': 244 + resolution: {integrity: sha512-Zj3Hl6sN34xJtMv7Anwb5Gu01yujyE/cLBDB2gnHTAHaWS1Z38L7kuSG+oAh0giZMqG060f/YBStXtMH6FvPMA==} 245 + cpu: [arm] 246 + os: [android] 247 + 248 + '@rollup/rollup-android-arm64@4.46.2': 249 + resolution: {integrity: sha512-nTeCWY83kN64oQ5MGz3CgtPx8NSOhC5lWtsjTs+8JAJNLcP3QbLCtDDgUKQc/Ro/frpMq4SHUaHN6AMltcEoLQ==} 250 + cpu: [arm64] 251 + os: [android] 252 + 253 + '@rollup/rollup-darwin-arm64@4.46.2': 254 + resolution: {integrity: sha512-HV7bW2Fb/F5KPdM/9bApunQh68YVDU8sO8BvcW9OngQVN3HHHkw99wFupuUJfGR9pYLLAjcAOA6iO+evsbBaPQ==} 255 + cpu: [arm64] 256 + os: [darwin] 257 + 258 + '@rollup/rollup-darwin-x64@4.46.2': 259 + resolution: {integrity: sha512-SSj8TlYV5nJixSsm/y3QXfhspSiLYP11zpfwp6G/YDXctf3Xkdnk4woJIF5VQe0of2OjzTt8EsxnJDCdHd2xMA==} 260 + cpu: [x64] 261 + os: [darwin] 262 + 263 + '@rollup/rollup-freebsd-arm64@4.46.2': 264 + resolution: {integrity: sha512-ZyrsG4TIT9xnOlLsSSi9w/X29tCbK1yegE49RYm3tu3wF1L/B6LVMqnEWyDB26d9Ecx9zrmXCiPmIabVuLmNSg==} 265 + cpu: [arm64] 266 + os: [freebsd] 267 + 268 + '@rollup/rollup-freebsd-x64@4.46.2': 269 + resolution: {integrity: sha512-pCgHFoOECwVCJ5GFq8+gR8SBKnMO+xe5UEqbemxBpCKYQddRQMgomv1104RnLSg7nNvgKy05sLsY51+OVRyiVw==} 270 + cpu: [x64] 271 + os: [freebsd] 272 + 273 + '@rollup/rollup-linux-arm-gnueabihf@4.46.2': 274 + resolution: {integrity: sha512-EtP8aquZ0xQg0ETFcxUbU71MZlHaw9MChwrQzatiE8U/bvi5uv/oChExXC4mWhjiqK7azGJBqU0tt5H123SzVA==} 275 + cpu: [arm] 276 + os: [linux] 277 + 278 + '@rollup/rollup-linux-arm-musleabihf@4.46.2': 279 + resolution: {integrity: sha512-qO7F7U3u1nfxYRPM8HqFtLd+raev2K137dsV08q/LRKRLEc7RsiDWihUnrINdsWQxPR9jqZ8DIIZ1zJJAm5PjQ==} 280 + cpu: [arm] 281 + os: [linux] 282 + 283 + '@rollup/rollup-linux-arm64-gnu@4.46.2': 284 + resolution: {integrity: sha512-3dRaqLfcOXYsfvw5xMrxAk9Lb1f395gkoBYzSFcc/scgRFptRXL9DOaDpMiehf9CO8ZDRJW2z45b6fpU5nwjng==} 285 + cpu: [arm64] 286 + os: [linux] 287 + 288 + '@rollup/rollup-linux-arm64-musl@4.46.2': 289 + resolution: {integrity: sha512-fhHFTutA7SM+IrR6lIfiHskxmpmPTJUXpWIsBXpeEwNgZzZZSg/q4i6FU4J8qOGyJ0TR+wXBwx/L7Ho9z0+uDg==} 290 + cpu: [arm64] 291 + os: [linux] 292 + 293 + '@rollup/rollup-linux-loongarch64-gnu@4.46.2': 294 + resolution: {integrity: sha512-i7wfGFXu8x4+FRqPymzjD+Hyav8l95UIZ773j7J7zRYc3Xsxy2wIn4x+llpunexXe6laaO72iEjeeGyUFmjKeA==} 295 + cpu: [loong64] 296 + os: [linux] 297 + 298 + '@rollup/rollup-linux-ppc64-gnu@4.46.2': 299 + resolution: {integrity: sha512-B/l0dFcHVUnqcGZWKcWBSV2PF01YUt0Rvlurci5P+neqY/yMKchGU8ullZvIv5e8Y1C6wOn+U03mrDylP5q9Yw==} 300 + cpu: [ppc64] 301 + os: [linux] 302 + 303 + '@rollup/rollup-linux-riscv64-gnu@4.46.2': 304 + resolution: {integrity: sha512-32k4ENb5ygtkMwPMucAb8MtV8olkPT03oiTxJbgkJa7lJ7dZMr0GCFJlyvy+K8iq7F/iuOr41ZdUHaOiqyR3iQ==} 305 + cpu: [riscv64] 306 + os: [linux] 307 + 308 + '@rollup/rollup-linux-riscv64-musl@4.46.2': 309 + resolution: {integrity: sha512-t5B2loThlFEauloaQkZg9gxV05BYeITLvLkWOkRXogP4qHXLkWSbSHKM9S6H1schf/0YGP/qNKtiISlxvfmmZw==} 310 + cpu: [riscv64] 311 + os: [linux] 312 + 313 + '@rollup/rollup-linux-s390x-gnu@4.46.2': 314 + resolution: {integrity: sha512-YKjekwTEKgbB7n17gmODSmJVUIvj8CX7q5442/CK80L8nqOUbMtf8b01QkG3jOqyr1rotrAnW6B/qiHwfcuWQA==} 315 + cpu: [s390x] 316 + os: [linux] 317 + 318 + '@rollup/rollup-linux-x64-gnu@4.46.2': 319 + resolution: {integrity: sha512-Jj5a9RUoe5ra+MEyERkDKLwTXVu6s3aACP51nkfnK9wJTraCC8IMe3snOfALkrjTYd2G1ViE1hICj0fZ7ALBPA==} 320 + cpu: [x64] 321 + os: [linux] 322 + 323 + '@rollup/rollup-linux-x64-musl@4.46.2': 324 + resolution: {integrity: sha512-7kX69DIrBeD7yNp4A5b81izs8BqoZkCIaxQaOpumcJ1S/kmqNFjPhDu1LHeVXv0SexfHQv5cqHsxLOjETuqDuA==} 325 + cpu: [x64] 326 + os: [linux] 327 + 328 + '@rollup/rollup-win32-arm64-msvc@4.46.2': 329 + resolution: {integrity: sha512-wiJWMIpeaak/jsbaq2HMh/rzZxHVW1rU6coyeNNpMwk5isiPjSTx0a4YLSlYDwBH/WBvLz+EtsNqQScZTLJy3g==} 330 + cpu: [arm64] 331 + os: [win32] 332 + 333 + '@rollup/rollup-win32-ia32-msvc@4.46.2': 334 + resolution: {integrity: sha512-gBgaUDESVzMgWZhcyjfs9QFK16D8K6QZpwAaVNJxYDLHWayOta4ZMjGm/vsAEy3hvlS2GosVFlBlP9/Wb85DqQ==} 335 + cpu: [ia32] 336 + os: [win32] 337 + 338 + '@rollup/rollup-win32-x64-msvc@4.46.2': 339 + resolution: {integrity: sha512-CvUo2ixeIQGtF6WvuB87XWqPQkoFAFqW+HUo/WzHwuHDvIwZCtjdWXoYCcr06iKGydiqTclC4jU/TNObC/xKZg==} 340 + cpu: [x64] 341 + os: [win32] 342 + 343 + '@rollup/wasm-node@4.46.2': 344 + resolution: {integrity: sha512-lZRiZl+B1R3VhqZgORtuUpc2YYbgIv+X6g3LgQHS5sjlf1ENiK1HZ6N5e8pEZ04nAWiwYM0JX7rP0eyxflkJRg==} 345 + engines: {node: '>=18.0.0', npm: '>=8.0.0'} 346 + hasBin: true 347 + 348 + '@types/estree@1.0.8': 349 + resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} 350 + 351 + '@types/json-schema@7.0.15': 352 + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} 353 + 354 + acorn-jsx@5.3.2: 355 + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} 356 + peerDependencies: 357 + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 358 + 359 + acorn@8.15.0: 360 + resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} 361 + engines: {node: '>=0.4.0'} 362 + hasBin: true 363 + 364 + ajv@6.12.6: 365 + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} 366 + 367 + ansi-styles@4.3.0: 368 + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} 369 + engines: {node: '>=8'} 370 + 371 + argparse@2.0.1: 372 + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} 373 + 374 + balanced-match@1.0.2: 375 + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} 376 + 377 + brace-expansion@1.1.12: 378 + resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} 379 + 380 + braces@3.0.3: 381 + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} 382 + engines: {node: '>=8'} 383 + 384 + callsites@3.1.0: 385 + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} 386 + engines: {node: '>=6'} 387 + 388 + chalk@4.1.2: 389 + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} 390 + engines: {node: '>=10'} 391 + 392 + color-convert@2.0.1: 393 + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} 394 + engines: {node: '>=7.0.0'} 395 + 396 + color-name@1.1.4: 397 + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} 398 + 399 + concat-map@0.0.1: 400 + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} 401 + 402 + cross-spawn@7.0.6: 403 + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} 404 + engines: {node: '>= 8'} 405 + 406 + debug@4.4.1: 407 + resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} 408 + engines: {node: '>=6.0'} 409 + peerDependencies: 410 + supports-color: '*' 411 + peerDependenciesMeta: 412 + supports-color: 413 + optional: true 414 + 415 + deep-is@0.1.4: 416 + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} 417 + 418 + diff@8.0.2: 419 + resolution: {integrity: sha512-sSuxWU5j5SR9QQji/o2qMvqRNYRDOcBTgsJ/DeCf4iSN4gW+gNMXM7wFIP+fdXZxoNiAnHUTGjCr+TSWXdRDKg==} 420 + engines: {node: '>=0.3.1'} 421 + 422 + dom-serializer@2.0.0: 423 + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} 424 + 425 + domelementtype@2.3.0: 426 + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} 427 + 428 + domhandler@5.0.3: 429 + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} 430 + engines: {node: '>= 4'} 431 + 432 + domutils@3.2.2: 433 + resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==} 434 + 435 + entities@4.5.0: 436 + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} 437 + engines: {node: '>=0.12'} 438 + 439 + esbuild@0.21.5: 440 + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} 441 + engines: {node: '>=12'} 442 + hasBin: true 443 + 444 + escape-string-regexp@4.0.0: 445 + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} 446 + engines: {node: '>=10'} 447 + 448 + eslint-scope@8.4.0: 449 + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} 450 + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 451 + 452 + eslint-visitor-keys@3.4.3: 453 + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} 454 + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} 455 + 456 + eslint-visitor-keys@4.2.1: 457 + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} 458 + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 459 + 460 + eslint@9.32.0: 461 + resolution: {integrity: sha512-LSehfdpgMeWcTZkWZVIJl+tkZ2nuSkyyB9C27MZqFWXuph7DvaowgcTvKqxvpLW1JZIk8PN7hFY3Rj9LQ7m7lg==} 462 + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 463 + hasBin: true 464 + peerDependencies: 465 + jiti: '*' 466 + peerDependenciesMeta: 467 + jiti: 468 + optional: true 469 + 470 + espree@10.4.0: 471 + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} 472 + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 473 + 474 + esquery@1.6.0: 475 + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} 476 + engines: {node: '>=0.10'} 477 + 478 + esrecurse@4.3.0: 479 + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} 480 + engines: {node: '>=4.0'} 481 + 482 + estraverse@5.3.0: 483 + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} 484 + engines: {node: '>=4.0'} 485 + 486 + esutils@2.0.3: 487 + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} 488 + engines: {node: '>=0.10.0'} 489 + 490 + fast-deep-equal@3.1.3: 491 + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} 492 + 493 + fast-json-stable-stringify@2.1.0: 494 + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} 495 + 496 + fast-levenshtein@2.0.6: 497 + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} 498 + 499 + file-entry-cache@8.0.0: 500 + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} 501 + engines: {node: '>=16.0.0'} 502 + 503 + fill-range@7.1.1: 504 + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} 505 + engines: {node: '>=8'} 506 + 507 + find-up@5.0.0: 508 + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} 509 + engines: {node: '>=10'} 510 + 511 + flat-cache@4.0.1: 512 + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} 513 + engines: {node: '>=16'} 514 + 515 + flatted@3.3.3: 516 + resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} 517 + 518 + fsevents@2.3.3: 519 + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} 520 + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} 521 + os: [darwin] 522 + 523 + glob-parent@6.0.2: 524 + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} 525 + engines: {node: '>=10.13.0'} 526 + 527 + globals@14.0.0: 528 + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} 529 + engines: {node: '>=18'} 530 + 531 + globals@16.3.0: 532 + resolution: {integrity: sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ==} 533 + engines: {node: '>=18'} 534 + 535 + has-flag@4.0.0: 536 + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} 537 + engines: {node: '>=8'} 538 + 539 + htmlparser2@9.1.0: 540 + resolution: {integrity: sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==} 541 + 542 + ignore@5.3.2: 543 + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} 544 + engines: {node: '>= 4'} 545 + 546 + import-fresh@3.3.1: 547 + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} 548 + engines: {node: '>=6'} 549 + 550 + imurmurhash@0.1.4: 551 + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} 552 + engines: {node: '>=0.8.19'} 553 + 554 + is-extglob@2.1.1: 555 + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} 556 + engines: {node: '>=0.10.0'} 557 + 558 + is-glob@4.0.3: 559 + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} 560 + engines: {node: '>=0.10.0'} 561 + 562 + is-number@7.0.0: 563 + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} 564 + engines: {node: '>=0.12.0'} 565 + 566 + isexe@2.0.0: 567 + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} 568 + 569 + js-yaml@4.1.0: 570 + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} 571 + hasBin: true 572 + 573 + json-buffer@3.0.1: 574 + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} 575 + 576 + json-schema-traverse@0.4.1: 577 + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} 578 + 579 + json-stable-stringify-without-jsonify@1.0.1: 580 + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} 581 + 582 + keyv@4.5.4: 583 + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} 584 + 585 + levn@0.4.1: 586 + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} 587 + engines: {node: '>= 0.8.0'} 588 + 589 + locate-path@6.0.0: 590 + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} 591 + engines: {node: '>=10'} 592 + 593 + lodash.merge@4.6.2: 594 + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} 595 + 596 + micromatch@4.0.8: 597 + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} 598 + engines: {node: '>=8.6'} 599 + 600 + minimatch@3.1.2: 601 + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} 602 + 603 + ms@2.1.3: 604 + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} 605 + 606 + nanoid@3.3.11: 607 + resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} 608 + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} 609 + hasBin: true 610 + 611 + natural-compare@1.4.0: 612 + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} 613 + 614 + optionator@0.9.4: 615 + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} 616 + engines: {node: '>= 0.8.0'} 617 + 618 + p-limit@3.1.0: 619 + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} 620 + engines: {node: '>=10'} 621 + 622 + p-locate@5.0.0: 623 + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} 624 + engines: {node: '>=10'} 625 + 626 + parent-module@1.0.1: 627 + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} 628 + engines: {node: '>=6'} 629 + 630 + path-exists@4.0.0: 631 + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} 632 + engines: {node: '>=8'} 633 + 634 + path-key@3.1.1: 635 + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} 636 + engines: {node: '>=8'} 637 + 638 + picocolors@1.1.1: 639 + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} 640 + 641 + picomatch@2.3.1: 642 + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} 643 + engines: {node: '>=8.6'} 644 + 645 + postcss@8.5.6: 646 + resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} 647 + engines: {node: ^10 || ^12 || >=14} 648 + 649 + prelude-ls@1.2.1: 650 + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} 651 + engines: {node: '>= 0.8.0'} 652 + 653 + punycode@2.3.1: 654 + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} 655 + engines: {node: '>=6'} 656 + 657 + resolve-from@4.0.0: 658 + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} 659 + engines: {node: '>=4'} 660 + 661 + rollup@4.46.2: 662 + resolution: {integrity: sha512-WMmLFI+Boh6xbop+OAGo9cQ3OgX9MIg7xOQjn+pTCwOkk+FNDAeAemXkJ3HzDJrVXleLOFVa1ipuc1AmEx1Dwg==} 663 + engines: {node: '>=18.0.0', npm: '>=8.0.0'} 664 + hasBin: true 665 + 666 + shebang-command@2.0.0: 667 + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} 668 + engines: {node: '>=8'} 669 + 670 + shebang-regex@3.0.0: 671 + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} 672 + engines: {node: '>=8'} 673 + 674 + source-map-js@1.2.1: 675 + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} 676 + engines: {node: '>=0.10.0'} 677 + 678 + strip-json-comments@3.1.1: 679 + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} 680 + engines: {node: '>=8'} 681 + 682 + supports-color@7.2.0: 683 + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} 684 + engines: {node: '>=8'} 685 + 686 + to-regex-range@5.0.1: 687 + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} 688 + engines: {node: '>=8.0'} 689 + 690 + type-check@0.4.0: 691 + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} 692 + engines: {node: '>= 0.8.0'} 693 + 694 + uri-js@4.4.1: 695 + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} 696 + 697 + vite-plugin-dom@1.0.4: 698 + resolution: {integrity: sha512-GkmDAsVDo0Aabb7RmGTGWZNDowV5K+IkrhmJfrgMpgjHdE7F8H1OsTk48DQmnQ/2llM5UvP4z5h0icdsnL/C/g==} 699 + peerDependencies: 700 + vite: '>=4.0.0' 701 + 702 + vite-plugin-singlefile@2.3.0: 703 + resolution: {integrity: sha512-DAcHzYypM0CasNLSz/WG0VdKOCxGHErfrjOoyIPiNxTPTGmO6rRD/te93n1YL/s+miXq66ipF1brMBikf99c6A==} 704 + engines: {node: '>18.0.0'} 705 + peerDependencies: 706 + rollup: ^4.44.1 707 + vite: ^5.4.11 || ^6.0.0 || ^7.0.0 708 + 709 + vite@5.4.19: 710 + resolution: {integrity: sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==} 711 + engines: {node: ^18.0.0 || >=20.0.0} 712 + hasBin: true 713 + peerDependencies: 714 + '@types/node': ^18.0.0 || >=20.0.0 715 + less: '*' 716 + lightningcss: ^1.21.0 717 + sass: '*' 718 + sass-embedded: '*' 719 + stylus: '*' 720 + sugarss: '*' 721 + terser: ^5.4.0 722 + peerDependenciesMeta: 723 + '@types/node': 724 + optional: true 725 + less: 726 + optional: true 727 + lightningcss: 728 + optional: true 729 + sass: 730 + optional: true 731 + sass-embedded: 732 + optional: true 733 + stylus: 734 + optional: true 735 + sugarss: 736 + optional: true 737 + terser: 738 + optional: true 739 + 740 + which@2.0.2: 741 + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} 742 + engines: {node: '>= 8'} 743 + hasBin: true 744 + 745 + word-wrap@1.2.5: 746 + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} 747 + engines: {node: '>=0.10.0'} 748 + 749 + yocto-queue@0.1.0: 750 + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} 751 + engines: {node: '>=10'} 752 + 753 + snapshots: 754 + 755 + '@esbuild/aix-ppc64@0.21.5': 756 + optional: true 757 + 758 + '@esbuild/android-arm64@0.21.5': 759 + optional: true 760 + 761 + '@esbuild/android-arm@0.21.5': 762 + optional: true 763 + 764 + '@esbuild/android-x64@0.21.5': 765 + optional: true 766 + 767 + '@esbuild/darwin-arm64@0.21.5': 768 + optional: true 769 + 770 + '@esbuild/darwin-x64@0.21.5': 771 + optional: true 772 + 773 + '@esbuild/freebsd-arm64@0.21.5': 774 + optional: true 775 + 776 + '@esbuild/freebsd-x64@0.21.5': 777 + optional: true 778 + 779 + '@esbuild/linux-arm64@0.21.5': 780 + optional: true 781 + 782 + '@esbuild/linux-arm@0.21.5': 783 + optional: true 784 + 785 + '@esbuild/linux-ia32@0.21.5': 786 + optional: true 787 + 788 + '@esbuild/linux-loong64@0.21.5': 789 + optional: true 790 + 791 + '@esbuild/linux-mips64el@0.21.5': 792 + optional: true 793 + 794 + '@esbuild/linux-ppc64@0.21.5': 795 + optional: true 796 + 797 + '@esbuild/linux-riscv64@0.21.5': 798 + optional: true 799 + 800 + '@esbuild/linux-s390x@0.21.5': 801 + optional: true 802 + 803 + '@esbuild/linux-x64@0.21.5': 804 + optional: true 805 + 806 + '@esbuild/netbsd-x64@0.21.5': 807 + optional: true 808 + 809 + '@esbuild/openbsd-x64@0.21.5': 810 + optional: true 811 + 812 + '@esbuild/sunos-x64@0.21.5': 813 + optional: true 814 + 815 + '@esbuild/win32-arm64@0.21.5': 816 + optional: true 817 + 818 + '@esbuild/win32-ia32@0.21.5': 819 + optional: true 820 + 821 + '@esbuild/win32-x64@0.21.5': 822 + optional: true 823 + 824 + '@eslint-community/eslint-utils@4.7.0(eslint@9.32.0)': 825 + dependencies: 826 + eslint: 9.32.0 827 + eslint-visitor-keys: 3.4.3 828 + 829 + '@eslint-community/regexpp@4.12.1': {} 830 + 831 + '@eslint/config-array@0.21.0': 832 + dependencies: 833 + '@eslint/object-schema': 2.1.6 834 + debug: 4.4.1 835 + minimatch: 3.1.2 836 + transitivePeerDependencies: 837 + - supports-color 838 + 839 + '@eslint/config-helpers@0.3.0': {} 840 + 841 + '@eslint/core@0.15.1': 842 + dependencies: 843 + '@types/json-schema': 7.0.15 844 + 845 + '@eslint/eslintrc@3.3.1': 846 + dependencies: 847 + ajv: 6.12.6 848 + debug: 4.4.1 849 + espree: 10.4.0 850 + globals: 14.0.0 851 + ignore: 5.3.2 852 + import-fresh: 3.3.1 853 + js-yaml: 4.1.0 854 + minimatch: 3.1.2 855 + strip-json-comments: 3.1.1 856 + transitivePeerDependencies: 857 + - supports-color 858 + 859 + '@eslint/js@9.32.0': {} 860 + 861 + '@eslint/object-schema@2.1.6': {} 862 + 863 + '@eslint/plugin-kit@0.3.4': 864 + dependencies: 865 + '@eslint/core': 0.15.1 866 + levn: 0.4.1 867 + 868 + '@humanfs/core@0.19.1': {} 869 + 870 + '@humanfs/node@0.16.6': 871 + dependencies: 872 + '@humanfs/core': 0.19.1 873 + '@humanwhocodes/retry': 0.3.1 874 + 875 + '@humanwhocodes/module-importer@1.0.1': {} 876 + 877 + '@humanwhocodes/retry@0.3.1': {} 878 + 879 + '@humanwhocodes/retry@0.4.3': {} 880 + 881 + '@rollup/rollup-android-arm-eabi@4.46.2': 882 + optional: true 883 + 884 + '@rollup/rollup-android-arm64@4.46.2': 885 + optional: true 886 + 887 + '@rollup/rollup-darwin-arm64@4.46.2': 888 + optional: true 889 + 890 + '@rollup/rollup-darwin-x64@4.46.2': 891 + optional: true 892 + 893 + '@rollup/rollup-freebsd-arm64@4.46.2': 894 + optional: true 895 + 896 + '@rollup/rollup-freebsd-x64@4.46.2': 897 + optional: true 898 + 899 + '@rollup/rollup-linux-arm-gnueabihf@4.46.2': 900 + optional: true 901 + 902 + '@rollup/rollup-linux-arm-musleabihf@4.46.2': 903 + optional: true 904 + 905 + '@rollup/rollup-linux-arm64-gnu@4.46.2': 906 + optional: true 907 + 908 + '@rollup/rollup-linux-arm64-musl@4.46.2': 909 + optional: true 910 + 911 + '@rollup/rollup-linux-loongarch64-gnu@4.46.2': 912 + optional: true 913 + 914 + '@rollup/rollup-linux-ppc64-gnu@4.46.2': 915 + optional: true 916 + 917 + '@rollup/rollup-linux-riscv64-gnu@4.46.2': 918 + optional: true 919 + 920 + '@rollup/rollup-linux-riscv64-musl@4.46.2': 921 + optional: true 922 + 923 + '@rollup/rollup-linux-s390x-gnu@4.46.2': 924 + optional: true 925 + 926 + '@rollup/rollup-linux-x64-gnu@4.46.2': 927 + optional: true 928 + 929 + '@rollup/rollup-linux-x64-musl@4.46.2': 930 + optional: true 931 + 932 + '@rollup/rollup-win32-arm64-msvc@4.46.2': 933 + optional: true 934 + 935 + '@rollup/rollup-win32-ia32-msvc@4.46.2': 936 + optional: true 937 + 938 + '@rollup/rollup-win32-x64-msvc@4.46.2': 939 + optional: true 940 + 941 + '@rollup/wasm-node@4.46.2': 942 + dependencies: 943 + '@types/estree': 1.0.8 944 + optionalDependencies: 945 + fsevents: 2.3.3 946 + 947 + '@types/estree@1.0.8': {} 948 + 949 + '@types/json-schema@7.0.15': {} 950 + 951 + acorn-jsx@5.3.2(acorn@8.15.0): 952 + dependencies: 953 + acorn: 8.15.0 954 + 955 + acorn@8.15.0: {} 956 + 957 + ajv@6.12.6: 958 + dependencies: 959 + fast-deep-equal: 3.1.3 960 + fast-json-stable-stringify: 2.1.0 961 + json-schema-traverse: 0.4.1 962 + uri-js: 4.4.1 963 + 964 + ansi-styles@4.3.0: 965 + dependencies: 966 + color-convert: 2.0.1 967 + 968 + argparse@2.0.1: {} 969 + 970 + balanced-match@1.0.2: {} 971 + 972 + brace-expansion@1.1.12: 973 + dependencies: 974 + balanced-match: 1.0.2 975 + concat-map: 0.0.1 976 + 977 + braces@3.0.3: 978 + dependencies: 979 + fill-range: 7.1.1 980 + 981 + callsites@3.1.0: {} 982 + 983 + chalk@4.1.2: 984 + dependencies: 985 + ansi-styles: 4.3.0 986 + supports-color: 7.2.0 987 + 988 + color-convert@2.0.1: 989 + dependencies: 990 + color-name: 1.1.4 991 + 992 + color-name@1.1.4: {} 993 + 994 + concat-map@0.0.1: {} 995 + 996 + cross-spawn@7.0.6: 997 + dependencies: 998 + path-key: 3.1.1 999 + shebang-command: 2.0.0 1000 + which: 2.0.2 1001 + 1002 + debug@4.4.1: 1003 + dependencies: 1004 + ms: 2.1.3 1005 + 1006 + deep-is@0.1.4: {} 1007 + 1008 + diff@8.0.2: {} 1009 + 1010 + dom-serializer@2.0.0: 1011 + dependencies: 1012 + domelementtype: 2.3.0 1013 + domhandler: 5.0.3 1014 + entities: 4.5.0 1015 + 1016 + domelementtype@2.3.0: {} 1017 + 1018 + domhandler@5.0.3: 1019 + dependencies: 1020 + domelementtype: 2.3.0 1021 + 1022 + domutils@3.2.2: 1023 + dependencies: 1024 + dom-serializer: 2.0.0 1025 + domelementtype: 2.3.0 1026 + domhandler: 5.0.3 1027 + 1028 + entities@4.5.0: {} 1029 + 1030 + esbuild@0.21.5: 1031 + optionalDependencies: 1032 + '@esbuild/aix-ppc64': 0.21.5 1033 + '@esbuild/android-arm': 0.21.5 1034 + '@esbuild/android-arm64': 0.21.5 1035 + '@esbuild/android-x64': 0.21.5 1036 + '@esbuild/darwin-arm64': 0.21.5 1037 + '@esbuild/darwin-x64': 0.21.5 1038 + '@esbuild/freebsd-arm64': 0.21.5 1039 + '@esbuild/freebsd-x64': 0.21.5 1040 + '@esbuild/linux-arm': 0.21.5 1041 + '@esbuild/linux-arm64': 0.21.5 1042 + '@esbuild/linux-ia32': 0.21.5 1043 + '@esbuild/linux-loong64': 0.21.5 1044 + '@esbuild/linux-mips64el': 0.21.5 1045 + '@esbuild/linux-ppc64': 0.21.5 1046 + '@esbuild/linux-riscv64': 0.21.5 1047 + '@esbuild/linux-s390x': 0.21.5 1048 + '@esbuild/linux-x64': 0.21.5 1049 + '@esbuild/netbsd-x64': 0.21.5 1050 + '@esbuild/openbsd-x64': 0.21.5 1051 + '@esbuild/sunos-x64': 0.21.5 1052 + '@esbuild/win32-arm64': 0.21.5 1053 + '@esbuild/win32-ia32': 0.21.5 1054 + '@esbuild/win32-x64': 0.21.5 1055 + 1056 + escape-string-regexp@4.0.0: {} 1057 + 1058 + eslint-scope@8.4.0: 1059 + dependencies: 1060 + esrecurse: 4.3.0 1061 + estraverse: 5.3.0 1062 + 1063 + eslint-visitor-keys@3.4.3: {} 1064 + 1065 + eslint-visitor-keys@4.2.1: {} 1066 + 1067 + eslint@9.32.0: 1068 + dependencies: 1069 + '@eslint-community/eslint-utils': 4.7.0(eslint@9.32.0) 1070 + '@eslint-community/regexpp': 4.12.1 1071 + '@eslint/config-array': 0.21.0 1072 + '@eslint/config-helpers': 0.3.0 1073 + '@eslint/core': 0.15.1 1074 + '@eslint/eslintrc': 3.3.1 1075 + '@eslint/js': 9.32.0 1076 + '@eslint/plugin-kit': 0.3.4 1077 + '@humanfs/node': 0.16.6 1078 + '@humanwhocodes/module-importer': 1.0.1 1079 + '@humanwhocodes/retry': 0.4.3 1080 + '@types/estree': 1.0.8 1081 + '@types/json-schema': 7.0.15 1082 + ajv: 6.12.6 1083 + chalk: 4.1.2 1084 + cross-spawn: 7.0.6 1085 + debug: 4.4.1 1086 + escape-string-regexp: 4.0.0 1087 + eslint-scope: 8.4.0 1088 + eslint-visitor-keys: 4.2.1 1089 + espree: 10.4.0 1090 + esquery: 1.6.0 1091 + esutils: 2.0.3 1092 + fast-deep-equal: 3.1.3 1093 + file-entry-cache: 8.0.0 1094 + find-up: 5.0.0 1095 + glob-parent: 6.0.2 1096 + ignore: 5.3.2 1097 + imurmurhash: 0.1.4 1098 + is-glob: 4.0.3 1099 + json-stable-stringify-without-jsonify: 1.0.1 1100 + lodash.merge: 4.6.2 1101 + minimatch: 3.1.2 1102 + natural-compare: 1.4.0 1103 + optionator: 0.9.4 1104 + transitivePeerDependencies: 1105 + - supports-color 1106 + 1107 + espree@10.4.0: 1108 + dependencies: 1109 + acorn: 8.15.0 1110 + acorn-jsx: 5.3.2(acorn@8.15.0) 1111 + eslint-visitor-keys: 4.2.1 1112 + 1113 + esquery@1.6.0: 1114 + dependencies: 1115 + estraverse: 5.3.0 1116 + 1117 + esrecurse@4.3.0: 1118 + dependencies: 1119 + estraverse: 5.3.0 1120 + 1121 + estraverse@5.3.0: {} 1122 + 1123 + esutils@2.0.3: {} 1124 + 1125 + fast-deep-equal@3.1.3: {} 1126 + 1127 + fast-json-stable-stringify@2.1.0: {} 1128 + 1129 + fast-levenshtein@2.0.6: {} 1130 + 1131 + file-entry-cache@8.0.0: 1132 + dependencies: 1133 + flat-cache: 4.0.1 1134 + 1135 + fill-range@7.1.1: 1136 + dependencies: 1137 + to-regex-range: 5.0.1 1138 + 1139 + find-up@5.0.0: 1140 + dependencies: 1141 + locate-path: 6.0.0 1142 + path-exists: 4.0.0 1143 + 1144 + flat-cache@4.0.1: 1145 + dependencies: 1146 + flatted: 3.3.3 1147 + keyv: 4.5.4 1148 + 1149 + flatted@3.3.3: {} 1150 + 1151 + fsevents@2.3.3: 1152 + optional: true 1153 + 1154 + glob-parent@6.0.2: 1155 + dependencies: 1156 + is-glob: 4.0.3 1157 + 1158 + globals@14.0.0: {} 1159 + 1160 + globals@16.3.0: {} 1161 + 1162 + has-flag@4.0.0: {} 1163 + 1164 + htmlparser2@9.1.0: 1165 + dependencies: 1166 + domelementtype: 2.3.0 1167 + domhandler: 5.0.3 1168 + domutils: 3.2.2 1169 + entities: 4.5.0 1170 + 1171 + ignore@5.3.2: {} 1172 + 1173 + import-fresh@3.3.1: 1174 + dependencies: 1175 + parent-module: 1.0.1 1176 + resolve-from: 4.0.0 1177 + 1178 + imurmurhash@0.1.4: {} 1179 + 1180 + is-extglob@2.1.1: {} 1181 + 1182 + is-glob@4.0.3: 1183 + dependencies: 1184 + is-extglob: 2.1.1 1185 + 1186 + is-number@7.0.0: {} 1187 + 1188 + isexe@2.0.0: {} 1189 + 1190 + js-yaml@4.1.0: 1191 + dependencies: 1192 + argparse: 2.0.1 1193 + 1194 + json-buffer@3.0.1: {} 1195 + 1196 + json-schema-traverse@0.4.1: {} 1197 + 1198 + json-stable-stringify-without-jsonify@1.0.1: {} 1199 + 1200 + keyv@4.5.4: 1201 + dependencies: 1202 + json-buffer: 3.0.1 1203 + 1204 + levn@0.4.1: 1205 + dependencies: 1206 + prelude-ls: 1.2.1 1207 + type-check: 0.4.0 1208 + 1209 + locate-path@6.0.0: 1210 + dependencies: 1211 + p-locate: 5.0.0 1212 + 1213 + lodash.merge@4.6.2: {} 1214 + 1215 + micromatch@4.0.8: 1216 + dependencies: 1217 + braces: 3.0.3 1218 + picomatch: 2.3.1 1219 + 1220 + minimatch@3.1.2: 1221 + dependencies: 1222 + brace-expansion: 1.1.12 1223 + 1224 + ms@2.1.3: {} 1225 + 1226 + nanoid@3.3.11: {} 1227 + 1228 + natural-compare@1.4.0: {} 1229 + 1230 + optionator@0.9.4: 1231 + dependencies: 1232 + deep-is: 0.1.4 1233 + fast-levenshtein: 2.0.6 1234 + levn: 0.4.1 1235 + prelude-ls: 1.2.1 1236 + type-check: 0.4.0 1237 + word-wrap: 1.2.5 1238 + 1239 + p-limit@3.1.0: 1240 + dependencies: 1241 + yocto-queue: 0.1.0 1242 + 1243 + p-locate@5.0.0: 1244 + dependencies: 1245 + p-limit: 3.1.0 1246 + 1247 + parent-module@1.0.1: 1248 + dependencies: 1249 + callsites: 3.1.0 1250 + 1251 + path-exists@4.0.0: {} 1252 + 1253 + path-key@3.1.1: {} 1254 + 1255 + picocolors@1.1.1: {} 1256 + 1257 + picomatch@2.3.1: {} 1258 + 1259 + postcss@8.5.6: 1260 + dependencies: 1261 + nanoid: 3.3.11 1262 + picocolors: 1.1.1 1263 + source-map-js: 1.2.1 1264 + 1265 + prelude-ls@1.2.1: {} 1266 + 1267 + punycode@2.3.1: {} 1268 + 1269 + resolve-from@4.0.0: {} 1270 + 1271 + rollup@4.46.2: 1272 + dependencies: 1273 + '@types/estree': 1.0.8 1274 + optionalDependencies: 1275 + '@rollup/rollup-android-arm-eabi': 4.46.2 1276 + '@rollup/rollup-android-arm64': 4.46.2 1277 + '@rollup/rollup-darwin-arm64': 4.46.2 1278 + '@rollup/rollup-darwin-x64': 4.46.2 1279 + '@rollup/rollup-freebsd-arm64': 4.46.2 1280 + '@rollup/rollup-freebsd-x64': 4.46.2 1281 + '@rollup/rollup-linux-arm-gnueabihf': 4.46.2 1282 + '@rollup/rollup-linux-arm-musleabihf': 4.46.2 1283 + '@rollup/rollup-linux-arm64-gnu': 4.46.2 1284 + '@rollup/rollup-linux-arm64-musl': 4.46.2 1285 + '@rollup/rollup-linux-loongarch64-gnu': 4.46.2 1286 + '@rollup/rollup-linux-ppc64-gnu': 4.46.2 1287 + '@rollup/rollup-linux-riscv64-gnu': 4.46.2 1288 + '@rollup/rollup-linux-riscv64-musl': 4.46.2 1289 + '@rollup/rollup-linux-s390x-gnu': 4.46.2 1290 + '@rollup/rollup-linux-x64-gnu': 4.46.2 1291 + '@rollup/rollup-linux-x64-musl': 4.46.2 1292 + '@rollup/rollup-win32-arm64-msvc': 4.46.2 1293 + '@rollup/rollup-win32-ia32-msvc': 4.46.2 1294 + '@rollup/rollup-win32-x64-msvc': 4.46.2 1295 + fsevents: 2.3.3 1296 + 1297 + shebang-command@2.0.0: 1298 + dependencies: 1299 + shebang-regex: 3.0.0 1300 + 1301 + shebang-regex@3.0.0: {} 1302 + 1303 + source-map-js@1.2.1: {} 1304 + 1305 + strip-json-comments@3.1.1: {} 1306 + 1307 + supports-color@7.2.0: 1308 + dependencies: 1309 + has-flag: 4.0.0 1310 + 1311 + to-regex-range@5.0.1: 1312 + dependencies: 1313 + is-number: 7.0.0 1314 + 1315 + type-check@0.4.0: 1316 + dependencies: 1317 + prelude-ls: 1.2.1 1318 + 1319 + uri-js@4.4.1: 1320 + dependencies: 1321 + punycode: 2.3.1 1322 + 1323 + vite-plugin-dom@1.0.4(vite@5.4.19): 1324 + dependencies: 1325 + htmlparser2: 9.1.0 1326 + vite: 5.4.19 1327 + 1328 + vite-plugin-singlefile@2.3.0(rollup@4.46.2)(vite@5.4.19): 1329 + dependencies: 1330 + micromatch: 4.0.8 1331 + rollup: 4.46.2 1332 + vite: 5.4.19 1333 + 1334 + vite@5.4.19: 1335 + dependencies: 1336 + esbuild: 0.21.5 1337 + postcss: 8.5.6 1338 + rollup: '@rollup/wasm-node@4.46.2' 1339 + optionalDependencies: 1340 + fsevents: 2.3.3 1341 + 1342 + which@2.0.2: 1343 + dependencies: 1344 + isexe: 2.0.0 1345 + 1346 + word-wrap@1.2.5: {} 1347 + 1348 + yocto-queue@0.1.0: {}
+14 -14
release.sh
··· 1 1 #!/bin/sh 2 2 set -e 3 3 FILES=" 4 - asn1.js oids.js defs.js base64.js hex.js int10.js dom.js rfcdef.js test.js tags.js 5 - index.css index-dark.css index.js index.html favicon.svg 6 - README.md LICENSE 4 + asn1.js oids.js defs.js base64.js hex.js int10.js dom.js context.js theme.js 5 + rfcdef.js test.js tags.js 6 + index.html index.css index.js index-local.html 7 + favicon.svg tree-icon-light.svg tree-icon-dark.svg 8 + README.md LICENSE CHANGELOG.md 7 9 updateOID.sh check.sh 8 10 examples 9 11 " 10 - mtn automate tags it.lapo.asn1js | \ 12 + mtn automate tags 'it.lapo.asn1js{,.*}' | \ 11 13 awk '/^revision/ { print substr($2, 2, length($2) - 2)}' | \ 12 14 while read rev; do 13 15 mtn automate certs $rev | awk -v q='"' ' ··· 19 21 ' 20 22 done | sort -r | awk -v q='"' ' 21 23 BEGIN { 22 - print "(typeof define != " q "undefined" q " ? define : function (factory) { " q "use strict" q ";"; 23 - print " if (typeof module == " q "object" q ") module.exports = factory();"; 24 - print " else window.tags = factory();"; 25 - print "})(function () {"; 26 - print q "use strict" q ";"; 27 - print "return {" 24 + print "export const tags = {" 28 25 } 29 - { print " " q $2 q ":" q $1 q "," } 30 - END { print "};});" } 26 + { print " " q $2 q ": " q $1 q "," } 27 + END { print "};" } 31 28 ' > tags.js 32 - type gsha256sum >/dev/null && SHA256=gsha256sum || SHA256=sha256sum 33 - $SHA256 -t $FILES | gpg --clearsign > sha256sums.asc 29 + chmod 644 examples/* 30 + type gsha256sum >/dev/null 2>/dev/null && SHA256=gsha256sum || SHA256=sha256sum 31 + pnpm build 32 + cp dist/index.html index-local.html 33 + $SHA256 -t $FILES examples/* | gpg --clearsign > sha256sums.asc 34 34 7z a -tzip -mx=9 asn1js.zip $FILES sha256sums.asc 35 35 rsync -Pvrtz asn1js.zip $FILES lapo.it:www/asn1js/
+2045 -29
rfcdef.js
··· 1 - // content parsed from ASN.1 definitions as found in the following RFCs: 5280 5208 3369 3161 2986 4211 4210 1 + // content parsed from ASN.1 definitions as found in the following RFCs: 5280 5208 3369 3161 2986 4211 4210 8017 4511 2 2 // Copyright (C) The IETF Trust (2008) 3 3 // as far as I can tell this file is allowed under the following clause: 4 4 // It is acceptable under the current IETF rules (RFC 5378) to modify extracted code if necessary. ··· 1606 1606 { 1607 1607 "id": "utcTime", 1608 1608 "name": "UTCTime", 1609 - "type": "builtin", 1610 - "content": "TODO:unknown" 1609 + "type": "builtin" 1611 1610 }, 1612 1611 { 1613 1612 "id": "generalTime", 1614 1613 "name": "GeneralizedTime", 1615 - "type": "builtin", 1616 - "content": "TODO:unknown" 1614 + "type": "builtin" 1617 1615 } 1618 1616 ] 1619 1617 } ··· 1985 1983 "CountryName": { 1986 1984 "name": "CountryName", 1987 1985 "type": { 1988 - "name": "[1]", 1986 + "name": "Application 1", 1989 1987 "type": "tag", 1990 1988 "class": "APPLICATION", 1991 1989 "explicit": true, ··· 2017 2015 "AdministrationDomainName": { 2018 2016 "name": "AdministrationDomainName", 2019 2017 "type": { 2020 - "name": "[2]", 2018 + "name": "Application 2", 2021 2019 "type": "tag", 2022 2020 "class": "APPLICATION", 2023 2021 "explicit": true, ··· 3382 3380 "name": "", 3383 3381 "type": { 3384 3382 "name": "GeneralizedTime", 3385 - "type": "builtin", 3386 - "content": "TODO:unknown" 3383 + "type": "builtin" 3387 3384 } 3388 3385 } 3389 3386 ], ··· 3400 3397 "name": "", 3401 3398 "type": { 3402 3399 "name": "GeneralizedTime", 3403 - "type": "builtin", 3404 - "content": "TODO:unknown" 3400 + "type": "builtin" 3405 3401 } 3406 3402 } 3407 3403 ], ··· 4494 4490 "name": "InvalidityDate", 4495 4491 "type": { 4496 4492 "name": "GeneralizedTime", 4497 - "type": "builtin", 4498 - "content": "TODO:unknown" 4493 + "type": "builtin" 4499 4494 } 4500 4495 } 4501 4496 } ··· 5566 5561 "id": "date", 5567 5562 "name": "GeneralizedTime", 5568 5563 "type": "builtin", 5569 - "content": "TODO:unknown", 5570 5564 "optional": true 5571 5565 }, 5572 5566 { ··· 5629 5623 "id": "date", 5630 5624 "name": "GeneralizedTime", 5631 5625 "type": "builtin", 5632 - "content": "TODO:unknown", 5633 5626 "optional": true 5634 5627 }, 5635 5628 { ··· 6142 6135 { 6143 6136 "id": "utcTime", 6144 6137 "name": "UTCTime", 6145 - "type": "builtin", 6146 - "content": "TODO:unknown" 6138 + "type": "builtin" 6147 6139 }, 6148 6140 { 6149 6141 "id": "generalTime", 6150 6142 "name": "GeneralizedTime", 6151 - "type": "builtin", 6152 - "content": "TODO:unknown" 6143 + "type": "builtin" 6153 6144 } 6154 6145 ] 6155 6146 } ··· 6664 6655 { 6665 6656 "id": "genTime", 6666 6657 "name": "GeneralizedTime", 6667 - "type": "builtin", 6668 - "content": "TODO:unknown" 6658 + "type": "builtin" 6669 6659 }, 6670 6660 { 6671 6661 "id": "accuracy", ··· 7464 7454 "name": "", 7465 7455 "type": { 7466 7456 "name": "NULL", 7467 - "type": "defined" 7457 + "type": "builtin" 7468 7458 } 7469 7459 } 7470 7460 ] ··· 8345 8335 "name": "", 8346 8336 "type": { 8347 8337 "name": "GeneralizedTime", 8348 - "type": "builtin", 8349 - "content": "TODO:unknown" 8338 + "type": "builtin" 8350 8339 } 8351 8340 } 8352 8341 ], ··· 9649 9638 { 9650 9639 "id": "willBeRevokedAt", 9651 9640 "name": "GeneralizedTime", 9652 - "type": "builtin", 9653 - "content": "TODO:unknown" 9641 + "type": "builtin" 9654 9642 }, 9655 9643 { 9656 9644 "id": "badSinceDate", 9657 9645 "name": "GeneralizedTime", 9658 - "type": "builtin", 9659 - "content": "TODO:unknown" 9646 + "type": "builtin" 9660 9647 }, 9661 9648 { 9662 9649 "id": "crlDetails", ··· 9724 9711 "name": "PKIConfirmContent", 9725 9712 "type": { 9726 9713 "name": "NULL", 9727 - "type": "defined" 9714 + "type": "builtin" 9728 9715 } 9729 9716 }, 9730 9717 "InfoTypeAndValue": { ··· 9851 9838 "optional": true 9852 9839 } 9853 9840 ] 9841 + } 9842 + ] 9843 + } 9844 + } 9845 + } 9846 + }, 9847 + "1.2.840.113549.1.1.0.1": { 9848 + "name": "PKCS-1", 9849 + "oid": "1.2.840.113549.1.1.0.1", 9850 + "source": "rfc8017.txt", 9851 + "tagDefault": "EXPLICIT", 9852 + "imports": { 9853 + "2.16.840.1.101.3.4.2": { 9854 + "name": "NIST-SHA2", 9855 + "oid": "2.16.840.1.101.3.4.2", 9856 + "types": [ 9857 + "id-sha224", 9858 + "id-sha256", 9859 + "id-sha384", 9860 + "id-sha512", 9861 + "id-sha512-224", 9862 + "id-sha512-256" 9863 + ] 9864 + } 9865 + }, 9866 + "values": { 9867 + "pkcs-1": { 9868 + "name": "pkcs-1", 9869 + "type": { 9870 + "name": "OBJECT IDENTIFIER", 9871 + "type": "builtin" 9872 + }, 9873 + "value": "1.2.840.113549.1.1" 9874 + }, 9875 + "rsaEncryption": { 9876 + "name": "rsaEncryption", 9877 + "type": { 9878 + "name": "OBJECT IDENTIFIER", 9879 + "type": "builtin" 9880 + }, 9881 + "value": "1.2.840.113549.1.1.1" 9882 + }, 9883 + "id-RSAES-OAEP": { 9884 + "name": "id-RSAES-OAEP", 9885 + "type": { 9886 + "name": "OBJECT IDENTIFIER", 9887 + "type": "builtin" 9888 + }, 9889 + "value": "1.2.840.113549.1.1.7" 9890 + }, 9891 + "id-pSpecified": { 9892 + "name": "id-pSpecified", 9893 + "type": { 9894 + "name": "OBJECT IDENTIFIER", 9895 + "type": "builtin" 9896 + }, 9897 + "value": "1.2.840.113549.1.1.9" 9898 + }, 9899 + "id-RSASSA-PSS": { 9900 + "name": "id-RSASSA-PSS", 9901 + "type": { 9902 + "name": "OBJECT IDENTIFIER", 9903 + "type": "builtin" 9904 + }, 9905 + "value": "1.2.840.113549.1.1.10" 9906 + }, 9907 + "md2WithRSAEncryption": { 9908 + "name": "md2WithRSAEncryption", 9909 + "type": { 9910 + "name": "OBJECT IDENTIFIER", 9911 + "type": "builtin" 9912 + }, 9913 + "value": "1.2.840.113549.1.1.2" 9914 + }, 9915 + "md5WithRSAEncryption": { 9916 + "name": "md5WithRSAEncryption", 9917 + "type": { 9918 + "name": "OBJECT IDENTIFIER", 9919 + "type": "builtin" 9920 + }, 9921 + "value": "1.2.840.113549.1.1.4" 9922 + }, 9923 + "sha1WithRSAEncryption": { 9924 + "name": "sha1WithRSAEncryption", 9925 + "type": { 9926 + "name": "OBJECT IDENTIFIER", 9927 + "type": "builtin" 9928 + }, 9929 + "value": "1.2.840.113549.1.1.5" 9930 + }, 9931 + "sha224WithRSAEncryption": { 9932 + "name": "sha224WithRSAEncryption", 9933 + "type": { 9934 + "name": "OBJECT IDENTIFIER", 9935 + "type": "builtin" 9936 + }, 9937 + "value": "1.2.840.113549.1.1.14" 9938 + }, 9939 + "sha256WithRSAEncryption": { 9940 + "name": "sha256WithRSAEncryption", 9941 + "type": { 9942 + "name": "OBJECT IDENTIFIER", 9943 + "type": "builtin" 9944 + }, 9945 + "value": "1.2.840.113549.1.1.11" 9946 + }, 9947 + "sha384WithRSAEncryption": { 9948 + "name": "sha384WithRSAEncryption", 9949 + "type": { 9950 + "name": "OBJECT IDENTIFIER", 9951 + "type": "builtin" 9952 + }, 9953 + "value": "1.2.840.113549.1.1.12" 9954 + }, 9955 + "sha512WithRSAEncryption": { 9956 + "name": "sha512WithRSAEncryption", 9957 + "type": { 9958 + "name": "OBJECT IDENTIFIER", 9959 + "type": "builtin" 9960 + }, 9961 + "value": "1.2.840.113549.1.1.13" 9962 + }, 9963 + "sha512-224WithRSAEncryption": { 9964 + "name": "sha512-224WithRSAEncryption", 9965 + "type": { 9966 + "name": "OBJECT IDENTIFIER", 9967 + "type": "builtin" 9968 + }, 9969 + "value": "1.2.840.113549.1.1.15" 9970 + }, 9971 + "sha512-256WithRSAEncryption": { 9972 + "name": "sha512-256WithRSAEncryption", 9973 + "type": { 9974 + "name": "OBJECT IDENTIFIER", 9975 + "type": "builtin" 9976 + }, 9977 + "value": "1.2.840.113549.1.1.16" 9978 + }, 9979 + "id-sha1": { 9980 + "name": "id-sha1", 9981 + "type": { 9982 + "name": "OBJECT IDENTIFIER", 9983 + "type": "builtin" 9984 + }, 9985 + "value": "1.3.14.3.2.26" 9986 + }, 9987 + "id-md2": { 9988 + "name": "id-md2", 9989 + "type": { 9990 + "name": "OBJECT IDENTIFIER", 9991 + "type": "builtin" 9992 + }, 9993 + "value": "1.2.840.113549.2.2" 9994 + }, 9995 + "id-md5": { 9996 + "name": "id-md5", 9997 + "type": { 9998 + "name": "OBJECT IDENTIFIER", 9999 + "type": "builtin" 10000 + }, 10001 + "value": "1.2.840.113549.2.5" 10002 + }, 10003 + "id-mgf1": { 10004 + "name": "id-mgf1", 10005 + "type": { 10006 + "name": "OBJECT IDENTIFIER", 10007 + "type": "builtin" 10008 + }, 10009 + "value": "1.2.840.113549.1.1.8" 10010 + } 10011 + }, 10012 + "types": { 10013 + "AlgorithmIdentifier": { 10014 + "name": "AlgorithmIdentifier", 10015 + "type": { 10016 + "name": "ANY", 10017 + "type": "builtin" 10018 + } 10019 + }, 10020 + "HashAlgorithm": { 10021 + "name": "HashAlgorithm", 10022 + "type": { 10023 + "name": "AlgorithmIdentifier", 10024 + "type": "defined" 10025 + } 10026 + }, 10027 + "SHA1Parameters": { 10028 + "name": "SHA1Parameters", 10029 + "type": { 10030 + "name": "NULL", 10031 + "type": "builtin" 10032 + } 10033 + }, 10034 + "MaskGenAlgorithm": { 10035 + "name": "MaskGenAlgorithm", 10036 + "type": { 10037 + "name": "AlgorithmIdentifier", 10038 + "type": "defined" 10039 + } 10040 + }, 10041 + "EncodingParameters": { 10042 + "name": "EncodingParameters", 10043 + "type": { 10044 + "name": "OCTET STRING", 10045 + "type": "builtin" 10046 + } 10047 + }, 10048 + "PSourceAlgorithm": { 10049 + "name": "PSourceAlgorithm", 10050 + "type": { 10051 + "name": "AlgorithmIdentifier", 10052 + "type": "defined" 10053 + } 10054 + }, 10055 + "RSAPublicKey": { 10056 + "name": "RSAPublicKey", 10057 + "type": { 10058 + "name": "SEQUENCE", 10059 + "type": "builtin", 10060 + "content": [ 10061 + { 10062 + "id": "modulus", 10063 + "name": "INTEGER", 10064 + "type": "builtin" 10065 + }, 10066 + { 10067 + "id": "publicExponent", 10068 + "name": "INTEGER", 10069 + "type": "builtin" 10070 + } 10071 + ] 10072 + } 10073 + }, 10074 + "RSAPrivateKey": { 10075 + "name": "RSAPrivateKey", 10076 + "type": { 10077 + "name": "SEQUENCE", 10078 + "type": "builtin", 10079 + "content": [ 10080 + { 10081 + "id": "version", 10082 + "name": "Version", 10083 + "type": "defined" 10084 + }, 10085 + { 10086 + "id": "modulus", 10087 + "name": "INTEGER", 10088 + "type": "builtin" 10089 + }, 10090 + { 10091 + "id": "publicExponent", 10092 + "name": "INTEGER", 10093 + "type": "builtin" 10094 + }, 10095 + { 10096 + "id": "privateExponent", 10097 + "name": "INTEGER", 10098 + "type": "builtin" 10099 + }, 10100 + { 10101 + "id": "prime1", 10102 + "name": "INTEGER", 10103 + "type": "builtin" 10104 + }, 10105 + { 10106 + "id": "prime2", 10107 + "name": "INTEGER", 10108 + "type": "builtin" 10109 + }, 10110 + { 10111 + "id": "exponent1", 10112 + "name": "INTEGER", 10113 + "type": "builtin" 10114 + }, 10115 + { 10116 + "id": "exponent2", 10117 + "name": "INTEGER", 10118 + "type": "builtin" 10119 + }, 10120 + { 10121 + "id": "coefficient", 10122 + "name": "INTEGER", 10123 + "type": "builtin" 10124 + }, 10125 + { 10126 + "id": "otherPrimeInfos", 10127 + "name": "OtherPrimeInfos", 10128 + "type": "defined", 10129 + "optional": true 10130 + } 10131 + ] 10132 + } 10133 + }, 10134 + "Version": { 10135 + "name": "Version", 10136 + "type": { 10137 + "name": "INTEGER", 10138 + "type": "builtin", 10139 + "content": { 10140 + "two-prime": 0, 10141 + "multi": 1 10142 + } 10143 + } 10144 + }, 10145 + "OtherPrimeInfos": { 10146 + "name": "OtherPrimeInfos", 10147 + "type": { 10148 + "name": "SEQUENCE", 10149 + "type": "builtin", 10150 + "typeOf": 1, 10151 + "size": [ 10152 + 1, 10153 + "MAX" 10154 + ], 10155 + "content": [ 10156 + { 10157 + "name": "OtherPrimeInfo", 10158 + "type": "defined" 10159 + } 10160 + ] 10161 + } 10162 + }, 10163 + "OtherPrimeInfo": { 10164 + "name": "OtherPrimeInfo", 10165 + "type": { 10166 + "name": "SEQUENCE", 10167 + "type": "builtin", 10168 + "content": [ 10169 + { 10170 + "id": "prime", 10171 + "name": "INTEGER", 10172 + "type": "builtin" 10173 + }, 10174 + { 10175 + "id": "exponent", 10176 + "name": "INTEGER", 10177 + "type": "builtin" 10178 + }, 10179 + { 10180 + "id": "coefficient", 10181 + "name": "INTEGER", 10182 + "type": "builtin" 10183 + } 10184 + ] 10185 + } 10186 + }, 10187 + "RSAES-OAEP-params": { 10188 + "name": "RSAES-OAEP-params", 10189 + "type": { 10190 + "name": "SEQUENCE", 10191 + "type": "builtin", 10192 + "content": [ 10193 + { 10194 + "id": "hashAlgorithm", 10195 + "name": "[0]", 10196 + "type": "tag", 10197 + "class": "CONTEXT", 10198 + "explicit": true, 10199 + "content": [ 10200 + { 10201 + "name": "", 10202 + "type": { 10203 + "name": "HashAlgorithm", 10204 + "type": "defined" 10205 + } 10206 + } 10207 + ], 10208 + "default": "sha1" 10209 + }, 10210 + { 10211 + "id": "maskGenAlgorithm", 10212 + "name": "[1]", 10213 + "type": "tag", 10214 + "class": "CONTEXT", 10215 + "explicit": true, 10216 + "content": [ 10217 + { 10218 + "name": "", 10219 + "type": { 10220 + "name": "MaskGenAlgorithm", 10221 + "type": "defined" 10222 + } 10223 + } 10224 + ], 10225 + "default": "mgf1SHA1" 10226 + }, 10227 + { 10228 + "id": "pSourceAlgorithm", 10229 + "name": "[2]", 10230 + "type": "tag", 10231 + "class": "CONTEXT", 10232 + "explicit": true, 10233 + "content": [ 10234 + { 10235 + "name": "", 10236 + "type": { 10237 + "name": "PSourceAlgorithm", 10238 + "type": "defined" 10239 + } 10240 + } 10241 + ], 10242 + "default": "pSpecifiedEmpty" 10243 + } 10244 + ] 10245 + } 10246 + }, 10247 + "RSAES-AlgorithmIdentifier": { 10248 + "name": "RSAES-AlgorithmIdentifier", 10249 + "type": { 10250 + "name": "AlgorithmIdentifier", 10251 + "type": "defined" 10252 + } 10253 + }, 10254 + "RSASSA-PSS-params": { 10255 + "name": "RSASSA-PSS-params", 10256 + "type": { 10257 + "name": "SEQUENCE", 10258 + "type": "builtin", 10259 + "content": [ 10260 + { 10261 + "id": "hashAlgorithm", 10262 + "name": "[0]", 10263 + "type": "tag", 10264 + "class": "CONTEXT", 10265 + "explicit": true, 10266 + "content": [ 10267 + { 10268 + "name": "", 10269 + "type": { 10270 + "name": "HashAlgorithm", 10271 + "type": "defined" 10272 + } 10273 + } 10274 + ], 10275 + "default": "sha1" 10276 + }, 10277 + { 10278 + "id": "maskGenAlgorithm", 10279 + "name": "[1]", 10280 + "type": "tag", 10281 + "class": "CONTEXT", 10282 + "explicit": true, 10283 + "content": [ 10284 + { 10285 + "name": "", 10286 + "type": { 10287 + "name": "MaskGenAlgorithm", 10288 + "type": "defined" 10289 + } 10290 + } 10291 + ], 10292 + "default": "mgf1SHA1" 10293 + }, 10294 + { 10295 + "id": "saltLength", 10296 + "name": "[2]", 10297 + "type": "tag", 10298 + "class": "CONTEXT", 10299 + "explicit": true, 10300 + "content": [ 10301 + { 10302 + "name": "", 10303 + "type": { 10304 + "name": "INTEGER", 10305 + "type": "builtin" 10306 + } 10307 + } 10308 + ], 10309 + "default": 20 10310 + }, 10311 + { 10312 + "id": "trailerField", 10313 + "name": "[3]", 10314 + "type": "tag", 10315 + "class": "CONTEXT", 10316 + "explicit": true, 10317 + "content": [ 10318 + { 10319 + "name": "", 10320 + "type": { 10321 + "name": "TrailerField", 10322 + "type": "defined" 10323 + } 10324 + } 10325 + ], 10326 + "default": "trailerFieldBC" 10327 + } 10328 + ] 10329 + } 10330 + }, 10331 + "TrailerField": { 10332 + "name": "TrailerField", 10333 + "type": { 10334 + "name": "INTEGER", 10335 + "type": "builtin", 10336 + "content": { 10337 + "trailerFieldBC": 1 10338 + } 10339 + } 10340 + }, 10341 + "RSASSA-AlgorithmIdentifier": { 10342 + "name": "RSASSA-AlgorithmIdentifier", 10343 + "type": { 10344 + "name": "AlgorithmIdentifier", 10345 + "type": "defined" 10346 + } 10347 + }, 10348 + "DigestInfo": { 10349 + "name": "DigestInfo", 10350 + "type": { 10351 + "name": "SEQUENCE", 10352 + "type": "builtin", 10353 + "content": [ 10354 + { 10355 + "id": "digestAlgorithm", 10356 + "name": "DigestAlgorithm", 10357 + "type": "defined" 10358 + }, 10359 + { 10360 + "id": "digest", 10361 + "name": "OCTET STRING", 10362 + "type": "builtin" 10363 + } 10364 + ] 10365 + } 10366 + }, 10367 + "DigestAlgorithm": { 10368 + "name": "DigestAlgorithm", 10369 + "type": { 10370 + "name": "AlgorithmIdentifier", 10371 + "type": "defined" 10372 + } 10373 + } 10374 + } 10375 + }, 10376 + "1.3.6.1.1.18": { 10377 + "name": "Lightweight-Directory-Access-Protocol-V3", 10378 + "oid": "1.3.6.1.1.18", 10379 + "source": "rfc4511.txt", 10380 + "tagDefault": "IMPLICIT", 10381 + "values": { 10382 + "maxInt": { 10383 + "name": "maxInt", 10384 + "type": { 10385 + "name": "INTEGER", 10386 + "type": "builtin" 10387 + }, 10388 + "value": 2147483647 10389 + } 10390 + }, 10391 + "types": { 10392 + "LDAPMessage": { 10393 + "name": "LDAPMessage", 10394 + "type": { 10395 + "name": "SEQUENCE", 10396 + "type": "builtin", 10397 + "content": [ 10398 + { 10399 + "id": "messageID", 10400 + "name": "MessageID", 10401 + "type": "defined" 10402 + }, 10403 + { 10404 + "id": "protocolOp", 10405 + "name": "CHOICE", 10406 + "type": "builtin", 10407 + "content": [ 10408 + { 10409 + "id": "bindRequest", 10410 + "name": "BindRequest", 10411 + "type": "defined" 10412 + }, 10413 + { 10414 + "id": "bindResponse", 10415 + "name": "BindResponse", 10416 + "type": "defined" 10417 + }, 10418 + { 10419 + "id": "unbindRequest", 10420 + "name": "UnbindRequest", 10421 + "type": "defined" 10422 + }, 10423 + { 10424 + "id": "searchRequest", 10425 + "name": "SearchRequest", 10426 + "type": "defined" 10427 + }, 10428 + { 10429 + "id": "searchResEntry", 10430 + "name": "SearchResultEntry", 10431 + "type": "defined" 10432 + }, 10433 + { 10434 + "id": "searchResDone", 10435 + "name": "SearchResultDone", 10436 + "type": "defined" 10437 + }, 10438 + { 10439 + "id": "searchResRef", 10440 + "name": "SearchResultReference", 10441 + "type": "defined" 10442 + }, 10443 + { 10444 + "id": "modifyRequest", 10445 + "name": "ModifyRequest", 10446 + "type": "defined" 10447 + }, 10448 + { 10449 + "id": "modifyResponse", 10450 + "name": "ModifyResponse", 10451 + "type": "defined" 10452 + }, 10453 + { 10454 + "id": "addRequest", 10455 + "name": "AddRequest", 10456 + "type": "defined" 10457 + }, 10458 + { 10459 + "id": "addResponse", 10460 + "name": "AddResponse", 10461 + "type": "defined" 10462 + }, 10463 + { 10464 + "id": "delRequest", 10465 + "name": "DelRequest", 10466 + "type": "defined" 10467 + }, 10468 + { 10469 + "id": "delResponse", 10470 + "name": "DelResponse", 10471 + "type": "defined" 10472 + }, 10473 + { 10474 + "id": "modDNRequest", 10475 + "name": "ModifyDNRequest", 10476 + "type": "defined" 10477 + }, 10478 + { 10479 + "id": "modDNResponse", 10480 + "name": "ModifyDNResponse", 10481 + "type": "defined" 10482 + }, 10483 + { 10484 + "id": "compareRequest", 10485 + "name": "CompareRequest", 10486 + "type": "defined" 10487 + }, 10488 + { 10489 + "id": "compareResponse", 10490 + "name": "CompareResponse", 10491 + "type": "defined" 10492 + }, 10493 + { 10494 + "id": "abandonRequest", 10495 + "name": "AbandonRequest", 10496 + "type": "defined" 10497 + }, 10498 + { 10499 + "id": "extendedReq", 10500 + "name": "ExtendedRequest", 10501 + "type": "defined" 10502 + }, 10503 + { 10504 + "id": "extendedResp", 10505 + "name": "ExtendedResponse", 10506 + "type": "defined" 10507 + }, 10508 + { 10509 + "id": "intermediateResponse", 10510 + "name": "IntermediateResponse", 10511 + "type": "defined" 10512 + } 10513 + ] 10514 + }, 10515 + { 10516 + "id": "controls", 10517 + "name": "[0]", 10518 + "type": "tag", 10519 + "class": "CONTEXT", 10520 + "explicit": false, 10521 + "content": [ 10522 + { 10523 + "name": "", 10524 + "type": { 10525 + "name": "Controls", 10526 + "type": "defined" 10527 + } 10528 + } 10529 + ], 10530 + "optional": true 10531 + } 10532 + ] 10533 + } 10534 + }, 10535 + "MessageID": { 10536 + "name": "MessageID", 10537 + "type": { 10538 + "name": "INTEGER", 10539 + "type": "builtin", 10540 + "range": [ 10541 + 0, 10542 + "maxInt" 10543 + ] 10544 + } 10545 + }, 10546 + "LDAPString": { 10547 + "name": "LDAPString", 10548 + "type": { 10549 + "name": "OCTET STRING", 10550 + "type": "builtin" 10551 + } 10552 + }, 10553 + "LDAPOID": { 10554 + "name": "LDAPOID", 10555 + "type": { 10556 + "name": "OCTET STRING", 10557 + "type": "builtin" 10558 + } 10559 + }, 10560 + "LDAPDN": { 10561 + "name": "LDAPDN", 10562 + "type": { 10563 + "name": "LDAPString", 10564 + "type": "defined" 10565 + } 10566 + }, 10567 + "RelativeLDAPDN": { 10568 + "name": "RelativeLDAPDN", 10569 + "type": { 10570 + "name": "LDAPString", 10571 + "type": "defined" 10572 + } 10573 + }, 10574 + "AttributeDescription": { 10575 + "name": "AttributeDescription", 10576 + "type": { 10577 + "name": "LDAPString", 10578 + "type": "defined" 10579 + } 10580 + }, 10581 + "AttributeValue": { 10582 + "name": "AttributeValue", 10583 + "type": { 10584 + "name": "OCTET STRING", 10585 + "type": "builtin" 10586 + } 10587 + }, 10588 + "AttributeValueAssertion": { 10589 + "name": "AttributeValueAssertion", 10590 + "type": { 10591 + "name": "SEQUENCE", 10592 + "type": "builtin", 10593 + "content": [ 10594 + { 10595 + "id": "attributeDesc", 10596 + "name": "AttributeDescription", 10597 + "type": "defined" 10598 + }, 10599 + { 10600 + "id": "assertionValue", 10601 + "name": "AssertionValue", 10602 + "type": "defined" 10603 + } 10604 + ] 10605 + } 10606 + }, 10607 + "AssertionValue": { 10608 + "name": "AssertionValue", 10609 + "type": { 10610 + "name": "OCTET STRING", 10611 + "type": "builtin" 10612 + } 10613 + }, 10614 + "PartialAttribute": { 10615 + "name": "PartialAttribute", 10616 + "type": { 10617 + "name": "SEQUENCE", 10618 + "type": "builtin", 10619 + "content": [ 10620 + { 10621 + "id": "type", 10622 + "name": "AttributeDescription", 10623 + "type": "defined" 10624 + }, 10625 + { 10626 + "id": "vals", 10627 + "name": "SET", 10628 + "type": "builtin", 10629 + "typeOf": 1, 10630 + "size": [ 10631 + 1, 10632 + "MAX" 10633 + ], 10634 + "content": [ 10635 + { 10636 + "name": "AttributeValue", 10637 + "type": "defined" 10638 + } 10639 + ] 10640 + } 10641 + ] 10642 + } 10643 + }, 10644 + "MatchingRuleId": { 10645 + "name": "MatchingRuleId", 10646 + "type": { 10647 + "name": "LDAPString", 10648 + "type": "defined" 10649 + } 10650 + }, 10651 + "LDAPResult": { 10652 + "name": "LDAPResult", 10653 + "type": { 10654 + "name": "SEQUENCE", 10655 + "type": "builtin", 10656 + "content": [ 10657 + { 10658 + "id": "resultCode", 10659 + "name": "ENUMERATED", 10660 + "type": "builtin", 10661 + "content": { 10662 + "success": 0, 10663 + "operationsError": 1, 10664 + "protocolError": 2, 10665 + "timeLimitExceeded": 3, 10666 + "sizeLimitExceeded": 4, 10667 + "compareFalse": 5, 10668 + "compareTrue": 6, 10669 + "authMethodNotSupported": 7, 10670 + "strongerAuthRequired": 8, 10671 + "referral": 10, 10672 + "adminLimitExceeded": 11, 10673 + "unavailableCriticalExtension": 12, 10674 + "confidentialityRequired": 13, 10675 + "saslBindInProgress": 14, 10676 + "noSuchAttribute": 16, 10677 + "undefinedAttributeType": 17, 10678 + "inappropriateMatching": 18, 10679 + "constraintViolation": 19, 10680 + "attributeOrValueExists": 20, 10681 + "invalidAttributeSyntax": 21, 10682 + "noSuchObject": 32, 10683 + "aliasProblem": 33, 10684 + "invalidDNSyntax": 34, 10685 + "aliasDereferencingProblem": 36, 10686 + "inappropriateAuthentication": 48, 10687 + "invalidCredentials": 49, 10688 + "insufficientAccessRights": 50, 10689 + "busy": 51, 10690 + "unavailable": 52, 10691 + "unwillingToPerform": 53, 10692 + "loopDetect": 54, 10693 + "namingViolation": 64, 10694 + "objectClassViolation": 65, 10695 + "notAllowedOnNonLeaf": 66, 10696 + "notAllowedOnRDN": 67, 10697 + "entryAlreadyExists": 68, 10698 + "objectClassModsProhibited": 69, 10699 + "affectsMultipleDSAs": 71, 10700 + "other": 80 10701 + } 10702 + }, 10703 + { 10704 + "id": "matchedDN", 10705 + "name": "LDAPDN", 10706 + "type": "defined" 10707 + }, 10708 + { 10709 + "id": "diagnosticMessage", 10710 + "name": "LDAPString", 10711 + "type": "defined" 10712 + }, 10713 + { 10714 + "id": "referral", 10715 + "name": "[3]", 10716 + "type": "tag", 10717 + "class": "CONTEXT", 10718 + "explicit": false, 10719 + "content": [ 10720 + { 10721 + "name": "", 10722 + "type": { 10723 + "name": "Referral", 10724 + "type": "defined" 10725 + } 10726 + } 10727 + ], 10728 + "optional": true 10729 + } 10730 + ] 10731 + } 10732 + }, 10733 + "Referral": { 10734 + "name": "Referral", 10735 + "type": { 10736 + "name": "SEQUENCE", 10737 + "type": "builtin", 10738 + "typeOf": 1, 10739 + "size": [ 10740 + 1, 10741 + "MAX" 10742 + ], 10743 + "content": [ 10744 + { 10745 + "name": "URI", 10746 + "type": "defined" 10747 + } 10748 + ] 10749 + } 10750 + }, 10751 + "URI": { 10752 + "name": "URI", 10753 + "type": { 10754 + "name": "LDAPString", 10755 + "type": "defined" 10756 + } 10757 + }, 10758 + "Controls": { 10759 + "name": "Controls", 10760 + "type": { 10761 + "name": "SEQUENCE", 10762 + "type": "builtin", 10763 + "typeOf": 1, 10764 + "content": [ 10765 + { 10766 + "name": "Control", 10767 + "type": "defined" 10768 + } 10769 + ] 10770 + } 10771 + }, 10772 + "Control": { 10773 + "name": "Control", 10774 + "type": { 10775 + "name": "SEQUENCE", 10776 + "type": "builtin", 10777 + "content": [ 10778 + { 10779 + "id": "controlType", 10780 + "name": "LDAPOID", 10781 + "type": "defined" 10782 + }, 10783 + { 10784 + "id": "criticality", 10785 + "name": "BOOLEAN", 10786 + "type": "builtin", 10787 + "default": false 10788 + }, 10789 + { 10790 + "id": "controlValue", 10791 + "name": "OCTET STRING", 10792 + "type": "builtin", 10793 + "optional": true 10794 + } 10795 + ] 10796 + } 10797 + }, 10798 + "BindRequest": { 10799 + "name": "BindRequest", 10800 + "type": { 10801 + "name": "Application 0", 10802 + "type": "tag", 10803 + "class": "APPLICATION", 10804 + "explicit": false, 10805 + "content": [ 10806 + { 10807 + "name": "", 10808 + "type": { 10809 + "name": "SEQUENCE", 10810 + "type": "builtin", 10811 + "content": [ 10812 + { 10813 + "id": "version", 10814 + "name": "INTEGER", 10815 + "type": "builtin", 10816 + "range": [ 10817 + 1, 10818 + 127 10819 + ] 10820 + }, 10821 + { 10822 + "id": "name", 10823 + "name": "LDAPDN", 10824 + "type": "defined" 10825 + }, 10826 + { 10827 + "id": "authentication", 10828 + "name": "AuthenticationChoice", 10829 + "type": "defined" 10830 + } 10831 + ] 10832 + } 10833 + } 10834 + ] 10835 + } 10836 + }, 10837 + "AuthenticationChoice": { 10838 + "name": "AuthenticationChoice", 10839 + "type": { 10840 + "name": "CHOICE", 10841 + "type": "builtin", 10842 + "content": [ 10843 + { 10844 + "id": "simple", 10845 + "name": "[0]", 10846 + "type": "tag", 10847 + "class": "CONTEXT", 10848 + "explicit": false, 10849 + "content": [ 10850 + { 10851 + "name": "", 10852 + "type": { 10853 + "name": "OCTET STRING", 10854 + "type": "builtin" 10855 + } 10856 + } 10857 + ] 10858 + }, 10859 + { 10860 + "id": "sasl", 10861 + "name": "[3]", 10862 + "type": "tag", 10863 + "class": "CONTEXT", 10864 + "explicit": false, 10865 + "content": [ 10866 + { 10867 + "name": "", 10868 + "type": { 10869 + "name": "SaslCredentials", 10870 + "type": "defined" 10871 + } 10872 + } 10873 + ] 10874 + } 10875 + ] 10876 + } 10877 + }, 10878 + "SaslCredentials": { 10879 + "name": "SaslCredentials", 10880 + "type": { 10881 + "name": "SEQUENCE", 10882 + "type": "builtin", 10883 + "content": [ 10884 + { 10885 + "id": "mechanism", 10886 + "name": "LDAPString", 10887 + "type": "defined" 10888 + }, 10889 + { 10890 + "id": "credentials", 10891 + "name": "OCTET STRING", 10892 + "type": "builtin", 10893 + "optional": true 10894 + } 10895 + ] 10896 + } 10897 + }, 10898 + "BindResponse": { 10899 + "name": "BindResponse", 10900 + "type": { 10901 + "name": "ANY", 10902 + "type": "builtin" 10903 + } 10904 + }, 10905 + "UnbindRequest": { 10906 + "name": "UnbindRequest", 10907 + "type": { 10908 + "name": "Application 2", 10909 + "type": "tag", 10910 + "class": "APPLICATION", 10911 + "explicit": false, 10912 + "content": [ 10913 + { 10914 + "name": "", 10915 + "type": { 10916 + "name": "NULL", 10917 + "type": "builtin" 10918 + } 10919 + } 10920 + ] 10921 + } 10922 + }, 10923 + "SearchRequest": { 10924 + "name": "SearchRequest", 10925 + "type": { 10926 + "name": "Application 3", 10927 + "type": "tag", 10928 + "class": "APPLICATION", 10929 + "explicit": false, 10930 + "content": [ 10931 + { 10932 + "name": "", 10933 + "type": { 10934 + "name": "SEQUENCE", 10935 + "type": "builtin", 10936 + "content": [ 10937 + { 10938 + "id": "baseObject", 10939 + "name": "LDAPDN", 10940 + "type": "defined" 10941 + }, 10942 + { 10943 + "id": "scope", 10944 + "name": "ENUMERATED", 10945 + "type": "builtin", 10946 + "content": { 10947 + "baseObject": 0, 10948 + "singleLevel": 1, 10949 + "wholeSubtree": 2 10950 + } 10951 + }, 10952 + { 10953 + "id": "derefAliases", 10954 + "name": "ENUMERATED", 10955 + "type": "builtin", 10956 + "content": { 10957 + "neverDerefAliases": 0, 10958 + "derefInSearching": 1, 10959 + "derefFindingBaseObj": 2, 10960 + "derefAlways": 3 10961 + } 10962 + }, 10963 + { 10964 + "id": "sizeLimit", 10965 + "name": "INTEGER", 10966 + "type": "builtin", 10967 + "range": [ 10968 + 0, 10969 + "maxInt" 10970 + ] 10971 + }, 10972 + { 10973 + "id": "timeLimit", 10974 + "name": "INTEGER", 10975 + "type": "builtin", 10976 + "range": [ 10977 + 0, 10978 + "maxInt" 10979 + ] 10980 + }, 10981 + { 10982 + "id": "typesOnly", 10983 + "name": "BOOLEAN", 10984 + "type": "builtin" 10985 + }, 10986 + { 10987 + "id": "filter", 10988 + "name": "Filter", 10989 + "type": "defined" 10990 + }, 10991 + { 10992 + "id": "attributes", 10993 + "name": "AttributeSelection", 10994 + "type": "defined" 10995 + } 10996 + ] 10997 + } 10998 + } 10999 + ] 11000 + } 11001 + }, 11002 + "AttributeSelection": { 11003 + "name": "AttributeSelection", 11004 + "type": { 11005 + "name": "SEQUENCE", 11006 + "type": "builtin", 11007 + "typeOf": 1, 11008 + "content": [ 11009 + { 11010 + "name": "LDAPString", 11011 + "type": "defined" 11012 + } 11013 + ] 11014 + } 11015 + }, 11016 + "Filter": { 11017 + "name": "Filter", 11018 + "type": { 11019 + "name": "CHOICE", 11020 + "type": "builtin", 11021 + "content": [ 11022 + { 11023 + "id": "and", 11024 + "name": "[0]", 11025 + "type": "tag", 11026 + "class": "CONTEXT", 11027 + "explicit": false, 11028 + "content": [ 11029 + { 11030 + "name": "", 11031 + "type": { 11032 + "name": "SET", 11033 + "type": "builtin", 11034 + "typeOf": 1, 11035 + "size": [ 11036 + 1, 11037 + "MAX" 11038 + ], 11039 + "content": [ 11040 + { 11041 + "name": "Filter", 11042 + "type": "defined" 11043 + } 11044 + ] 11045 + } 11046 + } 11047 + ] 11048 + }, 11049 + { 11050 + "id": "or", 11051 + "name": "[1]", 11052 + "type": "tag", 11053 + "class": "CONTEXT", 11054 + "explicit": false, 11055 + "content": [ 11056 + { 11057 + "name": "", 11058 + "type": { 11059 + "name": "SET", 11060 + "type": "builtin", 11061 + "typeOf": 1, 11062 + "size": [ 11063 + 1, 11064 + "MAX" 11065 + ], 11066 + "content": [ 11067 + { 11068 + "name": "Filter", 11069 + "type": "defined" 11070 + } 11071 + ] 11072 + } 11073 + } 11074 + ] 11075 + }, 11076 + { 11077 + "id": "not", 11078 + "name": "[2]", 11079 + "type": "tag", 11080 + "class": "CONTEXT", 11081 + "explicit": false, 11082 + "content": [ 11083 + { 11084 + "name": "", 11085 + "type": { 11086 + "name": "Filter", 11087 + "type": "defined" 11088 + } 11089 + } 11090 + ] 11091 + }, 11092 + { 11093 + "id": "equalityMatch", 11094 + "name": "[3]", 11095 + "type": "tag", 11096 + "class": "CONTEXT", 11097 + "explicit": false, 11098 + "content": [ 11099 + { 11100 + "name": "", 11101 + "type": { 11102 + "name": "AttributeValueAssertion", 11103 + "type": "defined" 11104 + } 11105 + } 11106 + ] 11107 + }, 11108 + { 11109 + "id": "substrings", 11110 + "name": "[4]", 11111 + "type": "tag", 11112 + "class": "CONTEXT", 11113 + "explicit": false, 11114 + "content": [ 11115 + { 11116 + "name": "", 11117 + "type": { 11118 + "name": "SubstringFilter", 11119 + "type": "defined" 11120 + } 11121 + } 11122 + ] 11123 + }, 11124 + { 11125 + "id": "greaterOrEqual", 11126 + "name": "[5]", 11127 + "type": "tag", 11128 + "class": "CONTEXT", 11129 + "explicit": false, 11130 + "content": [ 11131 + { 11132 + "name": "", 11133 + "type": { 11134 + "name": "AttributeValueAssertion", 11135 + "type": "defined" 11136 + } 11137 + } 11138 + ] 11139 + }, 11140 + { 11141 + "id": "lessOrEqual", 11142 + "name": "[6]", 11143 + "type": "tag", 11144 + "class": "CONTEXT", 11145 + "explicit": false, 11146 + "content": [ 11147 + { 11148 + "name": "", 11149 + "type": { 11150 + "name": "AttributeValueAssertion", 11151 + "type": "defined" 11152 + } 11153 + } 11154 + ] 11155 + }, 11156 + { 11157 + "id": "present", 11158 + "name": "[7]", 11159 + "type": "tag", 11160 + "class": "CONTEXT", 11161 + "explicit": false, 11162 + "content": [ 11163 + { 11164 + "name": "", 11165 + "type": { 11166 + "name": "AttributeDescription", 11167 + "type": "defined" 11168 + } 11169 + } 11170 + ] 11171 + }, 11172 + { 11173 + "id": "approxMatch", 11174 + "name": "[8]", 11175 + "type": "tag", 11176 + "class": "CONTEXT", 11177 + "explicit": false, 11178 + "content": [ 11179 + { 11180 + "name": "", 11181 + "type": { 11182 + "name": "AttributeValueAssertion", 11183 + "type": "defined" 11184 + } 11185 + } 11186 + ] 11187 + }, 11188 + { 11189 + "id": "extensibleMatch", 11190 + "name": "[9]", 11191 + "type": "tag", 11192 + "class": "CONTEXT", 11193 + "explicit": false, 11194 + "content": [ 11195 + { 11196 + "name": "", 11197 + "type": { 11198 + "name": "MatchingRuleAssertion", 11199 + "type": "defined" 11200 + } 11201 + } 11202 + ] 11203 + } 11204 + ] 11205 + } 11206 + }, 11207 + "SubstringFilter": { 11208 + "name": "SubstringFilter", 11209 + "type": { 11210 + "name": "SEQUENCE", 11211 + "type": "builtin", 11212 + "content": [ 11213 + { 11214 + "id": "type", 11215 + "name": "AttributeDescription", 11216 + "type": "defined" 11217 + }, 11218 + { 11219 + "id": "substrings", 11220 + "name": "SEQUENCE", 11221 + "type": "builtin", 11222 + "typeOf": 1, 11223 + "size": [ 11224 + 1, 11225 + "MAX" 11226 + ], 11227 + "content": [ 11228 + { 11229 + "name": "CHOICE", 11230 + "type": "builtin", 11231 + "content": [ 11232 + { 11233 + "id": "initial", 11234 + "name": "[0]", 11235 + "type": "tag", 11236 + "class": "CONTEXT", 11237 + "explicit": false, 11238 + "content": [ 11239 + { 11240 + "name": "", 11241 + "type": { 11242 + "name": "AssertionValue", 11243 + "type": "defined" 11244 + } 11245 + } 11246 + ] 11247 + }, 11248 + { 11249 + "id": "any", 11250 + "name": "[1]", 11251 + "type": "tag", 11252 + "class": "CONTEXT", 11253 + "explicit": false, 11254 + "content": [ 11255 + { 11256 + "name": "", 11257 + "type": { 11258 + "name": "AssertionValue", 11259 + "type": "defined" 11260 + } 11261 + } 11262 + ] 11263 + }, 11264 + { 11265 + "id": "final", 11266 + "name": "[2]", 11267 + "type": "tag", 11268 + "class": "CONTEXT", 11269 + "explicit": false, 11270 + "content": [ 11271 + { 11272 + "name": "", 11273 + "type": { 11274 + "name": "AssertionValue", 11275 + "type": "defined" 11276 + } 11277 + } 11278 + ] 11279 + } 11280 + ] 11281 + } 11282 + ] 11283 + } 11284 + ] 11285 + } 11286 + }, 11287 + "MatchingRuleAssertion": { 11288 + "name": "MatchingRuleAssertion", 11289 + "type": { 11290 + "name": "SEQUENCE", 11291 + "type": "builtin", 11292 + "content": [ 11293 + { 11294 + "id": "matchingRule", 11295 + "name": "[1]", 11296 + "type": "tag", 11297 + "class": "CONTEXT", 11298 + "explicit": false, 11299 + "content": [ 11300 + { 11301 + "name": "", 11302 + "type": { 11303 + "name": "MatchingRuleId", 11304 + "type": "defined" 11305 + } 11306 + } 11307 + ], 11308 + "optional": true 11309 + }, 11310 + { 11311 + "id": "type", 11312 + "name": "[2]", 11313 + "type": "tag", 11314 + "class": "CONTEXT", 11315 + "explicit": false, 11316 + "content": [ 11317 + { 11318 + "name": "", 11319 + "type": { 11320 + "name": "AttributeDescription", 11321 + "type": "defined" 11322 + } 11323 + } 11324 + ], 11325 + "optional": true 11326 + }, 11327 + { 11328 + "id": "matchValue", 11329 + "name": "[3]", 11330 + "type": "tag", 11331 + "class": "CONTEXT", 11332 + "explicit": false, 11333 + "content": [ 11334 + { 11335 + "name": "", 11336 + "type": { 11337 + "name": "AssertionValue", 11338 + "type": "defined" 11339 + } 11340 + } 11341 + ] 11342 + }, 11343 + { 11344 + "id": "dnAttributes", 11345 + "name": "[4]", 11346 + "type": "tag", 11347 + "class": "CONTEXT", 11348 + "explicit": false, 11349 + "content": [ 11350 + { 11351 + "name": "", 11352 + "type": { 11353 + "name": "BOOLEAN", 11354 + "type": "builtin" 11355 + } 11356 + } 11357 + ], 11358 + "default": false 11359 + } 11360 + ] 11361 + } 11362 + }, 11363 + "SearchResultEntry": { 11364 + "name": "SearchResultEntry", 11365 + "type": { 11366 + "name": "Application 4", 11367 + "type": "tag", 11368 + "class": "APPLICATION", 11369 + "explicit": false, 11370 + "content": [ 11371 + { 11372 + "name": "", 11373 + "type": { 11374 + "name": "SEQUENCE", 11375 + "type": "builtin", 11376 + "content": [ 11377 + { 11378 + "id": "objectName", 11379 + "name": "LDAPDN", 11380 + "type": "defined" 11381 + }, 11382 + { 11383 + "id": "attributes", 11384 + "name": "PartialAttributeList", 11385 + "type": "defined" 11386 + } 11387 + ] 11388 + } 11389 + } 11390 + ] 11391 + } 11392 + }, 11393 + "PartialAttributeList": { 11394 + "name": "PartialAttributeList", 11395 + "type": { 11396 + "name": "SEQUENCE", 11397 + "type": "builtin", 11398 + "typeOf": 1, 11399 + "content": [ 11400 + { 11401 + "name": "PartialAttribute", 11402 + "type": "defined" 11403 + } 11404 + ] 11405 + } 11406 + }, 11407 + "SearchResultReference": { 11408 + "name": "SearchResultReference", 11409 + "type": { 11410 + "name": "Application 19", 11411 + "type": "tag", 11412 + "class": "APPLICATION", 11413 + "explicit": false, 11414 + "content": [ 11415 + { 11416 + "name": "", 11417 + "type": { 11418 + "name": "SEQUENCE", 11419 + "type": "builtin", 11420 + "typeOf": 1, 11421 + "size": [ 11422 + 1, 11423 + "MAX" 11424 + ], 11425 + "content": [ 11426 + { 11427 + "name": "URI", 11428 + "type": "defined" 11429 + } 11430 + ] 11431 + } 11432 + } 11433 + ] 11434 + } 11435 + }, 11436 + "SearchResultDone": { 11437 + "name": "SearchResultDone", 11438 + "type": { 11439 + "name": "Application 5", 11440 + "type": "tag", 11441 + "class": "APPLICATION", 11442 + "explicit": false, 11443 + "content": [ 11444 + { 11445 + "name": "", 11446 + "type": { 11447 + "name": "LDAPResult", 11448 + "type": "defined" 11449 + } 11450 + } 11451 + ] 11452 + } 11453 + }, 11454 + "ModifyRequest": { 11455 + "name": "ModifyRequest", 11456 + "type": { 11457 + "name": "Application 6", 11458 + "type": "tag", 11459 + "class": "APPLICATION", 11460 + "explicit": false, 11461 + "content": [ 11462 + { 11463 + "name": "", 11464 + "type": { 11465 + "name": "SEQUENCE", 11466 + "type": "builtin", 11467 + "content": [ 11468 + { 11469 + "id": "object", 11470 + "name": "LDAPDN", 11471 + "type": "defined" 11472 + }, 11473 + { 11474 + "id": "changes", 11475 + "name": "SEQUENCE", 11476 + "type": "builtin", 11477 + "typeOf": 1, 11478 + "content": [ 11479 + { 11480 + "name": "SEQUENCE", 11481 + "type": "builtin", 11482 + "content": [ 11483 + { 11484 + "id": "operation", 11485 + "name": "ENUMERATED", 11486 + "type": "builtin", 11487 + "content": { 11488 + "add": 0, 11489 + "delete": 1, 11490 + "replace": 2 11491 + } 11492 + }, 11493 + { 11494 + "id": "modification", 11495 + "name": "PartialAttribute", 11496 + "type": "defined" 11497 + } 11498 + ] 11499 + } 11500 + ] 11501 + } 11502 + ] 11503 + } 11504 + } 11505 + ] 11506 + } 11507 + }, 11508 + "ModifyResponse": { 11509 + "name": "ModifyResponse", 11510 + "type": { 11511 + "name": "Application 7", 11512 + "type": "tag", 11513 + "class": "APPLICATION", 11514 + "explicit": false, 11515 + "content": [ 11516 + { 11517 + "name": "", 11518 + "type": { 11519 + "name": "LDAPResult", 11520 + "type": "defined" 11521 + } 11522 + } 11523 + ] 11524 + } 11525 + }, 11526 + "AddRequest": { 11527 + "name": "AddRequest", 11528 + "type": { 11529 + "name": "Application 8", 11530 + "type": "tag", 11531 + "class": "APPLICATION", 11532 + "explicit": false, 11533 + "content": [ 11534 + { 11535 + "name": "", 11536 + "type": { 11537 + "name": "SEQUENCE", 11538 + "type": "builtin", 11539 + "content": [ 11540 + { 11541 + "id": "entry", 11542 + "name": "LDAPDN", 11543 + "type": "defined" 11544 + }, 11545 + { 11546 + "id": "attributes", 11547 + "name": "AttributeList", 11548 + "type": "defined" 11549 + } 11550 + ] 11551 + } 11552 + } 11553 + ] 11554 + } 11555 + }, 11556 + "AttributeList": { 11557 + "name": "AttributeList", 11558 + "type": { 11559 + "name": "SEQUENCE", 11560 + "type": "builtin", 11561 + "typeOf": 1, 11562 + "content": [ 11563 + { 11564 + "name": "Attribute", 11565 + "type": "defined" 11566 + } 11567 + ] 11568 + } 11569 + }, 11570 + "AddResponse": { 11571 + "name": "AddResponse", 11572 + "type": { 11573 + "name": "Application 9", 11574 + "type": "tag", 11575 + "class": "APPLICATION", 11576 + "explicit": false, 11577 + "content": [ 11578 + { 11579 + "name": "", 11580 + "type": { 11581 + "name": "LDAPResult", 11582 + "type": "defined" 11583 + } 11584 + } 11585 + ] 11586 + } 11587 + }, 11588 + "DelRequest": { 11589 + "name": "DelRequest", 11590 + "type": { 11591 + "name": "Application 10", 11592 + "type": "tag", 11593 + "class": "APPLICATION", 11594 + "explicit": false, 11595 + "content": [ 11596 + { 11597 + "name": "", 11598 + "type": { 11599 + "name": "LDAPDN", 11600 + "type": "defined" 11601 + } 11602 + } 11603 + ] 11604 + } 11605 + }, 11606 + "DelResponse": { 11607 + "name": "DelResponse", 11608 + "type": { 11609 + "name": "Application 11", 11610 + "type": "tag", 11611 + "class": "APPLICATION", 11612 + "explicit": false, 11613 + "content": [ 11614 + { 11615 + "name": "", 11616 + "type": { 11617 + "name": "LDAPResult", 11618 + "type": "defined" 11619 + } 11620 + } 11621 + ] 11622 + } 11623 + }, 11624 + "ModifyDNRequest": { 11625 + "name": "ModifyDNRequest", 11626 + "type": { 11627 + "name": "Application 12", 11628 + "type": "tag", 11629 + "class": "APPLICATION", 11630 + "explicit": false, 11631 + "content": [ 11632 + { 11633 + "name": "", 11634 + "type": { 11635 + "name": "SEQUENCE", 11636 + "type": "builtin", 11637 + "content": [ 11638 + { 11639 + "id": "entry", 11640 + "name": "LDAPDN", 11641 + "type": "defined" 11642 + }, 11643 + { 11644 + "id": "newrdn", 11645 + "name": "RelativeLDAPDN", 11646 + "type": "defined" 11647 + }, 11648 + { 11649 + "id": "deleteoldrdn", 11650 + "name": "BOOLEAN", 11651 + "type": "builtin" 11652 + }, 11653 + { 11654 + "id": "newSuperior", 11655 + "name": "[0]", 11656 + "type": "tag", 11657 + "class": "CONTEXT", 11658 + "explicit": false, 11659 + "content": [ 11660 + { 11661 + "name": "", 11662 + "type": { 11663 + "name": "LDAPDN", 11664 + "type": "defined" 11665 + } 11666 + } 11667 + ], 11668 + "optional": true 11669 + } 11670 + ] 11671 + } 11672 + } 11673 + ] 11674 + } 11675 + }, 11676 + "ModifyDNResponse": { 11677 + "name": "ModifyDNResponse", 11678 + "type": { 11679 + "name": "Application 13", 11680 + "type": "tag", 11681 + "class": "APPLICATION", 11682 + "explicit": false, 11683 + "content": [ 11684 + { 11685 + "name": "", 11686 + "type": { 11687 + "name": "LDAPResult", 11688 + "type": "defined" 11689 + } 11690 + } 11691 + ] 11692 + } 11693 + }, 11694 + "CompareRequest": { 11695 + "name": "CompareRequest", 11696 + "type": { 11697 + "name": "Application 14", 11698 + "type": "tag", 11699 + "class": "APPLICATION", 11700 + "explicit": false, 11701 + "content": [ 11702 + { 11703 + "name": "", 11704 + "type": { 11705 + "name": "SEQUENCE", 11706 + "type": "builtin", 11707 + "content": [ 11708 + { 11709 + "id": "entry", 11710 + "name": "LDAPDN", 11711 + "type": "defined" 11712 + }, 11713 + { 11714 + "id": "ava", 11715 + "name": "AttributeValueAssertion", 11716 + "type": "defined" 11717 + } 11718 + ] 11719 + } 11720 + } 11721 + ] 11722 + } 11723 + }, 11724 + "CompareResponse": { 11725 + "name": "CompareResponse", 11726 + "type": { 11727 + "name": "Application 15", 11728 + "type": "tag", 11729 + "class": "APPLICATION", 11730 + "explicit": false, 11731 + "content": [ 11732 + { 11733 + "name": "", 11734 + "type": { 11735 + "name": "LDAPResult", 11736 + "type": "defined" 11737 + } 11738 + } 11739 + ] 11740 + } 11741 + }, 11742 + "AbandonRequest": { 11743 + "name": "AbandonRequest", 11744 + "type": { 11745 + "name": "Application 16", 11746 + "type": "tag", 11747 + "class": "APPLICATION", 11748 + "explicit": false, 11749 + "content": [ 11750 + { 11751 + "name": "", 11752 + "type": { 11753 + "name": "MessageID", 11754 + "type": "defined" 11755 + } 11756 + } 11757 + ] 11758 + } 11759 + }, 11760 + "ExtendedRequest": { 11761 + "name": "ExtendedRequest", 11762 + "type": { 11763 + "name": "Application 23", 11764 + "type": "tag", 11765 + "class": "APPLICATION", 11766 + "explicit": false, 11767 + "content": [ 11768 + { 11769 + "name": "", 11770 + "type": { 11771 + "name": "SEQUENCE", 11772 + "type": "builtin", 11773 + "content": [ 11774 + { 11775 + "id": "requestName", 11776 + "name": "[0]", 11777 + "type": "tag", 11778 + "class": "CONTEXT", 11779 + "explicit": false, 11780 + "content": [ 11781 + { 11782 + "name": "", 11783 + "type": { 11784 + "name": "LDAPOID", 11785 + "type": "defined" 11786 + } 11787 + } 11788 + ] 11789 + }, 11790 + { 11791 + "id": "requestValue", 11792 + "name": "[1]", 11793 + "type": "tag", 11794 + "class": "CONTEXT", 11795 + "explicit": false, 11796 + "content": [ 11797 + { 11798 + "name": "", 11799 + "type": { 11800 + "name": "OCTET STRING", 11801 + "type": "builtin" 11802 + } 11803 + } 11804 + ], 11805 + "optional": true 11806 + } 11807 + ] 11808 + } 11809 + } 11810 + ] 11811 + } 11812 + }, 11813 + "ExtendedResponse": { 11814 + "name": "ExtendedResponse", 11815 + "type": { 11816 + "name": "ANY", 11817 + "type": "builtin" 11818 + } 11819 + }, 11820 + "IntermediateResponse": { 11821 + "name": "IntermediateResponse", 11822 + "type": { 11823 + "name": "Application 25", 11824 + "type": "tag", 11825 + "class": "APPLICATION", 11826 + "explicit": false, 11827 + "content": [ 11828 + { 11829 + "name": "", 11830 + "type": { 11831 + "name": "SEQUENCE", 11832 + "type": "builtin", 11833 + "content": [ 11834 + { 11835 + "id": "responseName", 11836 + "name": "[0]", 11837 + "type": "tag", 11838 + "class": "CONTEXT", 11839 + "explicit": false, 11840 + "content": [ 11841 + { 11842 + "name": "", 11843 + "type": { 11844 + "name": "LDAPOID", 11845 + "type": "defined" 11846 + } 11847 + } 11848 + ], 11849 + "optional": true 11850 + }, 11851 + { 11852 + "id": "responseValue", 11853 + "name": "[1]", 11854 + "type": "tag", 11855 + "class": "CONTEXT", 11856 + "explicit": false, 11857 + "content": [ 11858 + { 11859 + "name": "", 11860 + "type": { 11861 + "name": "OCTET STRING", 11862 + "type": "builtin" 11863 + } 11864 + } 11865 + ], 11866 + "optional": true 11867 + } 11868 + ] 11869 + } 9854 11870 } 9855 11871 ] 9856 11872 }
+18 -9
tags.js
··· 1 1 export const tags = { 2 - "1.2.4":"2022-11-14", 3 - "1.2.3":"2021-10-21", 4 - "1.2.2":"2021-10-21", 5 - "1.2.1":"2020-09-06", 6 - "1.2.0":"2020-07-20", 7 - "1.1.0":"2019-07-13", 8 - "1.0.2":"2018-08-23", 9 - "1.0.1":"2018-08-14", 10 - "1.0.0":"2018-08-14", 2 + "2.1.0": "2025-08-03", 3 + "2.0.6": "2025-07-28", 4 + "2.0.5": "2025-04-12", 5 + "2.0.4": "2024-05-08", 6 + "2.0.3": "2024-05-06", 7 + "2.0.2": "2024-04-20", 8 + "2.0.1": "2024-03-28", 9 + "2.0.0": "2024-03-26", 10 + "1.3.0": "2024-03-26", 11 + "1.2.4": "2022-11-14", 12 + "1.2.3": "2021-10-21", 13 + "1.2.2": "2021-10-21", 14 + "1.2.1": "2020-09-06", 15 + "1.2.0": "2020-07-20", 16 + "1.1.0": "2019-07-13", 17 + "1.0.2": "2018-08-23", 18 + "1.0.1": "2018-08-14", 19 + "1.0.0": "2018-08-14", 11 20 };
+181 -34
test.js
··· 1 1 #!/usr/bin/env node 2 2 3 - import { ASN1 } from './asn1.js'; 3 + import * as fs from 'fs'; // 'node:fs' doesn't work on NodeJS 14.5.0 4 + import { ASN1, Stream } from './asn1.js'; 5 + import { Defs } from './defs.js'; 4 6 import { Hex } from './hex.js'; 7 + import { Base64 } from './base64.js'; 8 + import { Int10 } from './int10.js'; 9 + import { createPatch } from 'diff'; 5 10 6 - const 7 - all = (process.argv[2] == 'all'); 11 + const all = (process.argv[2] == 'all'); 12 + 13 + /** @type {Array<Tests>} */ 14 + const tests = []; 15 + 16 + const stats = { 17 + run: 0, 18 + error: 0, 19 + }; 20 + 21 + function diff(str1, str2) { 22 + let s = createPatch('test', str1, str2, null, null, { context: 2 }); 23 + s = s.slice(s.indexOf('@@'), -1); 24 + s = s.replace(/^@@.*/mg, '\x1B[34m$&\x1B[39m'); 25 + s = s.replace(/^-.*/mg, '\x1B[31m$&\x1B[39m'); 26 + s = s.replace(/^\+.*/mg, '\x1B[32m$&\x1B[39m'); 27 + return s; 28 + } 8 29 9 - const tests = [ 30 + /** 31 + * A class for managing and executing tests. 32 + */ 33 + class Tests { 34 + /** 35 + * The title of the test suite. 36 + * @type {string} 37 + */ 38 + title; 39 + 40 + /** 41 + * An array to store test data. 42 + * @type {Array<unknown>} 43 + */ 44 + data; 45 + 46 + /** 47 + * Checks a row of test data. 48 + * @param {Function} t - How to test a row of data. 49 + */ 50 + checkRow; 51 + 52 + /** 53 + * Constructs a new Tests instance. 54 + * @param {string} title - The title of the test suite. 55 + * @param {Function} checkRow - A function to check each row of data. 56 + * @param {Array<unknown>} data - The test data to be processed. 57 + */ 58 + constructor(title, checkRow, data) { 59 + this.title = title; 60 + this.checkRow = checkRow; 61 + this.data = data; 62 + } 63 + 64 + /** 65 + * Executes the tests and checks their results for all rows. 66 + */ 67 + checkAll() { 68 + if (all) console.log('\x1B[1m\x1B[34m' + this.title + '\x1B[39m\x1B[22m'); 69 + for (const t of this.data) 70 + this.checkRow(t); 71 + } 72 + 73 + /** 74 + * Prints the result of a test, indicating if it passed or failed. 75 + * @param {unknown} result The actual result of the test. 76 + * @param {unknown} expected The expected result of the test. 77 + * @param {string} comment A comment describing the test. 78 + */ 79 + checkResult(result, expected, comment) { 80 + ++stats.run; 81 + if (!result || result == expected) { 82 + if (all) console.log('\x1B[1m\x1B[32mOK \x1B[39m\x1B[22m ' + comment); 83 + } else { 84 + ++stats.error; 85 + console.log('\x1B[1m\x1B[31mERR\x1B[39m\x1B[22m ' + comment); 86 + if (result.length > 100) { 87 + console.log(' \x1B[1m\x1B[34mDIF\x1B[39m\x1B[22m ' + diff(result, expected.toString()).replace(/\n/g, '\n ')); 88 + } else { 89 + console.log(' \x1B[1m\x1B[34mEXP\x1B[39m\x1B[22m ' + expected.toString().replace(/\n/g, '\n ')); 90 + console.log(' \x1B[1m\x1B[33mGOT\x1B[39m\x1B[22m ' + result.replace(/\n/g, '\n ')); 91 + } 92 + } 93 + } 94 + } 95 + 96 + tests.push(new Tests('ASN.1', function (t) { 97 + const input = t[0], 98 + expected = t[1], 99 + comment = t[2]; 100 + let result; 101 + try { 102 + let node = ASN1.decode(Hex.decode(input)); 103 + if (typeof expected == 'function') 104 + result = expected(node); 105 + else 106 + result = node.content(); 107 + //TODO: check structure, not only first level content 108 + } catch (e) { 109 + result = 'Exception:\n' + e; 110 + } 111 + if (expected instanceof RegExp) 112 + result = expected.test(result) ? null : 'does not match'; 113 + this.checkResult(result, expected, comment); 114 + }, [ 10 115 // RSA Laboratories technical notes from https://luca.ntop.org/Teaching/Appunti/asn1.html 11 116 ['0304066E5DC0', '(18 bit)\n011011100101110111', 'ntop, bit string: DER encoding'], 12 117 ['0304066E5DE0', '(18 bit)\n011011100101110111', 'ntop, bit string: padded with "100000"'], ··· 36 141 ['170D3931303530363233343534305A', '1991-05-06 23:45:40 UTC', 'ntop, utc time: UTC'], 37 142 ['17113931303530363136343534302D30373030', '1991-05-06 16:45:40 UTC-07:00', 'ntop, utc time: PDT'], 38 143 // inspired by http://luca.ntop.org/Teaching/Appunti/asn1.html 39 - ['0304086E5DC0', 'Exception:\nInvalid BitString with unusedBits=8', 'bit string: invalid unusedBits'], 144 + ['0304086E5DC0', 'Exception:\nError: Invalid BitString with unusedBits=8', 'bit string: invalid unusedBits'], 40 145 // http://msdn.microsoft.com/en-us/library/windows/desktop/aa379076(v=vs.85).aspx 41 146 ['30820319308202820201003023310F300D0603550403130654657374434E3110300E060355040A1307546573744F726730819F300D06092A864886F70D010101050003818D00308189028181008FE2412A08E851A88CB3E853E7D54950B3278A2BCBEAB54273EA0257CC6533EE882061A11756C12418E3A808D3BED931F3370B94B8CC43080B7024F79CB18D5DD66D82D0540984F89F970175059C89D4D5C91EC913D72A6B309119D6D442E0C49D7C9271E1B22F5C8DEEF0F1171ED25F315BB19CBC2055BF3A37424575DC90650203010001A08201B4301A060A2B0601040182370D0203310C160A362E302E353336312E323042060A2B0601040182370D0201313430321E260043006500720074006900660069006300610074006500540065006D0070006C0061007400651E080055007300650072305706092B0601040182371514314A30480201090C237669636833642E6A646F6D6373632E6E74746573742E6D6963726F736F66742E636F6D0C154A444F4D4353435C61646D696E6973747261746F720C07636572747265713074060A2B0601040182370D0202316630640201011E5C004D006900630072006F0073006F0066007400200045006E00680061006E006300650064002000430072007900700074006F0067007200610070006800690063002000500072006F00760069006400650072002000760031002E003003010030818206092A864886F70D01090E31753073301706092B0601040182371402040A1E08005500730065007230290603551D2504223020060A2B0601040182370A030406082B0601050507030406082B06010505070302300E0603551D0F0101FF0404030205A0301D0603551D0E041604143C0F73DAF8EF41D83AEABE922A5D2C966A7B9454300D06092A864886F70D01010505000381810047EB995ADF9E700DFBA73132C15F5C24C2E0BFC624AF15660EB86A2EAB2BC4971FE3CBDC63A525ECC7B428616636A1311BBFDDD0FCBF1794901DE55EC7115EC9559FEBA33E14C799A6CBBAA1460F39D444C4C84B760E205D6DA9349ED4D58742EB2426511490B40F065E5288327A9520A0FDF7E57D60DD72689BF57B058F6D1E', 42 147 '(3 elem)', 'PKCS#10 request'], ··· 86 191 ['0420041EE4E3B7ED350CC24D034E436D9A1CB15BB1E328D37062FB82E84618AB0A3C', '(32 byte)\n041EE4E3B7ED350CC24D034E436D9A1CB15BB1E328D37062FB82E84618AB0A3C', 'Do not mix encapsulated and structured octet strings'], // GitHub issue #47 87 192 ['181531393835313130363231303632372E332D31323334', '1985-11-06 21:06:27.3 UTC-12:34', 'UTC offsets with minutes'], // GitHub issue #54 88 193 ['181331393835313130363231303632372E332B3134', '1985-11-06 21:06:27.3 UTC+14:00', 'UTC offset +13 and +14'], // GitHub issue #54 89 - ]; 194 + ['032100171E83C1B251803F86DD01E9CFA886BE89A7316D8372649AC2231EC669F81A84', n => { if (n.sub != null) return 'Should not decode content: ' + n.sub[0].content(); }, 'Key that resembles an UTCTime'], // GitHub issue #79 195 + ['171E83C1B251803F86DD01E9CFA886BE89A7316D8372649AC2231EC669F81A84', /^Exception:\nError: Unrecognized time: /, 'Invalid UTCTime'], // GitHub issue #79 196 + ])); 90 197 91 - let 92 - run = 0, 93 - expErr = 0, 94 - error = 0; 95 - tests.forEach(function (t) { 96 - const input = t[0], 97 - expected = t[1], 98 - comment = t[2], 99 - errorReason = t[3]; 100 - let result; 101 - try { 102 - result = ASN1.decode(Hex.decode(input)).content(); 103 - //TODO: check structure, not only first level content 104 - } catch (e) { 105 - result = 'Exception:\n' + e; 198 + tests.push(new Tests('Dump of examples', function () { 199 + const examples = fs.readdirSync('examples/').filter(f => f.endsWith('.dump')); 200 + for (const example of examples) { 201 + const filename = example.slice(0, -5); // Remove '.dump' suffix 202 + const expected = fs.readFileSync('examples/' + example, 'utf8'); 203 + let data = fs.readFileSync('examples/' + filename); 204 + data = Base64.unarmor(data); 205 + let node = ASN1.decode(data); 206 + const types = Defs.commonTypes 207 + .map(type => { 208 + const stats = Defs.match(node, type); 209 + return { type, match: stats.recognized / stats.total }; 210 + }) 211 + .sort((a, b) => b.match - a.match); 212 + Defs.match(node, types[0].type); 213 + let result = node.toPrettyString(); 214 + this.checkResult(result, expected, 'Dump of examples/' + filename); 106 215 } 107 - ++run; 108 - if (result == expected) { 109 - if (all) console.log('\x1B[1m\x1B[32mOK \x1B[39m\x1B[22m ' + comment); 110 - } else if (errorReason) { 111 - ++expErr; 112 - console.log('\x1B[1m\x1B[33mEXP\x1B[39m\x1B[22m ' + comment + ' (' + errorReason + ')' + '\n' + result); 113 - } else { 114 - ++error; 115 - console.log('\x1B[1m\x1B[31mERR\x1B[39m\x1B[22m ' + comment + '\n' + result); 116 - } 117 - }); 118 - console.log(run + ' tested, ' + expErr + ' expected, ' + error + ' errors.'); 119 - process.exit(error ? 1 : 0); 216 + }, [ 217 + [0], 218 + ])); 219 + 220 + tests.push(new Tests('Base64', function (t) { 221 + let bin = Base64.decode(t); 222 + let url = new Stream(bin, 0).b64Dump(0, bin.length); 223 + // check base64url encoding 224 + this.checkResult(url, t.replace(/\n/g, '').replace(/=*$/g, ''), 'Base64url: ' + bin.length + ' bytes'); 225 + // check conversion from base64url to base64 226 + let pretty = Base64.pretty(url); 227 + this.checkResult(pretty, t, 'Base64pretty: ' + bin.length + ' bytes'); 228 + let std = new Stream(bin, 0).b64Dump(0, bin.length, 'std'); 229 + // check direct base64 encoding 230 + this.checkResult(std, t.replace(/\n/g, ''), 'Base64: ' + bin.length + ' bytes'); 231 + }, [ 232 + 'AA==', 233 + 'ABA=', 234 + 'ABCD', 235 + 'ABCDEA==', 236 + 'ABCDEFE=', 237 + 'ABCDEFGH', 238 + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQR\nSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456w==', 239 + ])); 240 + 241 + tests.push(new Tests('Int10', function (t) { 242 + this.row = (0|this.row) + 1; 243 + this.num = this.num || new Int10(); 244 + this.num.mulAdd(t[0], t[1]); 245 + this.checkResult(this.num.toString(), t[2], 'Int10 row ' + this.row); 246 + }, [ 247 + [0, 1000000000, '1000000000'], 248 + [256, 23, '256000000023'], 249 + [256, 23, '65536000005911'], 250 + [256, 23, '16777216001513239'], 251 + [256, 23, '4294967296387389207'], 252 + [256, 23, '1099511627875171637015'], 253 + [256, 23, '281474976736043939075863'], 254 + [253, 1, '71213169114219116586193340'], 255 + [253, 1, '18016931785897436496306915021'], 256 + [253, 1, '4558283741832051433565649500314'], 257 + [253, 1, '1153245786683509012692109323579443'], 258 + [253, 1, '291771184030927780211103658865599080'], 259 + [1, 0, '291771184030927780211103658865599080'], 260 + ])); 261 + 262 + for (const t of tests) 263 + t.checkAll(); 264 + 265 + console.log(stats.run + ' tested, ' + stats.error + ' errors.'); 266 + process.exit(stats.error ? 1 : 0);
+32
testDefs.js
··· 1 + #!/usr/bin/env node 2 + 3 + import { promises as fs } from 'node:fs'; 4 + import { ASN1 } from './asn1.js'; 5 + import { Base64 } from './base64.js'; 6 + import { Defs } from './defs.js'; 7 + 8 + const tot = []; 9 + for await (const file of await fs.opendir('examples')) { 10 + let content = await fs.readFile('examples/' + file.name); 11 + try { 12 + try { // try PEM first 13 + content = Base64.unarmor(content); 14 + } catch (ignore) { // try DER/BER then 15 + } 16 + let result = ASN1.decode(content); 17 + content = null; 18 + const types = Defs.commonTypes 19 + .map(type => { 20 + const stats = Defs.match(result, type); 21 + return { type, match: stats.recognized / stats.total }; 22 + }) 23 + .sort((a, b) => b.match - a.match); 24 + tot.push([ types[0].match, file.name, types[0].type.description ]); 25 + } catch (e) { 26 + tot.push([ 0, file.name, e.message ]); 27 + } 28 + } 29 + for (const f of tot) 30 + console.log(f[0].toFixed(3) + '\t' + f[1] + '\t' + f[2]); 31 + const avg = tot.map(f => f[0]).reduce((sum, val) => sum + val) / tot.length; 32 + console.log('\x1B[1m\x1B[32m' + (avg * 100).toFixed(3) + '\x1B[39m\x1B[22m%\tAVERAGE');
+37
theme.js
··· 1 + // set dark theme depending on OS settings 2 + function setTheme(theme) { 3 + if (theme == 'os') { 4 + let prefersDarkScheme = window.matchMedia('(prefers-color-scheme: dark)'); 5 + if (prefersDarkScheme.matches) { 6 + theme = 'dark'; 7 + } else { 8 + theme = 'light'; 9 + } 10 + } 11 + document.documentElement.style['color-scheme'] = theme; 12 + document.querySelector('html').setAttribute('data-theme', theme); 13 + // set the theme-color for iOS devices 14 + let bgColor = getComputedStyle(document.documentElement).getPropertyValue('--main-bg-color'); 15 + let metaThemeColor = document.querySelector('meta[name=theme-color]'); 16 + metaThemeColor.setAttribute('content', bgColor); 17 + } 18 + // activate selected theme 19 + let theme = 'os'; 20 + const localStorageTheme = localStorage.getItem('theme'); 21 + if (localStorageTheme) { 22 + theme = localStorageTheme; 23 + } 24 + setTheme(theme); 25 + // add handler to theme selection element 26 + const selectTheme = document.getElementById('theme-select'); 27 + if (selectTheme) { 28 + selectTheme.addEventListener ('change', function () { 29 + localStorage.setItem('theme', selectTheme.value); 30 + setTheme(selectTheme.value); 31 + }); 32 + if (theme == 'light') { 33 + selectTheme.selectedIndex = 2; 34 + } else if (theme == 'dark') { 35 + selectTheme.selectedIndex = 1; 36 + } 37 + }
+1
tree-icon-dark.svg
··· 1 + <svg xmlns="http://www.w3.org/2000/svg" width="28" height="14"><circle cx="6.903" cy="7.102" r="5.165" style="fill:#000;fill-opacity:1;stroke:#555;stroke-width:1.03676;stroke-dasharray:none;stroke-opacity:1"/><circle cx="21.133" cy="7.029" r="5.165" style="fill:#000;fill-opacity:1;stroke:#555;stroke-width:1.03676;stroke-dasharray:none;stroke-opacity:1"/><path d="M17.908 7.071h6.783" style="opacity:1;fill:none;fill-opacity:1;stroke:#555;stroke-width:1.03676;stroke-dasharray:none;stroke-opacity:1"/><g style="fill:none;fill-opacity:1;stroke:#555;stroke-width:.518375;stroke-dasharray:none;stroke-opacity:1"><path d="M5.231 9.992h9.466" style="opacity:.992268;fill:none;fill-opacity:1;stroke:#555;stroke-width:1.44663;stroke-dasharray:none;stroke-opacity:1" transform="translate(-.289 -.083)scale(.71667)"/><path d="M10.006 5.242v9.465" style="opacity:1;fill:none;fill-opacity:1;stroke:#555;stroke-width:1.44663;stroke-dasharray:none;stroke-opacity:1" transform="translate(-.289 -.083)scale(.71667)"/></g></svg>
+1
tree-icon-light.svg
··· 1 + <svg xmlns="http://www.w3.org/2000/svg" width="28" height="14"><circle cx="6.936" cy="7.247" r="5.165" style="fill:silver;fill-opacity:1;stroke:#999;stroke-width:1.03676;stroke-dasharray:none;stroke-opacity:1"/><circle cx="21.166" cy="7.174" r="5.165" style="fill:silver;fill-opacity:1;stroke:#999;stroke-width:1.03676;stroke-dasharray:none;stroke-opacity:1"/><path d="M17.94 7.216h6.784" style="fill:none;fill-opacity:1;stroke:#999;stroke-width:1.03676;stroke-dasharray:none;stroke-opacity:1"/><g style="fill:none;fill-opacity:1;stroke:#999;stroke-width:.518375;stroke-dasharray:none;stroke-opacity:1"><path d="M5.231 9.992h9.466" style="opacity:.992268;fill:none;fill-opacity:1;stroke:#999;stroke-width:1.44663;stroke-dasharray:none;stroke-opacity:1" transform="translate(-.256 .062)scale(.71667)"/><path d="M10.006 5.242v9.465" style="opacity:1;fill:none;fill-opacity:1;stroke:#999;stroke-width:1.44663;stroke-dasharray:none;stroke-opacity:1" transform="translate(-.256 .062)scale(.71667)"/></g></svg>
-1
updateOID.sh
··· 43 43 } 44 44 } 45 45 END { 46 - print "\"END\": \"\"" 47 46 print "};" 48 47 } 49 48 ' >oids.js
+1 -1
updateRFC.sh
··· 1 1 #/bin/sh 2 - RFCs="5280 5208 3369 3161 2986 4211 4210" 2 + RFCs="5280 5208 3369 3161 2986 4211 4210 8017 4511" 3 3 downloadRFC() { 4 4 URL="https://www.ietf.org/rfc/rfc$1.txt" 5 5 if [ -x /usr/bin/fetch ]; then
+37
vite.config.js
··· 1 + import fs from 'node:fs'; 2 + import { defineConfig } from 'vite'; 3 + import { viteSingleFile } from 'vite-plugin-singlefile'; 4 + import pluginDom from 'vite-plugin-dom'; 5 + import { DomUtils } from 'htmlparser2'; 6 + 7 + const removeNodes = [ 'rowExamples' ]; 8 + 9 + const preventSVGEmit = () => { 10 + return { 11 + generateBundle(opts, bundle) { 12 + for (const key in bundle) 13 + if (key.endsWith('.svg')) 14 + delete bundle[key]; 15 + }, 16 + }; 17 + }; 18 + 19 + export default defineConfig({ 20 + plugins: [ 21 + preventSVGEmit(), 22 + pluginDom({ 23 + applyOnMode: true, // all modes 24 + handler: node => { 25 + if (removeNodes.includes(node.attribs.id)) 26 + DomUtils.removeElement(node); 27 + else if (node.name == 'link' && node.attribs.rel == 'icon') 28 + node.attribs.href = 'data:image/svg+xml;base64,' + btoa(fs.readFileSync('favicon.svg', 'ascii').replace(/^([^<]+|<[^s]|<s[^v]|<sv[^g])+/, '').trim()); 29 + }, 30 + }), 31 + viteSingleFile(), 32 + ], 33 + build: { 34 + minify: false, 35 + cssMinify: false, 36 + }, 37 + });