.\"# @(#)COPYRIGHT 1.1a (NRL) 17 August 1995 .\" .\"COPYRIGHT NOTICE .\" .\"All of the documentation and software included in this software .\"distribution from the US Naval Research Laboratory (NRL) are .\"copyrighted by their respective developers. .\" .\"This software and documentation were developed at NRL by various .\"people. Those developers have each copyrighted the portions that they .\"developed at NRL and have assigned All Rights for those portions to .\"NRL. Outside the USA, NRL also has copyright on the software .\"developed at NRL. The affected files all contain specific copyright .\"notices and those notices must be retained in any derived work. .\" .\"NRL LICENSE .\" .\"NRL grants permission for redistribution and use in source and binary .\"forms, with or without modification, of the software and documentation .\"created at NRL provided that the following conditions are met: .\" .\"1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\"2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\"3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" .\" This product includes software developed at the Information .\" Technology Division, US Naval Research Laboratory. .\" .\"4. Neither the name of the NRL nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\"THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS .\"IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED .\"TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A .\"PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NRL OR .\"CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, .\"EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, .\"PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR .\"PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF .\"LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING .\"NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS .\"SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\"The views and conclusions contained in the software and documentation .\"are those of the authors and should not be interpreted as representing .\"official policies, either expressed or implied, of the US Naval .\"Research Laboratory (NRL). .\" .\"----------------------------------------------------------------------*/ .\" .\" $ANA: keyadmin.8,v 1.3 1996/06/13 20:15:57 wollman Exp $ .\" jpman %Id: keyadmin.8,v 1.2 1997/06/14 16:08:59 horikawa Stab % .\" .Dd June 13, 1996 .Dt KEY 8 .Os .Sh 名称 .Nm keyadmin .Nd カーネルのキー管理データベースを手動管理する .Sh 書式 .Nm keyadmin .Op Ar command Op Ar args .Sh 解説 .Nm コマンドは、セキュリティの関係を カーネルのキー/セキュリティ関係データベースに 手動で組み込むために使用します。( .Xr key 4 参照)。 .Pp .Xr key 4 の API のほとんどは .Nm keyadmin を実行することにより特権ユーザが使用可能です。 自動化されたキー管理プロトコルが実装されるまでは、 .Nm だけがセキュリティ関係を確立する方法でした。 自動化されたキー管理プロトコルでは、 .Xr routed 8 や .Xr gated 8 がルーティングテーブルを管理するのと似た方法でキーデータベースを管理します。 .Pp .Nm を引数無しで起動すると、対話モードとなり、ユーザは .Dq Ar command Op Ar args を対話的に入力可能です。 引数を付けた場合は、 .Nm に単一の .Dq Ar command Op Ar args を入力することになります。 .Ar command は以下のいずれかです: .Bl -inset .It Nm del Ar type spi source destination .Pp .Ar source と .Ar destination との間で、 .Ar type と .Ar spi であるセキュリティの関係を削除します。 使用例: .Bd -literal delete esp 90125 anderson.yes.org rabin.yes.org .Ed .It Nm get Ar type spi source destination .Pp .Ar source と .Ar destination との間で、 .Ar type と .Ar spi であるセキュリティの関係を取り出して表示します。 使用例: .Bd -literal get ah 5150 eddie.vanhalen.com alex.vanhalen.com .Ed .It Nm dump .Pp セキュリティの関係を全て表示します。 警告: 大量のデータを表示します。 .It Nm load Ar filename .Pp セキュリティの関係を .Xr keys 5 に記載されたフォーマットのファイルからロードします。 .Ar filename に .Dq - を指定した場合、標準入力からキーを読みます。 .It Nm save Ar filename .Pp セキュリティの関係を .Xr keys 5 に記載されたフォーマットのファイルにセーブします。 .Ar filename に .Dq - を指定した場合、標準出力にキーファイルを出力します。 (軽い .Nm dump コマンドとして使用できます。) 注: save コマンドは新規ファイルを作成しなければなりません; 既存のファイルには書き込みません。 誰でも読めるファイルや名前付きパイプや UNIX ソケットに書き込むことを避ける ためです( .Xr socket 2 と .Xr mkfifo 1 を参照)。 .It Nm help Op command .Pp 引数無しでは短いヘルプを表示します。 または指定したコマンドのヘルプを表示します。 .It Nm flush .Pp カーネル内のセキュリティの関係の表を全て消去します。 .El .Pp 以下の .Ar command は .Nm を対話モードで使用した場合のみ使用可能です: .Bl -inset .It Nm add Ar type spi source destination transform key .Op Ar iv .Pp .Ar type かつ .Ar spi の、 .Ar source から .Ar destination への、 .Ar transform を使った .Ar key のセキュリティの関係を追加します。 transform が初期化ベクタを要求する場合、 .Ar iv にて指定します。 このコマンドは対話モードでのみ使用可能です。 .Nm は引数ベクタの使用後に破壊しないからです。 コマンドラインから入力で .Nm add を許すと、悪意有るユーザが .Xr ps 1 を使ってセキュリティキーを知り得てしまいます。 使用例: .Bd -literal add esp 2112 temples.syrinx.org priests.syrinx.org des-cbc \\ a652a476a652a476 87ac9876deac9876 .Ed .It Nm exit .It Nm quit .Pp .Nm keyadmin との対話を終了します。 EOF も同様に .Nm keyadmin との対話を終了します。 .El .Sh 関連項目 .Xr ipsec 4 , .Xr key 4 , .Xr route 4 , .Xr gated 8 , .Xr routed 8 .Sh 歴史 .Nm コマンドは NRL の .Bx 4.4 IPv6 networking distribution から登場しました。 .Nm keyadmin は Dan McDonald の空想から生を受け、 Ran Atkinson, Dan McDonald, Craig Metz, Bao Phan の 非常な努力により誕生しました。 NRL では元もと .Nm key と呼ばれていましたが、 .Xr key 1 と衝突しますので、 .Nm keyadmin と改称しました。 .Sh バグ 名前参照を避けるために、 .Xr route 8 のように -n フラグが必要です。 .Pp 現在は、dump と save コマンドは最初の 30 エントリほどを表示します。