jdk/src/linux/doc/man/ja/jarsigner.1
author jjg
Tue, 11 Mar 2008 13:14:55 -0700
changeset 168 25697c18650b
parent 2 90ce3da70b43
child 2692 345bc8d65b19
permissions -rw-r--r--
6307187: clean up code for -Xlint:options Summary: introduce common code for handling one-of and any-of options Reviewed-by: mcimadamore
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
'\" t
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
.\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
.\" Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
.\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
.\" This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
.\" under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
.\" published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
.\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
.\" This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
.\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
.\" version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
.\" accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
.\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
.\" You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
.\" 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
.\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
.\" Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
.\" CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
.\" have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
.\" 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
.\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
.TH jarsigner 1 "2006 年 9 月 4 日" "Java SE 6" "ユーザーコマンド"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
.SH "名前"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
jarsigner \- JAR 署名および検証ツール
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
Java ARchive (JAR) ファイルの署名を生成し、署名付き JAR ファイルの署名を検証します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
.SH "形式"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
[ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
.BI options
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
]  
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
jar-file alias
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
.B jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
.BI \-verify
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
[
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
.BI options 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
jar-file 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
.SH "説明"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
.IX "JAR signing and verification tool " "" "JAR signing and verification tool  \(em \fLjarsigner\fP"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
.IX "jarsigner" "" "\fLjarsigner\fP \(em JAR signing and verification tool "
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
ツールは、次の 2 つの目的で使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
.TP 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
1. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
Java ARchive (JAR) ファイルに署名を付ける
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
.TP 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
2. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
署名付き JAR ファイルの署名と完全性を検証する
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
JAR 機能を使うと、クラスファイル、イメージ、サウンド、およびその他のデジタルデータ
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
を単一のファイルにパッケージ化できるので、ファイルを迅速かつ容易に配布できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
開発者は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
.B jar 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
という名前のツールを使って JAR ファイルを作成できます。技術的な観点から言えば、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
すべての ZIP ファイルも JAR ファイルとみなすことができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
「デジタル署名」は、なんらかのデータ (「署名」の対象となるデータ) と、エンティティ
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
(人、会社など) の非公開鍵とに基づいて計算されるビット列です。手書きの署名同様、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
デジタル署名には多くの利点があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
署名の生成に使われた非公開鍵と対になる公開鍵を使って計算を行うことで、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
デジタル署名が本物かどうかを検証できる
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
非公開鍵が他人に知られない限り、デジタル署名の偽造は不可能である
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
デジタル署名は、その署名が付いたデータだけを対象とするものであり、ほかのデータの
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
署名として機能することはない
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
署名付きのデータは変更できない。データが変更された場合は、その署名によってデータ
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
が本物ではないことが検証される
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
ファイルに対してエンティティの署名を生成するには、まず、そのエンティティが公開鍵と
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
非公開鍵のペアを持つ必要があります。また、公開鍵を認証する 1 つ以上の証明書も
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
必要です。「証明書」とは、あるエンティティからのデジタル署名付きの文書のことです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
証明書には、ほかのあるエンティティの公開鍵が特別な値を持っていることが書かれて
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
は、「キーストア」に含まれる鍵と証明書情報を使って、JAR ファイルのデジタル署名を
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
生成します。キーストアは、非公開鍵と、非公開鍵に関連付けられた X.509 証明連鎖が
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
収められたデータベースです。証明連鎖は、非公開鍵に対応する公開鍵を認証します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
キーストアの作成と管理には、
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
.B keytool
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
ユーティリティを使います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
は、エンティティの非公開鍵を使って署名を生成します。署名付き JAR ファイルには、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
キーストアからの証明書のコピーが含まれています。これは、JAR ファイルの署名に使わ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
れた非公開鍵に対応する公開鍵の証明書のコピーです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
は、署名付き JAR ファイルのデジタル署名を、ファイル内 (の署名ブロックファイル) に含
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
まれている証明書を使って検証することができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
J2SE 5.0 以降の \f3jarsigner\fP は、タイムスタンプを含む署名を生成できるようになりました。このため、システム/デプロイヤ (Java Plug\-in など) は、署名付きの証明書がまだ有効である期間中に JAR ファイルの署名が行われたかどうかを確認できます。さらに、そのタイムスタンプ情報をアプリケーションが取得するための API が、J2SE 5.0 で追加されました。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
現時点では、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
で署名できるのは、JDK の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
.B jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
ツールで作成された JAR ファイル、または ZIP ファイルだけです。JAR ファイルは ZIP ファイルと同じですが、JAR ファイルには
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
.B META-INF/MANIFEST.MF 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
ファイルが含まれている点が異なります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
.B META-INF/MANIFEST.MF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
ファイルは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
が ZIP ファイルに署名を付けるときに自動的に作成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
デフォルトでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
.B jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
は JAR ファイルに「署名」を付けます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
署名付き JAR ファイルを「検証」する場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
.I -verify 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
オプションを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
JDK 1.1 との互換性
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
.IX "jarsigner" "Compatibility with JDK 1.1" "\fLjarsigner\fP \(em JAR signing and verification tool "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
.B keytool
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
ツールと 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
ツールは、JDK 1.1 で提供されていた
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
.B javakey
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
ツールを完全に置き換えるものです。これらの新しいツールは
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
.B javakey
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
よりも多くの機能を備えており、キーストアと非公開鍵をパスワードで保護する機能や、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
署名の生成だけでなく署名を検証する機能を持っています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
新しいキーストアアーキテクチャは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
.B javakey 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
が作成して管理していたアイデンティティデータベースに代わるものです。キーストア形式と、JDK 1.1 の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
.B javakey 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
が使っていたデータベース形式との間には下位互換性はありません。ただし、次のような
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
ことは可能です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
.B keytool
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
.I -identitydb 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
コマンドを使うと、アイデンティティデータベースの情報をキーストアにインポートできます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
.B jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
は、以前に 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
.B javakey
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
を使って署名された JAR ファイルに署名を付けることができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
.B javakey
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
を使って署名された JAR ファイルを検証できます。したがって、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
.B jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
は、JDK 1.2 のキーストアではなく JDK 1.1 のアイデンティティデータベースからの署名者別
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
名を認識し、これらを対象に処理を行うことができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
.LP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
次の表は、JDK 1.1.x で署名された JAR ファイルが、Java 2 プラットフォームでどのように扱われるかを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
示しています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
                      1.1 データ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
         1.1 データ   ベースから   ポリシー
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
JAR      ベース内の   1.2 キース   ファイル      
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
ファイル   アイデン   トアにイン   がアイデン   与えられる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
のタイプ   ティティ   ポートされ   ティティ/    特権 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
                      る信頼でき   別名に特権  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
                      るアイデン   を与える
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
                      ティティ(4)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
署名付き                                         すべてのコードに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
JAR          x         x          x           与えられる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
                                                 デフォルトの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
                                                 特権
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
												   
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
署名のない                                       すべてのコードに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
JAR          x         x          x           与えられる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
                                                 デフォルトの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
                                                 特権
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
署名付き                                         すべてのコードに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
JAR          x         ○          x           与えられる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
                                                 デフォルトの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
                                                 特権
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
署名付き                                         すべてのコードに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
JAR          ○/信頼で  x          x           与えられる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
              きない                             デフォルトの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
                                                 特権 (3)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
署名付き                                         すべてのコードに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
JAR          ○/信頼で  x          ○           与えられる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
              きない                             デフォルトの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
                                                 特権 (1,3)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
署名付き                                         すべてのコードに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
JAR          x         ○          ○           与えられる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
                                                 デフォルトの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
                                                 特権とポリシー
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
                                                 ファイル内
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
                                                 で与えられる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
                                                 特権
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
												   
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
署名付き                                         すべてのコードに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
JAR          ○/信頼    ○          ○           与えられる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
              できる                             デフォルトの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
                                                 特権とポリシー
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
                                                 ファイル内
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
                                                 で与えられる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
                                                 特権 (2)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
署名付き                                         すべての
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
JAR          ○/信頼    x          x           特権
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
              できる 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
署名付き                                         すべての
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
JAR          ○/信頼    ○          x           特権 (1)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
              できる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
署名付き                                         すべての
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
JAR          ○/信頼    x          ○           特権 (1)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
              できる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
注:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
.TP 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
1. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
ポリシーファイル内にアイデンティティ/別名についての言及がある場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
それをキーストアにインポートして、ポリシーファイルの設定が与えられた
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
特権に反映されるようにする必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
.TP 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
2. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
ポリシーファイル/キーストアの組み合わせは、アイデンティティデータベース
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
内の信頼できるアイデンティティよりも優先されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
.TP 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
3. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
Java 2 プラットフォームでは、信頼できないアイデンティティは無視されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
.TP 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
4. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
JDK キーストアにインポートできるのは、信頼できるアイデンティティだけです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
キーストアの別名
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
.IX "jarsigner" "Keystore Aliases" "\fLjarsigner\fP \(em JAR signing and verification tool "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
キーストアのすべてのエントリは、一意の「別名」を介してアクセスされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
を使って JAR ファイルに署名を付けるときは、署名の生成に必要な非公開鍵を
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
含むキーストアエントリの別名を指定する必要があります。たとえば、次の例は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
working ディレクトリの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
.B mystore
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
という名前のキーストアに含まれる別名 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
.B duke 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
に関連付けられた非公開鍵を使って、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
.BR MyJARFile.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
という名前の JAR ファイルに署名を付けます。出力ファイルは指定されていない
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
ので、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
.BR MyJARFile.jar 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
は署名付きの JAR ファイルによって上書きされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
jarsigner -keystore /working/mystore -storepass 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
   myspass -keypass dukekeypasswd MyJARFile.jar duke
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
キーストアはパスワードで保護されているので、ストアのパスワード (上の例では 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
.BR myspass
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
) を指定する必要があります。コマンド行でストアのパスワードを指定しなかった場合は、パスワードの入力を求められます。同様に、非公開鍵もキーストア内でパスワードによって保護されているので、非公開鍵のパスワード (上の例では 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
.BR dukekeypasswd 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
) を指定する必要があります。コマンド行で非公開鍵のパスワードを指定しておらず、非公開鍵のパスワートがストアのパスワードと違っている場合は、非公開鍵のパスワードの入力を求められます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
キーストアの場所
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
.IX "jarsigner" "Keystore Location" "\fLjarsigner\fP \(em JAR signing and verification tool "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
には、使用するキーストアの名前と場所を指定する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
.I -keystore
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
オプションがあります。キーストアは、デフォルトではユーザのホームディレクトリの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
.I .keystore 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
という名前のファイルに格納されます。ユーザのホームディレクトリは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
.I user.home
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
システムプロパティによって決まります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
.I \-keystore 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
オプションからの入力ストリームは
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
.I KeyStore.load 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
メソッドに渡されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
URL として NONE  が指定された場合は、NULL ストリームが
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
.I KeyStore.load 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
メソッドに渡されます。キーストアがハードウェアトークンデバイス上にあるなど、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
ファイルベースでない場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
.I NONE 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
を指定してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
キーストアの実装
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
.IX "jarsigner" "Keystore Implementation" "\fLjarsigner\fP \(em JAR signing and verification tool "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
.I java.security 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
パッケージ内にある 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
.I KeyStore 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
クラス
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
では、キーストア内の情報にアクセスし、変更できるように
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
適切に定義されたインタフェースが提供されています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
このクラスは複数のさまざまな固定実装が可能で、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
それぞれの実装は、特定の種類のキーストア用の固定実装です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
現在、キーストアの実装を使用するものとして、keytool と 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
.BR  jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
の 2 つのコマンド行ツールと、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
.BR policytool 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
という名前の 1 つの GUI ベースのツールがあります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
.I KeyStore 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
クラスは public として使用可能なので、JDK ユーザは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
.B KeyStore
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
を使ってほかのセキュリティアプリケーションも作成できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
キーストアには、Sun が提供する組み込みのデフォルトの実装があります。これは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
JKS という名前の独自のキーストアタイプ (形式) を利用するもので、キーストアを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
ファイルとして実装しています。この実装では、個々の非公開鍵は個別のパスワード
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
によって保護され、キーストア全体の完全性も (非公開鍵とは別の) パスワードに
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
よって保護されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
キーストアの実装は、プロバイダベースです。具体的には、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
.I KeyStore
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
クラスが提供するアプリケーションインタフェースは、Service Provider Interface (SPI) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
という形で実装されています。つまり、対応する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
.I KeystoreSpi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
抽象クラス (これも 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
.I java.security
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
パッケージに含まれている) があり、このクラスが Service Provider Interface の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
メソッドを定義しています。これらのメソッドは、「プロバイダ」が実装しなければなりま
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
せん。ここで、「プロバイダ」とは、Java Security API によってアクセス可能なサービス
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
のサブセットに対し、その固定実装を提供するパッケージまたはパッケージの集合の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
ことです。したがって、キーストアの実装を提供するには、「Java 暗号化アーキテク
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
チャ用プロバイダの実装方法」(http://java.sun.com/javase/6/docs/technotes/guides/security/HowToImplAProvider.html) のページで説明しているように、クライアントがプロバイダを実装し、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
.I KeystoreSpi 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
サブクラスの実装を提供する必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
アプリケーションでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
.I KeyStore
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
クラスが提供する 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
.B getInstance
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
ファクトリメソッドを使うことで、さまざまなプロバイダから異なる「タイプ」のキーストアの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
実装を選択できます。キーストアのタイプは、キーストア情報の格納形式とデータ形式、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
およびキーストア内の非公開鍵とキーストア自体の完全性を保護するために使われる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
アルゴリズムを定義します。異なるタイプのキーストアの実装には、互いに互換性は
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
ありません。keytool、jarsigner、および policytool の各ツールは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
.B KeyStore
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
が提供する共通のアプリケーションインタフェースだけを使っているので、任意の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
タイプのキーストアで使用できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
.B keytool 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
は、ファイルベースのキーストア実装に対して機能します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
.B keytool 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
は、コマンド行で渡されたキーストアの位置をファイル名として扱い、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
.BR FileInputStream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
に変換して、そこからキーストア情報をロードします。一方、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
.B jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
ツールおよび 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
.B policytool
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
ツールは、URL を使って指定することが可能な任意の位置にあるキーストアを
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
読み取ることができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
.BR keytool
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
の場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
.I -storetype
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
オプションを使ってコマンド行でキーストアのタイプを指定できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
.BR policytool 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
の場合は、[Edit] メニューの [Change Keystore] コマンドを使ってキーストアの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
タイプを指定できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
キーストアのタイプを明示的に指定しない場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
.B keytool
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
.B jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
、および 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
.B policytool 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
の各ツールは、セキュリティプロパティファイル内で指定
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
された
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
.I keystore.type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
プロパティの値に基づいてキーストアの実装を選択します。セキュリティプロパティファ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
イルは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
.I java.security
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
という名前でセキュリティプロパティディレクトリ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
.I java.home/lib/security
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
に置かれています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
.I java.home
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
は、JDK の実行環境ディレクトリです。(SDK 内の jre ディレクトリ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
または Java Runtime Environment のトップレベルのディレクトリ)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
各ツールは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
.I keystore.type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
の値を取得し、この値で指定されたタイプのキーストアを実装しているプロバイダが
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
見つかるまで、現在インストールされているすべてのプロバイダを調べます。目的の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
プロバイダが見つかると、そのプロバイダからのキーストアの実装を使います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
.I KeyStore 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
クラスでは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
.I getDefaultType
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
という名前の static メソッドが定義されており、アプリケーションとアプレットはこの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
メソッドを使うことで 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
.I keystore.type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
プロパティの値を取得できます。次のコードは、デフォルトのキーストアタイプ (
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
.I keystore.type
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
プロパティで指定されたタイプ) のインスタンスを生成します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
    KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
デフォルトのキーストアタイプは jks (Sun が提供する独自のタイプのキーストアの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
実装) です。これは、セキュリティプロパティファイル内の次の行によって指定されて
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
います。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
.RS 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
.B keystore.type=jks
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
注: キーストアタイプの指定では、大文字と小文字は区別されません。たとえば、「JKS」と「jks」は同じものとみなされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
各ツールでデフォルト以外のキーストアの実装を使用するには、上の行を変更して
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
別のキーストアのタイプを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
たとえば、pkcs12 と呼ばれるタイプのキーストアの実装を提供している
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
プロバイダパッケージを使用するには、上の行を次のように変更します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
.B keystore.type=pkcs12
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
PKCS#11 プロバイダパッケージを使用する場合、その詳細については、「Java PKCS#11 Reference Guide」(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
http://java.sun.com/javase/6/docs/technotes/guides/security/p11guide.html#keytooljarsigner)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
にある
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
「\f2KeyTool and JarSigner\fP」節を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
サポートされるアルゴリズム
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
.IX "jarsigner" "Supported Algorithms and Key Sizes" "\fLjarsigner\fP \(em JAR signing and verification tool "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
デフォルトでは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
.B jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
は次のどちらかのアルゴリズムを使って JAR ファイルに署名します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
SHA-1 ダイジェストアルゴリズムを使った DSA (デジタル署名アルゴリズム)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
MD5 ダイジェストアルゴリズムを使った RSA アルゴリズム
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
具体的には、署名者の公開鍵と非公開鍵が DSA 鍵である場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
.B jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
は「SHA1withDSA」アルゴリズムを使って JAR ファイルに署名を付けようとします。署名者の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
鍵が RSA 鍵である場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
.B jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
は「MD5withRSA」アルゴリズムを使って JAR ファイルに署名を付けます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
これらのデフォルトの署名アルゴリズムは、\f2\-sigalg\fP オプションを使ってオーバーライドできます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
署名付き JAR ファイル
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
.IX "jarsigner" "The Signed JAR File" "\fLjarsigner\fP \(em JAR signing and verification tool "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
.B jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
を使って JAR ファイルに署名を付けた場合、出力される署名付き JAR ファイルは
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
入力 JAR ファイルと同じですが、次の 2 つの追加ファイルが
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
.B META-INF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
ディレクトリに置かれる点が異なります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
拡張子の付いた署名ファイル
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
.B .DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
拡張子の付いた署名ブロックファイル
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
これら 2 つのファイルのベースファイル名は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
.I -sigFile 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
オプションの値から作成されます。たとえば、次のようにオプションを指定したとします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
.B -sigFile MKSIGN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
この場合、ファイル名はそれぞれ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
.B MKSIGN.SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
.BR MKSIGN.DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
になります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
コマンド行に 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
.I -sigfile 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
オプションの指定がない場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
ファイルと 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
.B .DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
ファイルのベースファイル名は、コマンド行で指定された別名の先頭の 8 文字を
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
すべて大文字に変換したものになります。別名が 8 文字未満の場合は、別名が
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
そのまま使われます。別名の中に、署名ファイル名に使用できない文字が含まれ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
ている場合は、該当する文字を下線 (_) に置き換えてファイル名が作成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
使用できる文字は、アルファベット、数字、下線 (_)、ハイフンです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
署名 (\f3.SF\f1) ファイル
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
署名ファイル (
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
ファイル) は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
.B jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
ツールで生成された JAR ファイルに常に含まれるマニフェストファイルと似ています。つまり、マニフェストファイル同様、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
ファイルには、JAR ファイルに含まれているソースファイルごとに、次の 3 つの行があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
ファイル名
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
使われているダイジェストアルゴリズム (SHA) の名前
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
SHA ダイジェストの値
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
マニフェストファイルでは、SHA ダイジェストの値は、ソースファイルのバイナリデータ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
のダイジェスト (ハッシュ) です。一方、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
ファイルでは、ソースファイルのダイジェストの値は、マニフェストファイル中の該当する
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
ソースファイルに対応する 3 行のハッシュです。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
署名ファイルには、デフォルトでマニフェストファイル全体のハッシュも含まれています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
後述の「JAR ファイルの検証」で説明するように、このヘッダの存在によって検証の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
最適化が可能になっています。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
署名ブロック (\f3.DSA\f1) ファイル
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
ファイルには署名が付けられ、署名は 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
.B .DSA 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
ファイルに置かれます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
.B .DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
ファイルには、キーストアからの証明書または証明連鎖も符号化された形で含まれて
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
います。証明書または証明連鎖は、署名に使われた非公開鍵に対応する公開鍵を
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
認証します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
署名タイムスタンプ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
J2SE 5.0 リリースの 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
.I jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
ツールは、JAR ファイルの署名時に署名タイムスタンプを生成および格納できるようになりました。さらに、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
.I jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
は代替の署名機構もサポートします。この動作は省略可能で、署名時に次の各オプションによって制御されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
\f2\-tsa url\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
\f2\-tsacert alias\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
\f2\-altsigner class\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
\f2\-altsignerpath classpathlist\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
これらの各オプションの詳細については、後述の「オプション」節を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
JAR ファイルの検証
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
.IX "jarsigner" "JAR File Verification" "\fLjarsigner\fP \(em JAR signing and verification tool "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
JAR ファイルの検証が成功するのは、署名が有効であり、かつ署名の生成以後に 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
JAR ファイル内のどのファイルも変更されていない場合です。JAR ファイルの検証は、次の手順で行われます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
.TP 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
1. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
.B .SF 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
ファイルそれ自体の署名を検証します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
この手順では、各署名ブロック (
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
.B .DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
) ファイルに格納されている署名が、実際に、公開鍵に対応する非公開鍵を使って
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
生成されたものであることを確認します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
.B .DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
ファイルには、公開鍵の証明書も含まれています。また、この手順
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
では、目的の署名が、対応する署名 (
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
) ファイル内の有効な署名であるかどうかを調べ、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
.B .SF 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
ファイルが改変されていないことも確認します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
.TP 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
2. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
ファイル内の各エントリのダイジェストをマニフェスト内の対応する各セクションと突き
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
合わせて検証します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
ファイルには、マニフェストファイル全体のハッシュが格納されたヘッダがデフォルトで
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
含まれています。このヘッダが存在する場合は、ヘッダ内のハッシュが実際にマニフェ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
ストファイルのハッシュと一致するかどうかを検証することができます。ハッシュが一致す
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
る場合は、次の手順に進みます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
ハッシュが一致しない場合は、効率的には劣る方法を使って検証を行います。具体的
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
には、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
ファイル内の各ソースファイル情報セクションのハッシュが、マニフェストファイル内の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
対応するセクションのハッシュと一致するかどうかを確認します (「署名 (\f3.SF\f1) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
ファイル」を参照)。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
ファイルのヘッダに格納されたマニフェストファイルのハッシュと、実際のマニフェスト
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
ファイルのハッシュとが一致しない場合は、署名 (および 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
ファイル) の生成後に、ファイルに 1 つ以上のファイルが追加 (
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
.I jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
ツールを使用) された可能性があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   650
.I jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   651
ツールを使ってファイルを追加した場合、マニフェストファイルは変更されますが 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
(新しいファイル用のセクションが追加される)、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
ファイルは変更されません。この場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
ファイルのヘッダ以外のセクションに格納されたハッシュが、マニフェストファイル内の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
対応するセクションのハッシュと一致するときは、署名の生成時に JAR ファイル内に
90ce3da70b43 Initial load
duke
parents:
diff changeset
   658
存在していたファイルのうち、どのファイルも変更されていないことになり、検証は成功
90ce3da70b43 Initial load
duke
parents:
diff changeset
   659
したものとして扱われます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
.TP 5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
3. 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
JAR ファイル内のファイルのうち、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   664
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
ファイル内にエントリを持つ各ファイルを読み込みます。読み込み中にファイルの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   666
ダイジェストを計算し、結果をマニフェストセクション内の該当するファイルの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
ダイジェストと比較します。2 つのダイジェストは同じでなければならず、そうでない
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
場合は検証が失敗します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
検証プロセスの途中でなんらかの重大な検証エラーが発生した場合、検証プロセス
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
は中止され、セキュリティ例外がスローされます。スローされたセキュリティ例外は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
.BR jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
がキャッチして表示します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
1 つの JAR ファイルを対象とする複数の署名
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
.IX "jarsigner" "Multiple Signatures for a JAR File" "\fLjarsigner\fP \(em JAR signing and verification tool "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
1 つの JAR ファイルに対して 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
ツールを複数回実行し、実行のたびに、異なるユーザの別名を指定すれば、JAR 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
ファイルに複数のユーザの署名を付けることができます。たとえば、次のようにします。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
jarsigner myBundle.jar susan
90ce3da70b43 Initial load
duke
parents:
diff changeset
   688
jarsigner myBundle.jar kevin
90ce3da70b43 Initial load
duke
parents:
diff changeset
   689
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   690
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
JAR ファイルが複数回署名されている場合、その JAR ファイルには
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
ファイルと
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
.B .DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   696
ファイルの対が複数含まれることになります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   697
.B .SF 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   698
ファイルと
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
.B .DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
ファイルの対は、1 回の署名に対して 1 つ作成されます。したがって、上の例で出力
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
される JAR ファイルには、次の名前を持つファイルが含まれます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   704
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   705
SUSAN.SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
SUSAN.DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   707
KEVIN.SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   708
KEVIN.DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   710
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   711
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   712
注: JDK 1.1 の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   713
.B javakey 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   714
ツールで生成した署名と、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   715
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   716
で生成した署名というように、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   717
1 つの JAR ファイルに署名を混在させることができます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   718
つまり 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   719
.B javakey 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   720
ですでに以前署名した JAR ファイルに署名するために、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   721
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   722
を使用できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
.SH "オプション"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   725
以下では、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   726
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
のオプションについて説明します。オプションを指定するときは、次の点に注意
90ce3da70b43 Initial load
duke
parents:
diff changeset
   728
してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   729
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
どのオプション名にも先頭にマイナス記号 (-) が付く
90ce3da70b43 Initial load
duke
parents:
diff changeset
   732
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   733
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   734
オプションは任意の順序で指定できる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   735
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
イタリック体の項目の実際の値 (オプションの値) は、ユーザが指定する必要がある
90ce3da70b43 Initial load
duke
parents:
diff changeset
   738
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   739
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   740
.I -keystore、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
.I -storepass、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
.I -keypass、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
.I -sigfile、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   744
.I -sigalg、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   745
.I -digestalg、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
および 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
.I -signedjar 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
の各オプションを使用できるのは、JAR ファイルに署名を付ける場合だけである。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
これらのオプションは、JAR ファイルを検証する場合には使用できない。同様に、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   750
別名をコマンド行で指定するのは、JAR ファイルに署名を付ける場合だけである
90ce3da70b43 Initial load
duke
parents:
diff changeset
   751
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   752
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   753
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754
.B -keystore  url
90ce3da70b43 Initial load
duke
parents:
diff changeset
   755
キーストアの場所を示す URL を指定します。デフォルトは、ユーザのホームディレクト
90ce3da70b43 Initial load
duke
parents:
diff changeset
   756
リ内のファイル 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   757
.I .keystore 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   758
です。ユーザのホームディレクトリは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   759
.I user.home 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   760
システムプロパティによって決まります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   761
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   762
署名するときはキーストアが必要です。このため、デフォルトのキーストアが存在
90ce3da70b43 Initial load
duke
parents:
diff changeset
   763
しない場合、あるいはデフォルト以外のほかのキーストアを使用する場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   764
キーストアを明示的に指定する必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   765
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   766
検証するときはキーストアは必要ありません。ただし、キーストアが指定されているか、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   767
あるいはデフォルトのキーストアが存在していて、さらに 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   768
.I -verbose
90ce3da70b43 Initial load
duke
parents:
diff changeset
   769
オプションも指定されている場合は、JAR ファイルの検証に使われる証明書が
90ce3da70b43 Initial load
duke
parents:
diff changeset
   770
キーストアに存在するかどうかについての追加情報が出力されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   771
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   772
注: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   773
.I -keystore 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   774
の引数には、URL の代わりにファイル名 (とパス) を指定できます。ファイル名 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   775
(とパス) を指定した場合は、「file:」URL として扱われます。たとえば、次のように
90ce3da70b43 Initial load
duke
parents:
diff changeset
   776
指定できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   777
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   778
.B -keystore filePathAndName
90ce3da70b43 Initial load
duke
parents:
diff changeset
   779
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   780
これは、次の指定と同じものとして扱われます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   781
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   782
.B -keystore file:filePathAndName
90ce3da70b43 Initial load
duke
parents:
diff changeset
   783
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   784
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   785
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   786
JRE の \f2$JAVA_HOME/lib/security\fP ディレクトリに格納された \f2java.security\fP セキュリティプロパティファイル内で Sun PKCS#11 プロバイダが設定されている場合、keytool と jarsigner は PKCS#11 トークンに基づいて動作できます。次のオプションを指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   787
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   788
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   789
o \f2\-keystore NONE\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   790
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   791
o \f2\-storetype PKCS11\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   792
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   793
たとえば、次のコマンドは、設定された PKCS#11 トークンの内容を一覧表示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   794
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   795
90ce3da70b43 Initial load
duke
parents:
diff changeset
   796
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   797
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   798
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   799
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   800
   jarsigner \-keystore NONE \-storetype PKCS11 \-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
   801
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   802
  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   803
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   804
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   805
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   806
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   807
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   808
.B -storetype  storetype
90ce3da70b43 Initial load
duke
parents:
diff changeset
   809
インスタンスを生成するキーストアのタイプを指定します。デフォルトのキーストアの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   810
タイプは、セキュリティプロパティファイルで keystore.type プロパティの値として
90ce3da70b43 Initial load
duke
parents:
diff changeset
   811
指定されたタイプで、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   812
.I java.security.KeyStore
90ce3da70b43 Initial load
duke
parents:
diff changeset
   813
の static 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   814
.I getDefaultType 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   815
メソッドによって返されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   816
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   817
\f2\-storepass\fP オプションを使って PCKS#11 トークンの PIN を指定することも
90ce3da70b43 Initial load
duke
parents:
diff changeset
   818
できます。何も指定しなかった場合、keytool と jarsigner はユーザにトークン PIN の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   819
入力を求めます。トークンの認証パスが、専用の PIN パッドやバイオメトリックリーダの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   820
ような保護されたパスである場合、\f2\-protected\fP オプションを指定する必要があります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   821
この場合、パスワードオプションは指定できません。  
90ce3da70b43 Initial load
duke
parents:
diff changeset
   822
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   823
.B -storepass  password
90ce3da70b43 Initial load
duke
parents:
diff changeset
   824
キーストアにアクセスするのに必要なパスワードを指定します。このオプションが必要
90ce3da70b43 Initial load
duke
parents:
diff changeset
   825
なのは、JAR ファイルに署名を付けるときだけです (JAR ファイルを検証するときは
90ce3da70b43 Initial load
duke
parents:
diff changeset
   826
不要)。署名を付けるときに、コマンド行で 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   827
.I -storepass
90ce3da70b43 Initial load
duke
parents:
diff changeset
   828
オプションを指定しなかった場合は、パスワードの入力を求められます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   829
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   830
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   831
注: テストを目的とする場合、または安全が保障されたシステムで実行する場合
90ce3da70b43 Initial load
duke
parents:
diff changeset
   832
以外は、コマンド行やスクリプトでパスワードを指定しないでください。また、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   833
password プロンプトでパスワードを入力すると、入力したパスワードがエコーされ、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   834
そのまま画面に表示されます。このため、周囲にほかのユーザがいる場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   835
パスワードを見られないように注意してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   836
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   837
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   838
.B -keypass  password
90ce3da70b43 Initial load
duke
parents:
diff changeset
   839
コマンド行で指定された別名に対応するキーストアエントリの非公開鍵を保護するの
90ce3da70b43 Initial load
duke
parents:
diff changeset
   840
に使うパスワードを指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   841
.B jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   842
を使って JAR ファイルに署名を付けるときは、パスワードが必要です。コマンド行で
90ce3da70b43 Initial load
duke
parents:
diff changeset
   843
パスワードが指定されておらず、必要なパスワードがストアのパスワードと異なる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   844
場合は、パスワードの入力を求められます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   845
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   846
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   847
注: テストを目的とする場合、または安全であることがわかっているシステムで
90ce3da70b43 Initial load
duke
parents:
diff changeset
   848
実行する場合以外は、コマンド行やスクリプトでパスワードを指定しないでください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   849
また、password プロンプトでパスワードを入力すると、入力したパスワードがエコー
90ce3da70b43 Initial load
duke
parents:
diff changeset
   850
され、そのまま画面に表示されます。このため、周囲にほかのユーザがいる場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   851
パスワードを見られないように注意してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   852
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   853
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   854
.B -sigfile  file
90ce3da70b43 Initial load
duke
parents:
diff changeset
   855
SF ファイルと .DSA ファイルの生成に使うベースファイル名を指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   856
たとえば、file に DUKESIGN を指定すると、生成される .SF ファイルと 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   857
.DSA ファイルの名前は、それぞれ DUKESIGN.SF と DUKESIGN.DSA になります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   858
これらのファイルは、署名付き JAR ファイルの META-INF ディレクトリに置かれます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   859
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   860
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   861
.I file
90ce3da70b43 Initial load
duke
parents:
diff changeset
   862
に使用できる文字は「a-zA-Z0-9_-」です。つまり、文字、数字、下線、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   863
およびハイフンだけを使用できます。注: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   864
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   865
および 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   866
.B .DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   867
のファイル名では、小文字はすべて大文字に変換されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   868
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   869
コマンド行で 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   870
.I -sigfile 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   871
オプションを指定しなかった場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   872
.B .SF 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   873
ファイルと 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   874
.B .DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   875
ファイルのベースファイル名は、コマンド行で指定された別名の先頭の 8 文字を
90ce3da70b43 Initial load
duke
parents:
diff changeset
   876
すべて大文字に変換したものになります。別名が 8 文字未満の場合は、別名が
90ce3da70b43 Initial load
duke
parents:
diff changeset
   877
そのまま使われます。別名の中に、署名ファイル名に使用できない文字が含まれている
90ce3da70b43 Initial load
duke
parents:
diff changeset
   878
場合は、該当する文字を下線 (_) に置き換えてファイル名が作成されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   879
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   880
\-sigalg  algorithm 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   881
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   882
90ce3da70b43 Initial load
duke
parents:
diff changeset
   883
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   884
JAR ファイルの署名に使用する署名アルゴリズムの名前を指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   885
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   886
標準署名アルゴリズム名の一覧については、「Java Cryptography Architecture」( 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   887
http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#appa)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   888
にある
90ce3da70b43 Initial load
duke
parents:
diff changeset
   889
90ce3da70b43 Initial load
duke
parents:
diff changeset
   890
.I Appendix A
90ce3da70b43 Initial load
duke
parents:
diff changeset
   891
」を参照してください。このアルゴリズムは、JAR ファイルの署名に使用する秘密鍵と互換性のあるものでなければなりません。このオプションを指定しなかった場合、秘密鍵のタイプに応じて SHA1withDSA、MD5withRSA のいずれかが使用されます。指定されたアルゴリズムの実装を提供するプロバイダが静的にインストールされているか、あるいはユーザがそのようなプロバイダを 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   892
.I \-providerClass
90ce3da70b43 Initial load
duke
parents:
diff changeset
   893
オプションを使って指定する必要があります。そうでない場合、コマンドの実行が失敗します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   894
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   895
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   896
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   897
\-digestalg  algorithm 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   898
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   899
JAR ファイルのエントリをダイジェストする際に使用するメッセージダイジェストアルゴリズムの名前を指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   900
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   901
標準メッセージダイジェストアルゴリズム名の一覧については、「Java Cryptography Architecture」(http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#appa)の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   902
90ce3da70b43 Initial load
duke
parents:
diff changeset
   903
.I Appendix A
90ce3da70b43 Initial load
duke
parents:
diff changeset
   904
」を参照してください。このオプションを指定しなかった場合、SHA\-1 が使用されます。指定されたアルゴリズムの実装を提供するプロバイダが静的にインストールされているか、あるいはユーザがそのようなプロバイダを 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   905
.I \-providerClass
90ce3da70b43 Initial load
duke
parents:
diff changeset
   906
オプションを使って指定する必要があります。そうでない場合、コマンドの実行が失敗します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   907
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   908
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   909
.B -signedjar  file
90ce3da70b43 Initial load
duke
parents:
diff changeset
   910
署名付き JAR ファイルの名前を指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   911
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   912
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   913
コマンド行で名前を指定しなかった場合は、入力 JAR ファイル (署名の対象となる
90ce3da70b43 Initial load
duke
parents:
diff changeset
   914
JAR ファイル) の名前と同じ名前が使われます。この場合、入力 JAR ファイルは署名
90ce3da70b43 Initial load
duke
parents:
diff changeset
   915
付き JAR ファイルによって上書きされます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   916
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   917
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   918
.B -verify
90ce3da70b43 Initial load
duke
parents:
diff changeset
   919
コマンド行でこのオプションが指定されている場合は、指定された JAR ファイルが
90ce3da70b43 Initial load
duke
parents:
diff changeset
   920
検証されます。JAR ファイルへの署名は行われません。検証が成功すると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   921
「jar verified」というメッセージが表示されます。署名されていない JAR ファイル、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   922
またはサポートされていないアルゴリズム (RSA プロバイダがインストールされていない
90ce3da70b43 Initial load
duke
parents:
diff changeset
   923
場合の RSA など) を使って署名された JAR ファイルを検証しようとすると、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   924
「jar is unsigned. (signatures missing or not parsable)」というメッセージが表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   925
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   926
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   927
署名付き JAR ファイルは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   928
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   929
または JDK 1.1 の 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   930
.B javakey 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   931
ツール、あるいはその両方を使って検証できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   932
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   933
検証についての詳細は、「JAR ファイルの検証」を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   934
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   935
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   936
.B -certs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   937
コマンド行で、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   938
.I -verify
90ce3da70b43 Initial load
duke
parents:
diff changeset
   939
および
90ce3da70b43 Initial load
duke
parents:
diff changeset
   940
.I -verbose 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   941
オプションとともにこのオプションが指定されている場合は、JAR ファイルの各署名者
90ce3da70b43 Initial load
duke
parents:
diff changeset
   942
の証明書情報も出力されます。証明書情報には次のものが含まれます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   943
.RS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   944
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   945
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   946
署名者の公開鍵を証明する (
90ce3da70b43 Initial load
duke
parents:
diff changeset
   947
.B .DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   948
ファイルに格納された) 証明書の種類の名前
90ce3da70b43 Initial load
duke
parents:
diff changeset
   949
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   950
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   951
証明書が X.509 証明書 (具体的には 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   952
.I java.security.cert.X509Certificate 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   953
のインスタンス) である場合は、署名者の識別名
90ce3da70b43 Initial load
duke
parents:
diff changeset
   954
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   955
キーストアの確認も行われます。コマンド行でキーストアの値が指定されていない
90ce3da70b43 Initial load
duke
parents:
diff changeset
   956
場合、デフォルトのキーストアファイルがあれば、それが確認されます。署名者の
90ce3da70b43 Initial load
duke
parents:
diff changeset
   957
公開鍵の証明書がキーストア内のエントリと一致した場合は、次の情報も表示
90ce3da70b43 Initial load
duke
parents:
diff changeset
   958
されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   959
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   960
\(bu
90ce3da70b43 Initial load
duke
parents:
diff changeset
   961
署名者に該当するキーストアエントリの別名。この別名は括弧で囲まれます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   962
ただし、キーストアではなく JDK 1.1 のアイデンティティデータベースに由来する
90ce3da70b43 Initial load
duke
parents:
diff changeset
   963
署名者の場合は、括弧ではなく角括弧で囲まれます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   964
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   965
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   966
.B -verbose
90ce3da70b43 Initial load
duke
parents:
diff changeset
   967
コマンド行でこのオプションが指定されている場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   968
.B jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
   969
は「冗長」モードで動作し、JAR の署名または検証の進行状況に関する追加情報を出
90ce3da70b43 Initial load
duke
parents:
diff changeset
   970
力します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   971
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   972
.B -internalsf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   973
以前は、JAR ファイルの署名時に生成された 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   974
.B .DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   975
(署名ブロック) ファイルの中に、生成された 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   976
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   977
ファイル (署名ファイル) の完全なコピーが符号化された形で含まれていました。この
90ce3da70b43 Initial load
duke
parents:
diff changeset
   978
動作は変更になり、現在では、出力 JAR ファイル全体のサイズを小さくするために、
90ce3da70b43 Initial load
duke
parents:
diff changeset
   979
デフォルトでは
90ce3da70b43 Initial load
duke
parents:
diff changeset
   980
.B .SF 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   981
ファイルが 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   982
.B .DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   983
ファイルに含まれないようになっています。ただし、コマンド行で 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   984
.B -internalsf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   985
オプションを指定すると、以前と同じように動作します。このオプションは、テストを行う
90ce3da70b43 Initial load
duke
parents:
diff changeset
   986
場合には便利ですが、それ以外には使用しないでください。このオプションを使用する
90ce3da70b43 Initial load
duke
parents:
diff changeset
   987
と、有益な最適化が行われなくなります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   988
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   989
.B -sectionsonly
90ce3da70b43 Initial load
duke
parents:
diff changeset
   990
コマンド行でこのオプションが指定されている場合、JAR ファイルの署名時に生成される 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   991
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
   992
ファイル (署名ファイル) には、マニフェストファイル全体のハッシュを含むヘッダは追加されません。この場合、.SF ファイルに含まれるのは、JAR ファイル内の各ソースファイルに関する情報およびハッシュだけです。詳細は、「署名 (\f3.SF\f1) ファイル」を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
   993
.RS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   994
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   995
デフォルトでは、最適化を行うために、マニフェストファイル全体のハッシュを含むヘッダ
90ce3da70b43 Initial load
duke
parents:
diff changeset
   996
が追加されます。ヘッダが存在する場合は、JAR ファイルの検証時に、まずヘッダ内
90ce3da70b43 Initial load
duke
parents:
diff changeset
   997
のハッシュが、マニフェストファイル全体のハッシュと実際に一致するかどうかが確認
90ce3da70b43 Initial load
duke
parents:
diff changeset
   998
されます。ハッシュが一致する場合、検証は次の手順に進みます。ハッシュが一致
90ce3da70b43 Initial load
duke
parents:
diff changeset
   999
しない場合は、効率的には劣る方法を使って検証を行います。具体的には、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1000
.B .SF 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1001
ファイル内の各ソースファイル情報セクションのハッシュが、マニフェストファイル内の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1002
対応するセクションのハッシュと一致するかどうかを確認します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1003
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1004
詳細は、「JAR ファイルの検証」を参照してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1005
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1006
このオプションは、テストを行う場合には便利ですが、それ以外には使用しないで
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1007
ください。このオプションを使用すると、有益な最適化が行われなくなります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1008
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1009
.B -protected
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1010
\f2true\fP、\f2false\fP のいずれか。専用 PIN リーダなどの保護された認証パスを介してパスワードを指定する必要がある場合には、この値に \f2true\fP を指定してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1011
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1012
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1013
.B \-provider  provider_class_name
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1014
サービスプロバイダがセキュリティプロパティファイル (\f2java.security\fP) のリストに
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1015
入っていないときに、暗号化サービスプロバイダのマスタークラスファイルの
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1016
名前を指定します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1017
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1018
\f2\-providerArg\fP \f2ConfigFilePath\fP オプションと組み合わせて使用します。keytool と jarsigner はプロバイダを動的にインストールします (ここで、\f2ConfigFilePath\fP はトークン設定ファイルへのパスです)。セキュリティプロパティファイル内で Sun PKCS#11 プロバイダが設定されていない場合に PKCS#11 キーストアを一覧表示するコマンドの例を次に示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1019
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1020
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1021
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1022
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1023
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1024
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1025
jarsigner \-keystore NONE \-storetype PKCS11 \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1026
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1027
          \-providerClass sun.security.pkcs11.SunPKCS11 \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1028
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1029
          \-providerArg /foo/bar/token.config \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1030
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1031
          \-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1032
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1033
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1034
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1035
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1036
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1037
.B \-providerName providerName 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1038
\f2java.security\fP セキュリティプロパティファイル内で 2 つ以上のプロバイダが設定されている場合、\f2\-providerName\fP オプションを使って特定のプロバイダインスタンスを選択できます。このオプションの引数は、プロバイダの名前になります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1039
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1040
Sun PKCS#11 プロバイダの場合、\f2providerName\fP は \f2SunPKCS11\-\fP\f2TokenName\fP の形式になります。ここで、\f2TokenName\fP は、プロバイダインスタンスの設定時に使用した名前のサフィックスです。詳細については、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1041
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1042
http://java.sun.com/javase/6/docs/technotes/guides/security/p11guide.html#KeyToolJarSigner#ATTRS
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1043
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1044
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1045
「\f2configuration attributes table\fP」を参照してください。たとえば、次のコマンドは、名前サフィックス \f2SmartCard\fP を持つ PKCS#11 キーストアプロバイダインスタンスの内容を一覧表示します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1046
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1047
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1048
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1049
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1050
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1051
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1052
jarsigner \-keystore NONE \-storetype PKCS11 \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1053
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1054
        \-providerName SunPKCS11\-SmartCard \\
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1055
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1056
        \-list
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1057
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1058
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1059
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1060
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1061
.TP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1062
.B \-Jjavaoption
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1063
指定した 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1064
.I javaoption 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1065
文字列を直接実行時システムに渡します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1066
\f3jarsigner\f1 は、実際には Java インタプリタに対する「ラッパー」です。このオプションには、空白を含めることはできません。このオプションは、実行環境またはメモリ使用を調整する場合に便利です。指定できるフラグを一覧表示するには、コマンド行で 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1067
.I java -h
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1068
または 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1069
.I java -X 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1070
と入力してください。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1071
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1072
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1073
\-tsa url 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1074
JAR ファイル署名時にコマンド行に\f2「-tsa http://example.tsa.url」\fPと入力した場合、署名のタイムスタンプが生成されます。\f2http://example.tsa.url\fP という URL が、TSA (Time Stamping Authority) の場所を特定します。これは、\f2\-tsacert\fP オプション経由で見つかったどの URL よりも優先されます。\f2\-tsa\fP オプションを使用する場合、TSA の公開鍵証明書がキーストア内に存在している必要はありません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1075
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1076
タイムスタンプを生成するために、\f2jarsigner\fP は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1077
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1078
http://www.ietf.org/rfc/rfc3161.txt
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1079
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1080
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1081
「\f2RFC 3161\fP」で規定された TSP (Time\-Stamp Protocol) を使って TSA と通信します。成功すると、TSA から返されたタイムスタンプトークンが、署名とともに署名ブロックファイル内に格納されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1082
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1083
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1084
\-tsacert alias 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1085
JAR ファイル署名時にコマンド行に\f2「-tsacert alias」\fPと表示された場合、署名のタイムスタンプが生成されます。\f2alias\fP は、キーストア内で現在有効になっている TSA の公開鍵証明書を特定します。そのエントリの証明書内で、TSA の場所を特定する URL を含む Subject Information Access 拡張が検索されます。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1086
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1087
\f2\-tsacert\fP を使用する場合、TSA の公開鍵証明書がキーストア内に存在している必要があります。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1088
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1089
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1090
\-altsigner class 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1091
使用する代替署名機構を指定します。この完全修飾クラス名は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1092
.I com.sun.jarsigner.ContentSigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1093
抽象クラスを拡張するクラスファイルを特定します。このクラスファイルへのパスは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1094
.I \-altsignerpath
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1095
オプションを使って定義します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1096
.I \-altsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1097
オプションが指定された場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1098
.I jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1099
はその指定されたクラスが提供する署名機構を使用します。それ以外の場合、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1100
.I jarsigner
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1101
はデフォルトの署名機構を使用します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1102
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1103
たとえば、\f2com.sun.sun.jarsigner.AuthSigner\fP という名前のクラスが提供する署名機構を使用するには、\f2jarsigner\fP オプション\f2「-altsigner com.sun.jarsigner.AuthSigner」\fPを使用します。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1104
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1105
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1106
\-altsignerpath classpathlist 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1107
クラスファイル (このクラスファイル名は前述の \f2\-altsigner\fP オプションを使って指定) へのパスと、そのクラスが依存するすべての JAR ファイルへのパスを指定します。そのクラスファイルが JAR ファイル内に存在している場合には、次の例で示すように、その JAR ファイルへのパスを指定します。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1108
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1109
絶対パス、現在のディレクトリに対する相対パスのいずれかを指定できます。複数のパスまたは JAR ファイルを \f2classpathlist\fP に含める場合には、Solaris 上ではコロン (\f2:\fP)、Windows 上ではセミコロン (\f2;\fP) をそれぞれ使ってエントリを区切ってください。このクラスがすでに検索パスに含まれている場合、このオプションを指定する必要はありません。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1110
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1111
クラスファイルを含む JAR ファイルへのパスを指定する例: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1112
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1113
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1114
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1115
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1116
\f2\-altsignerpath /home/user/lib/authsigner.jar\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1117
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1118
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1119
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1120
JAR ファイル名が含まれている点に注意してください。 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1121
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1122
クラスファイルを含む JAR ファイルへのパスを指定する例: 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1123
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1124
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1125
\f2\-altsignerpath /home/user/classes/com/sun/tools/jarsigner/\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1126
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1127
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1128
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1129
JAR ファイル名が含まれていない点に注意してください。  
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1130
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1131
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1132
.SH "例"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1133
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1134
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1135
JAR ファイルの署名
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1136
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1137
.IX "jarsigner" "Signing a JAR File" "\fLjarsigner\fP \(em JAR signing and verification tool "
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1138
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1139
.B bundle.jar 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1140
という名前の JAR ファイルがあり、このファイルに、キーストアの別名が jane であるユーザの非公開鍵を使って、署名を付けるとします。キーストアは、mystore という名前で working ディレクトリにあり、キーストアのパスワードは mypass、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1141
.I jane 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1142
の非公開鍵のパスワードは j638klm とします。この場合、次のコマンドを実行すると、JAR ファイルに署名を付けて sbundle.jar という署名付き JAR ファイルを作成できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1143
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1144
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1145
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1146
jarsigner \-keystore "/working/mystore" \-storepass myspass
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1147
   -keypass j638klm -signedjar sbundle.jar bundle.jar jane
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1148
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1149
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1150
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1151
上のコマンドでは 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1152
.I \-sigfile
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1153
オプションが指定されていないので、署名付き JAR ファイルに格納される 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1154
.B .SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1155
ファイルと 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1156
.B .DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1157
ファイルの名前は、別名に基づくデフォルトの名前になり、それぞれ 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1158
.I JANE.SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1159
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1160
.I JANE.DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1161
になります。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1162
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1163
ストアのパスワードと非公開鍵のパスワードをあとで入力する場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1164
上のコマンドを短縮して次のように入力できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1165
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1166
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1167
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1168
jarsigner \-keystore /working/mystore
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1169
   -signedjar sbundle.jar bundle.jar jane
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1170
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1171
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1172
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1173
デフォルトのキーストア (ホームディレクトリ内の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1174
.B .keystore
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1175
という名前のキーストア) を使用する場合は、次に示すように、キーストアの指定を
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1176
省略できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1177
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1178
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1179
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1180
jarsigner \-signedjar sbundle.jar bundle.jar jane
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1181
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1182
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1183
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1184
また、署名付き JAR ファイルで入力 JAR ファイル (
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1185
.I bundle.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1186
) を上書きする場合は、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1187
.I -signedjar
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1188
オプションの指定も省略できます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1189
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1190
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1191
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1192
jarsigner bundle.jar jane
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1193
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1194
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1195
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1196
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1197
署名付き JAR ファイルの検証
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1198
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1199
.IX "jarsigner" "Verifying a Signed JAR File" "\fLjarsigner\fP \(em JAR signing and verification tool "
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1200
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1201
次に示すのは、署名付き JAR ファイルを検証し、署名が有効で JAR ファイルが
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1202
改変されていないことを確認するためのコマンド例です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1203
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1204
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1205
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1206
jarsigner \-verify sbundle.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1207
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1208
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1209
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1210
検証が成功すると、次のようなメッセージが表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1211
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1212
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1213
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1214
jar verified.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1215
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1216
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1217
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1218
検証が成功しなかった場合は、エラーメッセージが表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1219
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1220
.I -verbose
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1221
オプションを使うと、より多くの情報が表示されます。次に示すのは、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1222
.I -verbose 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1223
オプションを指定した 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1224
.B jarsigner 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1225
の実行例とその出力結果です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1226
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1227
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1228
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1229
jarsigner -verify -verbose sbundle.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1230
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1231
             198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1232
             199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1233
            1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1234
      smk   2752 Fri Sep 26 16:12:30 PDT 1997 AclEx.class
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1235
      smk    849 Fri Sep 26 16:12:46 PDT 1997 test.class
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1236
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1237
        s = signature was verified
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1238
        m = entry is listed in manifest
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1239
        k = at least one certificate was found in keystore
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1240
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1241
      jar verified.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1242
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1243
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1244
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1245
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1246
証明書情報を使った検証
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1247
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1248
.IX "jarsigner" "Verification with Certificate Information" "\fLjarsigner\fP \(em JAR signing and verification tool "
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1249
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1250
検証時に、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1251
.I -verify 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1252
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1253
.I -verbose 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1254
オプションに加えて 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1255
.I -certs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1256
オプションを指定した場合は、JAR ファイル内の各署名者の証明書情報も出力されま
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1257
す。これには、証明書のタイプ、署名者の識別名情報 (X.509 証明書の場合)、および、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1258
JAR ファイルの公開鍵の証明書がキーストアエントリの公開鍵の証明書と一致する場合
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1259
には、括弧で囲まれた署名者のキーストア別名が含まれます。たとえば、次のように
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1260
出力されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1261
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1262
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1263
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1264
 jarsigner -keystore /working/mystore -verify -verbose -certs myTest.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1265
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1266
      198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1267
      199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1268
     1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1269
      208 Fri Sep 26 16:23:30 PDT 1997 META-INF/JAVATEST.SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1270
     1087 Fri Sep 26 16:23:30 PDT 1997 META-INF/JAVATEST.DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1271
smk  2752 Fri Sep 26 16:12:30 PDT 1997 Tst.class
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1272
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1273
 X.509, CN=Test Group, OU=Java Software, O=Sun Microsystems, L=CUP, S=CA, C=US (javatest)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1274
 X.509, CN=Jane Smith, OU=Java Software, O=Sun, L=cup, S=ca, C=us (jane)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1275
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1276
 s = signature was verified
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1277
 m = entry is listed in manifest
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1278
 k = at least one certificate was found in keystore
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1279
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1280
jar verified.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1281
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1282
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1283
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1284
署名者の証明書が X.509 証明書でない場合は、識別名情報は表示されず、証明書の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1285
タイプと別名だけが表示されます。たとえば、証明書が PGP 証明書で、別名が bob の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1286
場合は、次のように表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1287
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1288
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1289
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1290
PGP, (bob)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1291
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1292
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1293
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1294
.SS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1295
アイデンティティデータベース署名者を含む JAR ファイルの検証
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1296
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1297
.IX "jarsigner" "Verification of a JAR File" "\fLjarsigner\fP \(em JAR signing and verification tool "
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1298
JAR ファイルが、JDK 1.1 の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1299
.B javakey
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1300
ツールを使って署名されている場合、署名者はアイデンティティデータベース内の
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1301
別名です。この場合、検証の出力には i という記号が含まれます。JAR ファイルが、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1302
アイデンティティデータベース内の別名とキーストア内の別名の両方によって署名
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1303
されている場合は、k と i の両方が表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1304
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1305
.I -certs
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1306
オプションを指定した場合、キーストアの別名は括弧で囲まれるのに対し、アイデンティ
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1307
ティデータベース内の別名は角括弧で囲まれて表示されます。たとえば、次のように
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1308
表示されます。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1309
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1310
.ft 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1311
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1312
jarsigner \-keystore /working/mystore \-verify \-verbose \-certs writeFile.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1313
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1314
      198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1315
      199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1316
     1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1317
      199 Fri Sep 27 12:22:30 PDT 1997 META-INF/DUKE.SF
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1318
     1013 Fri Sep 27 12:22:30 PDT 1997 META-INF/DUKE.DSA
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1319
smki 2752 Fri Sep 26 16:12:30 PDT 1997 writeFile.html
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1320
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1321
 X.509, CN=Jane Smith, OU=Java Software, O=Sun, L=cup, S=ca, C=us (jane)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1322
 X.509, CN=Duke, OU=Java Software, O=Sun, L=cup, S=ca, C=us [duke]
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1323
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1324
 s = signature was verified
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1325
 m = entry is listed in manifest
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1326
 k = at least one certificate was found in keystore
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1327
 i = at least one certificate was found in identity scope
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1328
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1329
jar verified.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1330
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1331
.ft 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1332
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1333
別名 duke は角括弧で囲まれているので、この別名はキーストアの別名ではなく、
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1334
アイデンティティデータベースの別名です。
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1335
.SH "関連項目"
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1336
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1337
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1338
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1339
.RS 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1340
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1341
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1342
jar ツールのドキュメント 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1343
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1344
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1345
keytool ツールのドキュメント 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1346
.TP 2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1347
o
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1348
\f3jarsigner\fP ツールの使用例については、「Java Tutorial」
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1349
(http://java.sun.com/docs/books/tutorial/trailmap.html)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1350
の「Security」( http://java.sun.com/docs/books/tutorial/security1.2/index.html) 
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1351
を参照
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1352
.na
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1353
.RE
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1354
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1355
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1356
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1357
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1358