forked from lapo-luchini/asn1js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
107 lines (106 loc) · 6.11 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html>
<head>
<meta charset="US-ASCII">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>ASN.1 JavaScript decoder</title>
<link rel="stylesheet" href="index.css" type="text/css" id="theme-base">
</head>
<body>
<header>
<div class="title">
<h1>ASN.1 JavaScript decoder</h1>
</div>
<div class="menu noprint">
<form class="no-print">
<input id="butClear" type="button" value="clear">
<select id="theme-select">
<option value="os">OS Theme</option>
<option value="dark">Dark Theme</option>
<option value="light">Light Theme</option>
</select>
</form>
</div>
</header>
<div id="main-page">
<div>
<div id="dump" class="no-print"></div>
<div id="tree"></div>
</div>
<form class="no-print">
<textarea id="area" rows="8"></textarea>
<br>
<br>
<label title="can be slow with big files"><input type="checkbox" id="wantHex" checked="checked"> with hex dump</label>
<label title="can be slow with big files"><input type="checkbox" id="wantDef" checked="checked"> with definitions</label>
<input id="butDecode" type="button" value="decode">
<br><br>
<table>
<tr><td>Drag or load file:</td><td><input type="file" id="file"></td></tr>
<tr><td>Load examples:</td><td>
<select id="examples">
<option value="sig-p256-der.p7m">PKCS#7/CMS attached signature (DER)</option>
<option value="sig-p256-ber.p7m">PKCS#7/CMS attached signature (BER)</option>
<option value="sig-rsa1024-sha1.p7s">PKCS#7/CMS detached signature (old)</option>
<option value="letsencrypt-x3.cer">X.509 certificate: Let's Encrypt X3</option>
<option value="ed25519.cer">X.509 certificate: ed25519 (RFC 8410)</option>
</select>
<input id="butExample" type="button" value="load"><br>
</td></tr>
<tr><td>Definitions:</td><td><select id="definitions"></select></td></tr>
</table>
</form>
<br>
</div>
<div id="help" class="no-print">
<h2>Instructions</h2>
<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>
<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>
<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>
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>
Clicking a node in the tree will hide its sub-nodes (collapsed nodes can be noticed because they will become <i>italic</i>).</p>
<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>
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>
<div class="license">
<h3>Copyright</h3>
<div><p class="hidden">
ASN.1 JavaScript decoder<br>
Copyright © 2008-2023 Lapo Luchini <a href="mailto:lapo@lapo.it?subject=ASN1js"><lapo@lapo.it></a><br>
<br>
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.<br>
<br>
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
</p></div>
<p>ASN.1 JavaScript decoder Copyright © 2008-2023 <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>
</div>
<p><span class="tt">OBJECT 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>
<h3>Links</h3>
<ul>
<li><a href="http://lapo.it/asn1js/">official website</a></li>
<li><a href="http://asn1js.eu/">dedicated domain</a></li>
<li>previous versions on githack: <select id="tags"><option>[select tag]</option></select></li>
<li><a href="http://idf.lapo.it/p/asn1js/">InDefero tracker</a> (currently offline)</li>
<li><a href="https://github.com/lapo-luchini/asn1js">github mirror</a></li>
<li><a href="https://www.openhub.net/p/asn1js">OpenHub code stats</a></li>
</ul>
</div>
<script type="text/javascript" src="tags.js"></script>
<script type="text/javascript" src="hex.js"></script>
<script type="text/javascript" src="base64.js"></script>
<script type="text/javascript" src="oids.js"></script>
<script type="text/javascript" src="rfcdef.js"></script>
<script type="text/javascript" src="defs.js"></script>
<script type="text/javascript" src="int10.js"></script>
<script type="text/javascript" src="asn1.js"></script>
<script type="text/javascript" src="dom.js"></script>
<script type="text/javascript" src="index.js"></script>
</body>
</html>