TOR: update to v0.2.5.12
[tomato.git] / release / src / router / tor / doc / tor-gencert.html.in
blobc1e3d70b7c2e4b047859923a6c03c2fc372bf393
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
6 <meta name="generator" content="AsciiDoc 8.6.8" />
7 <title>tor-gencert(1)</title>
8 <style type="text/css">
9 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
11 /* Default font. */
12 body {
13 font-family: Georgia,serif;
16 /* Title font. */
17 h1, h2, h3, h4, h5, h6,
18 div.title, caption.title,
19 thead, p.table.header,
20 #toctitle,
21 #author, #revnumber, #revdate, #revremark,
22 #footer {
23 font-family: Arial,Helvetica,sans-serif;
26 body {
27 margin: 1em 5% 1em 5%;
30 a {
31 color: blue;
32 text-decoration: underline;
34 a:visited {
35 color: fuchsia;
38 em {
39 font-style: italic;
40 color: navy;
43 strong {
44 font-weight: bold;
45 color: #083194;
48 h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
50 margin-top: 1.2em;
51 margin-bottom: 0.5em;
52 line-height: 1.3;
55 h1, h2, h3 {
56 border-bottom: 2px solid silver;
58 h2 {
59 padding-top: 0.5em;
61 h3 {
62 float: left;
64 h3 + * {
65 clear: left;
67 h5 {
68 font-size: 1.0em;
71 div.sectionbody {
72 margin-left: 0;
75 hr {
76 border: 1px solid silver;
79 p {
80 margin-top: 0.5em;
81 margin-bottom: 0.5em;
84 ul, ol, li > p {
85 margin-top: 0;
87 ul > li { color: #aaa; }
88 ul > li > * { color: black; }
90 .monospaced, code, pre {
91 font-family: "Courier New", Courier, monospace;
92 font-size: inherit;
93 color: navy;
94 padding: 0;
95 margin: 0;
99 #author {
100 color: #527bbd;
101 font-weight: bold;
102 font-size: 1.1em;
104 #email {
106 #revnumber, #revdate, #revremark {
109 #footer {
110 font-size: small;
111 border-top: 2px solid silver;
112 padding-top: 0.5em;
113 margin-top: 4.0em;
115 #footer-text {
116 float: left;
117 padding-bottom: 0.5em;
119 #footer-badges {
120 float: right;
121 padding-bottom: 0.5em;
124 #preamble {
125 margin-top: 1.5em;
126 margin-bottom: 1.5em;
128 div.imageblock, div.exampleblock, div.verseblock,
129 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130 div.admonitionblock {
131 margin-top: 1.0em;
132 margin-bottom: 1.5em;
134 div.admonitionblock {
135 margin-top: 2.0em;
136 margin-bottom: 2.0em;
137 margin-right: 10%;
138 color: #606060;
141 div.content { /* Block element content. */
142 padding: 0;
145 /* Block element titles. */
146 div.title, caption.title {
147 color: #527bbd;
148 font-weight: bold;
149 text-align: left;
150 margin-top: 1.0em;
151 margin-bottom: 0.5em;
153 div.title + * {
154 margin-top: 0;
157 td div.title:first-child {
158 margin-top: 0.0em;
160 div.content div.title:first-child {
161 margin-top: 0.0em;
163 div.content + div.title {
164 margin-top: 0.0em;
167 div.sidebarblock > div.content {
168 background: #ffffee;
169 border: 1px solid #dddddd;
170 border-left: 4px solid #f0f0f0;
171 padding: 0.5em;
174 div.listingblock > div.content {
175 border: 1px solid #dddddd;
176 border-left: 5px solid #f0f0f0;
177 background: #f8f8f8;
178 padding: 0.5em;
181 div.quoteblock, div.verseblock {
182 padding-left: 1.0em;
183 margin-left: 1.0em;
184 margin-right: 10%;
185 border-left: 5px solid #f0f0f0;
186 color: #888;
189 div.quoteblock > div.attribution {
190 padding-top: 0.5em;
191 text-align: right;
194 div.verseblock > pre.content {
195 font-family: inherit;
196 font-size: inherit;
198 div.verseblock > div.attribution {
199 padding-top: 0.75em;
200 text-align: left;
202 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
203 div.verseblock + div.attribution {
204 text-align: left;
207 div.admonitionblock .icon {
208 vertical-align: top;
209 font-size: 1.1em;
210 font-weight: bold;
211 text-decoration: underline;
212 color: #527bbd;
213 padding-right: 0.5em;
215 div.admonitionblock td.content {
216 padding-left: 0.5em;
217 border-left: 3px solid #dddddd;
220 div.exampleblock > div.content {
221 border-left: 3px solid #dddddd;
222 padding-left: 0.5em;
225 div.imageblock div.content { padding-left: 0; }
226 span.image img { border-style: none; }
227 a.image:visited { color: white; }
229 dl {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
233 dt {
234 margin-top: 0.5em;
235 margin-bottom: 0;
236 font-style: normal;
237 color: navy;
239 dd > *:first-child {
240 margin-top: 0.1em;
243 ul, ol {
244 list-style-position: outside;
246 ol.arabic {
247 list-style-type: decimal;
249 ol.loweralpha {
250 list-style-type: lower-alpha;
252 ol.upperalpha {
253 list-style-type: upper-alpha;
255 ol.lowerroman {
256 list-style-type: lower-roman;
258 ol.upperroman {
259 list-style-type: upper-roman;
262 div.compact ul, div.compact ol,
263 div.compact p, div.compact p,
264 div.compact div, div.compact div {
265 margin-top: 0.1em;
266 margin-bottom: 0.1em;
269 tfoot {
270 font-weight: bold;
272 td > div.verse {
273 white-space: pre;
276 div.hdlist {
277 margin-top: 0.8em;
278 margin-bottom: 0.8em;
280 div.hdlist tr {
281 padding-bottom: 15px;
283 dt.hdlist1.strong, td.hdlist1.strong {
284 font-weight: bold;
286 td.hdlist1 {
287 vertical-align: top;
288 font-style: normal;
289 padding-right: 0.8em;
290 color: navy;
292 td.hdlist2 {
293 vertical-align: top;
295 div.hdlist.compact tr {
296 margin: 0;
297 padding-bottom: 0;
300 .comment {
301 background: yellow;
304 .footnote, .footnoteref {
305 font-size: 0.8em;
308 span.footnote, span.footnoteref {
309 vertical-align: super;
312 #footnotes {
313 margin: 20px 0 20px 0;
314 padding: 7px 0 0 0;
317 #footnotes div.footnote {
318 margin: 0 0 5px 0;
321 #footnotes hr {
322 border: none;
323 border-top: 1px solid silver;
324 height: 1px;
325 text-align: left;
326 margin-left: 0;
327 width: 20%;
328 min-width: 100px;
331 div.colist td {
332 padding-right: 0.5em;
333 padding-bottom: 0.3em;
334 vertical-align: top;
336 div.colist td img {
337 margin-top: 0.3em;
340 @media print {
341 #footer-badges { display: none; }
344 #toc {
345 margin-bottom: 2.5em;
348 #toctitle {
349 color: #527bbd;
350 font-size: 1.1em;
351 font-weight: bold;
352 margin-top: 1.0em;
353 margin-bottom: 0.1em;
356 div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
357 margin-top: 0;
358 margin-bottom: 0;
360 div.toclevel2 {
361 margin-left: 2em;
362 font-size: 0.9em;
364 div.toclevel3 {
365 margin-left: 4em;
366 font-size: 0.9em;
368 div.toclevel4 {
369 margin-left: 6em;
370 font-size: 0.9em;
373 span.aqua { color: aqua; }
374 span.black { color: black; }
375 span.blue { color: blue; }
376 span.fuchsia { color: fuchsia; }
377 span.gray { color: gray; }
378 span.green { color: green; }
379 span.lime { color: lime; }
380 span.maroon { color: maroon; }
381 span.navy { color: navy; }
382 span.olive { color: olive; }
383 span.purple { color: purple; }
384 span.red { color: red; }
385 span.silver { color: silver; }
386 span.teal { color: teal; }
387 span.white { color: white; }
388 span.yellow { color: yellow; }
390 span.aqua-background { background: aqua; }
391 span.black-background { background: black; }
392 span.blue-background { background: blue; }
393 span.fuchsia-background { background: fuchsia; }
394 span.gray-background { background: gray; }
395 span.green-background { background: green; }
396 span.lime-background { background: lime; }
397 span.maroon-background { background: maroon; }
398 span.navy-background { background: navy; }
399 span.olive-background { background: olive; }
400 span.purple-background { background: purple; }
401 span.red-background { background: red; }
402 span.silver-background { background: silver; }
403 span.teal-background { background: teal; }
404 span.white-background { background: white; }
405 span.yellow-background { background: yellow; }
407 span.big { font-size: 2em; }
408 span.small { font-size: 0.6em; }
410 span.underline { text-decoration: underline; }
411 span.overline { text-decoration: overline; }
412 span.line-through { text-decoration: line-through; }
414 div.unbreakable { page-break-inside: avoid; }
418 * xhtml11 specific
420 * */
422 div.tableblock {
423 margin-top: 1.0em;
424 margin-bottom: 1.5em;
426 div.tableblock > table {
427 border: 3px solid #527bbd;
429 thead, p.table.header {
430 font-weight: bold;
431 color: #527bbd;
433 p.table {
434 margin-top: 0;
436 /* Because the table frame attribute is overriden by CSS in most browsers. */
437 div.tableblock > table[frame="void"] {
438 border-style: none;
440 div.tableblock > table[frame="hsides"] {
441 border-left-style: none;
442 border-right-style: none;
444 div.tableblock > table[frame="vsides"] {
445 border-top-style: none;
446 border-bottom-style: none;
451 * html5 specific
453 * */
455 table.tableblock {
456 margin-top: 1.0em;
457 margin-bottom: 1.5em;
459 thead, p.tableblock.header {
460 font-weight: bold;
461 color: #527bbd;
463 p.tableblock {
464 margin-top: 0;
466 table.tableblock {
467 border-width: 3px;
468 border-spacing: 0px;
469 border-style: solid;
470 border-color: #527bbd;
471 border-collapse: collapse;
473 th.tableblock, td.tableblock {
474 border-width: 1px;
475 padding: 4px;
476 border-style: solid;
477 border-color: #527bbd;
480 table.tableblock.frame-topbot {
481 border-left-style: hidden;
482 border-right-style: hidden;
484 table.tableblock.frame-sides {
485 border-top-style: hidden;
486 border-bottom-style: hidden;
488 table.tableblock.frame-none {
489 border-style: hidden;
492 th.tableblock.halign-left, td.tableblock.halign-left {
493 text-align: left;
495 th.tableblock.halign-center, td.tableblock.halign-center {
496 text-align: center;
498 th.tableblock.halign-right, td.tableblock.halign-right {
499 text-align: right;
502 th.tableblock.valign-top, td.tableblock.valign-top {
503 vertical-align: top;
505 th.tableblock.valign-middle, td.tableblock.valign-middle {
506 vertical-align: middle;
508 th.tableblock.valign-bottom, td.tableblock.valign-bottom {
509 vertical-align: bottom;
514 * manpage specific
516 * */
518 body.manpage h1 {
519 padding-top: 0.5em;
520 padding-bottom: 0.5em;
521 border-top: 2px solid silver;
522 border-bottom: 2px solid silver;
524 body.manpage h2 {
525 border-style: none;
527 body.manpage div.sectionbody {
528 margin-left: 3em;
531 @media print {
532 body.manpage div#toc { display: none; }
536 </style>
537 <script type="text/javascript">
538 /*<![CDATA[*/
539 var asciidoc = { // Namespace.
541 /////////////////////////////////////////////////////////////////////
542 // Table Of Contents generator
543 /////////////////////////////////////////////////////////////////////
545 /* Author: Mihai Bazon, September 2002
546 * http://students.infoiasi.ro/~mishoo
548 * Table Of Content generator
549 * Version: 0.4
551 * Feel free to use this script under the terms of the GNU General Public
552 * License, as long as you do not remove or alter this notice.
555 /* modified by Troy D. Hanson, September 2006. License: GPL */
556 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
558 // toclevels = 1..4.
559 toc: function (toclevels) {
561 function getText(el) {
562 var text = "";
563 for (var i = el.firstChild; i != null; i = i.nextSibling) {
564 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
565 text += i.data;
566 else if (i.firstChild != null)
567 text += getText(i);
569 return text;
572 function TocEntry(el, text, toclevel) {
573 this.element = el;
574 this.text = text;
575 this.toclevel = toclevel;
578 function tocEntries(el, toclevels) {
579 var result = new Array;
580 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
581 // Function that scans the DOM tree for header elements (the DOM2
582 // nodeIterator API would be a better technique but not supported by all
583 // browsers).
584 var iterate = function (el) {
585 for (var i = el.firstChild; i != null; i = i.nextSibling) {
586 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
587 var mo = re.exec(i.tagName);
588 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
589 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
591 iterate(i);
595 iterate(el);
596 return result;
599 var toc = document.getElementById("toc");
600 if (!toc) {
601 return;
604 // Delete existing TOC entries in case we're reloading the TOC.
605 var tocEntriesToRemove = [];
606 var i;
607 for (i = 0; i < toc.childNodes.length; i++) {
608 var entry = toc.childNodes[i];
609 if (entry.nodeName.toLowerCase() == 'div'
610 && entry.getAttribute("class")
611 && entry.getAttribute("class").match(/^toclevel/))
612 tocEntriesToRemove.push(entry);
614 for (i = 0; i < tocEntriesToRemove.length; i++) {
615 toc.removeChild(tocEntriesToRemove[i]);
618 // Rebuild TOC entries.
619 var entries = tocEntries(document.getElementById("content"), toclevels);
620 for (var i = 0; i < entries.length; ++i) {
621 var entry = entries[i];
622 if (entry.element.id == "")
623 entry.element.id = "_toc_" + i;
624 var a = document.createElement("a");
625 a.href = "#" + entry.element.id;
626 a.appendChild(document.createTextNode(entry.text));
627 var div = document.createElement("div");
628 div.appendChild(a);
629 div.className = "toclevel" + entry.toclevel;
630 toc.appendChild(div);
632 if (entries.length == 0)
633 toc.parentNode.removeChild(toc);
637 /////////////////////////////////////////////////////////////////////
638 // Footnotes generator
639 /////////////////////////////////////////////////////////////////////
641 /* Based on footnote generation code from:
642 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
645 footnotes: function () {
646 // Delete existing footnote entries in case we're reloading the footnodes.
647 var i;
648 var noteholder = document.getElementById("footnotes");
649 if (!noteholder) {
650 return;
652 var entriesToRemove = [];
653 for (i = 0; i < noteholder.childNodes.length; i++) {
654 var entry = noteholder.childNodes[i];
655 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
656 entriesToRemove.push(entry);
658 for (i = 0; i < entriesToRemove.length; i++) {
659 noteholder.removeChild(entriesToRemove[i]);
662 // Rebuild footnote entries.
663 var cont = document.getElementById("content");
664 var spans = cont.getElementsByTagName("span");
665 var refs = {};
666 var n = 0;
667 for (i=0; i<spans.length; i++) {
668 if (spans[i].className == "footnote") {
669 n++;
670 var note = spans[i].getAttribute("data-note");
671 if (!note) {
672 // Use [\s\S] in place of . so multi-line matches work.
673 // Because JavaScript has no s (dotall) regex flag.
674 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
675 spans[i].innerHTML =
676 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
677 "' title='View footnote' class='footnote'>" + n + "</a>]";
678 spans[i].setAttribute("data-note", note);
680 noteholder.innerHTML +=
681 "<div class='footnote' id='_footnote_" + n + "'>" +
682 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
683 n + "</a>. " + note + "</div>";
684 var id =spans[i].getAttribute("id");
685 if (id != null) refs["#"+id] = n;
688 if (n == 0)
689 noteholder.parentNode.removeChild(noteholder);
690 else {
691 // Process footnoterefs.
692 for (i=0; i<spans.length; i++) {
693 if (spans[i].className == "footnoteref") {
694 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
695 href = href.match(/#.*/)[0]; // Because IE return full URL.
696 n = refs[href];
697 spans[i].innerHTML =
698 "[<a href='#_footnote_" + n +
699 "' title='View footnote' class='footnote'>" + n + "</a>]";
705 install: function(toclevels) {
706 var timerId;
708 function reinstall() {
709 asciidoc.footnotes();
710 if (toclevels) {
711 asciidoc.toc(toclevels);
715 function reinstallAndRemoveTimer() {
716 clearInterval(timerId);
717 reinstall();
720 timerId = setInterval(reinstall, 500);
721 if (document.addEventListener)
722 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
723 else
724 window.onload = reinstallAndRemoveTimer;
728 asciidoc.install();
729 /*]]>*/
730 </script>
731 </head>
732 <body class="manpage">
733 <div id="header">
734 <h1>
735 tor-gencert(1) Manual Page
736 </h1>
737 <h2>NAME</h2>
738 <div class="sectionbody">
739 <p>tor-gencert -
740 Generate certs and keys for Tor directory authorities
741 </p>
742 </div>
743 </div>
744 <div id="content">
745 <div class="sect1">
746 <h2 id="_synopsis">SYNOPSIS</h2>
747 <div class="sectionbody">
748 <div class="paragraph"><p><strong>tor-gencert</strong> [-h|--help] [-v] [-r|--reuse] [--create-identity-key] [-i <em>id_file</em>] [-c
749 <em>cert_file</em>] [-m <em>num</em>] [-a <em>address</em>:<em>port</em>]</p></div>
750 </div>
751 </div>
752 <div class="sect1">
753 <h2 id="_description">DESCRIPTION</h2>
754 <div class="sectionbody">
755 <div class="paragraph"><p><strong>tor-gencert</strong> generates certificates and private keys for use by Tor
756 directory authorities running the v3 Tor directory protocol, as used by
757 Tor 0.2.0 and later. If you are not running a directory authority, you
758 don&#8217;t need to use tor-gencert.<br /></p></div>
759 <div class="paragraph"><p>Every directory authority has a long term authority <em>identity</em> <em>key</em> (which
760 is distinct from the identity key it uses as a Tor server); this key
761 should be kept offline in a secure location. It is used to certify
762 shorter-lived <em>signing</em> <em>keys</em>, which are kept online and used by the
763 directory authority to sign votes and consensus documents.<br /></p></div>
764 <div class="paragraph"><p>After you use this program to generate a signing key and a certificate,
765 copy those files to the keys subdirectory of your Tor process, and send
766 Tor a SIGHUP signal. DO NOT COPY THE IDENTITY KEY.</p></div>
767 </div>
768 </div>
769 <div class="sect1">
770 <h2 id="_options">OPTIONS</h2>
771 <div class="sectionbody">
772 <div class="dlist"><dl>
773 <dt class="hdlist1">
774 <strong>-v</strong>
775 </dt>
776 <dd>
778 Display verbose output.
779 </p>
780 </dd>
781 <dt class="hdlist1">
782 <strong>-h</strong> or <strong>--help</strong>
783 </dt>
784 <dd>
786 Display help text and exit.
787 </p>
788 </dd>
789 <dt class="hdlist1">
790 <strong>-r</strong> or <strong>--reuse</strong>
791 </dt>
792 <dd>
794 Generate a new certificate, but not a new signing key. This can be used to
795 change the address or lifetime associated with a given key.
796 </p>
797 </dd>
798 <dt class="hdlist1">
799 <strong>--create-identity-key</strong>
800 </dt>
801 <dd>
803 Generate a new identity key. You should only use this option the first time
804 you run tor-gencert; in the future, you should use the identity key that&#8217;s
805 already there.
806 </p>
807 </dd>
808 <dt class="hdlist1">
809 <strong>-i</strong> <em>FILENAME</em>
810 </dt>
811 <dd>
813 Read the identity key from the specified file. If the file is not present
814 and --create-identity-key is provided, create the identity key in the
815 specified file. Default: "./authority_identity_key"
816 </p>
817 </dd>
818 <dt class="hdlist1">
819 <strong>-s</strong> <em>FILENAME</em>
820 </dt>
821 <dd>
823 Write the signing key to the specified file. Default:
824 "./authority_signing_key"
825 </p>
826 </dd>
827 <dt class="hdlist1">
828 <strong>-c</strong> <em>FILENAME</em>
829 </dt>
830 <dd>
832 Write the certificate to the specified file. Default:
833 "./authority_certificate"
834 </p>
835 </dd>
836 <dt class="hdlist1">
837 <strong>-m</strong> <em>NUM</em>
838 </dt>
839 <dd>
841 Number of months that the certificate should be valid. Default: 12.
842 </p>
843 </dd>
844 <dt class="hdlist1">
845 <strong>--passphrase-fd</strong> <em>FILEDES</em>
846 </dt>
847 <dd>
849 Filedescriptor to read the file descriptor from. Ends at the first NUL or
850 newline. Default: read from the terminal.
851 </p>
852 </dd>
853 <dt class="hdlist1">
854 <strong>-a</strong> <em>address</em>:<em>port</em>
855 </dt>
856 <dd>
858 If provided, advertise the address:port combination as this authority&#8217;s
859 preferred directory port in its certificate. If the address is a hostname,
860 the hostname is resolved to an IP before it&#8217;s published.
861 </p>
862 </dd>
863 </dl></div>
864 </div>
865 </div>
866 <div class="sect1">
867 <h2 id="_bugs">BUGS</h2>
868 <div class="sectionbody">
869 <div class="paragraph"><p>This probably doesn&#8217;t run on Windows. That&#8217;s not a big issue, since we don&#8217;t
870 really want authorities to be running on Windows anyway.</p></div>
871 </div>
872 </div>
873 <div class="sect1">
874 <h2 id="_see_also">SEE ALSO</h2>
875 <div class="sectionbody">
876 <div class="paragraph"><p><strong>tor</strong>(1)<br /></p></div>
877 <div class="paragraph"><p>See also the "dir-spec.txt" file, distributed with Tor.</p></div>
878 </div>
879 </div>
880 <div class="sect1">
881 <h2 id="_authors">AUTHORS</h2>
882 <div class="sectionbody">
883 <div class="literalblock">
884 <div class="content">
885 <pre><code>Roger Dingledine &lt;arma@mit.edu&gt;, Nick Mathewson &lt;nickm@alum.mit.edu&gt;.</code></pre>
886 </div></div>
887 </div>
888 </div>
889 </div>
890 <div id="footnotes"><hr /></div>
891 <div id="footer">
892 <div id="footer-text">
893 Last updated 2014-06-18 15:11:45 EDT
894 </div>
895 </div>
896 </body>
897 </html>