Let's also include aclocal.m4
[asterisk-bristuff.git] / contrib / scripts / astgenkey.8
blob328a4d2596bace9374112c74acdde57aaa94c981
1 .\" $Header$
2 .\"
3 .\"     transcript compatibility for postscript use.
4 .\"
5 .\"     synopsis:  .P! <file.ps>
6 .\"
7 .de P!
8 .fl
9 \!!1 setgray
10 .fl
11 \\&.\"
12 .fl
13 \!!0 setgray
14 .fl                     \" force out current output buffer
15 \!!save /psv exch def currentpoint translate 0 0 moveto
16 \!!/showpage{}def
17 .fl                     \" prolog
18 .sy sed \-e 's/^/!/' \\$1\" bring in postscript file
19 \!!psv restore
21 .de pF
22 .ie     \a\\*(f1\a\a .ds f1 \\n(.f
23 .el .ie \a\\*(f2\a\a .ds f2 \\n(.f
24 .el .ie \a\\*(f3\a\a .ds f3 \\n(.f
25 .el .ie \a\\*(f4\a\a .ds f4 \\n(.f
26 .el .tm ? font overflow
27 .ft \\$1
29 .de fP
30 .ie     !\a\\*(f4\a\a \{\
31 .       ft \\*(f4
32 .       ds f4\"
33 '       br \}
34 .el .ie !\a\\*(f3\a\a \{\
35 .       ft \\*(f3
36 .       ds f3\"
37 '       br \}
38 .el .ie !\a\\*(f2\a\a \{\
39 .       ft \\*(f2
40 .       ds f2\"
41 '       br \}
42 .el .ie !\a\\*(f1\a\a \{\
43 .       ft \\*(f1
44 .       ds f1\"
45 '       br \}
46 .el .tm ? font underflow
48 .ds f1\"
49 .ds f2\"
50 .ds f3\"
51 .ds f4\"
52 '\" t 
53 .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n  
54 .TH ASTGENKEY 8 "May 14th, 2005" "Asterisk" "Linux Programmer's Manual"
55 .SH NAME
56 .B astgenkey
57 -- generates keys for for Asterisk IAX2 RSA authentication
58 .SH SYNOPSIS
59 .PP 
60 .B astgenkey
61 [ -q ] [ -n ] [ \fIkeyname\fP ]
63 .SH DESCRIPTION
64 .B astgenkey 
65 This script generates an RSA private and public key pair in PEM format 
66 for use by Asterisk.  The private key should be kept a secret, as it can 
67 be used to fake your system's identity.  Thus by default (without the 
68 option 
69 .I -n
70 ) the script will create a passphrase-encrypted copy of your secret key: 
71 without entering the passphrase you won't be able to use it. 
73 However if you want to use such a key with Asterisk, you'll have to start 
74 it interactively, because the scripts that start asterisk can't use that
75 encrypted key.
77 The key is identified by a name. If you don't write the name on the 
78 command-line you'll be prompted for one. The outputs of the script are:
80 .I name\fB.pub
81 .RS
82 The public key: not secret. Send this to the other side.
83 .RE
85 .I name\fB.key
86 .RS
87 The private key: secret.
88 .RE
90 Those files should be copied to 
91 .I /var/lib/asterisk/keys
93 (The private key: on your system. The public key: on other systems)
95 To see the currently-installed keys from the asterisk CLI, use the command
97 .RS
98 show keys
99 .RE
101 .SH OPTIONS
102 .B -q
104 Run quietly.
107 .B -n
109 Don't encrypt the private key.
112 .SH SECURITY
113 The keys are created, using the umask of the user running the command.
114 To create the keys in a secure manner, you should check to ensure that
115 your umask is first set to disallow the private key from being world-
116 readable, such as with the following commands:
118 .I umask 0066
120 .I astgenkey yourkey
122 And then make the key accessible to Asterisk (assuming you run it as
123 user "asterisk").
125   chown asterisk /var/lib/asterisk/keys/yourname.*
127 .SH FILES
128 .I /var/lib/asterisk/keys
132 .SH "SEE ALSO" 
133 asterisk(8), genrsa(1), rsa(1), 
135 http://www.voip-info.org/wiki-Asterisk+iax+rsa+auth
137 .SH "AUTHOR" 
138 This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com> 
139 Permission is granted to copy, distribute and/or modify this document under 
140 the terms of the GNU General Public License, Version 2 any  
141 later version published by the Free Software Foundation. 
143 On Debian systems, the complete text of the GNU General Public 
144 License can be found in /usr/share/common-licenses/GPL.