Fedora Core 500の技
Valid XHTML 1.0!
正当なCSSです!

TOP > Linux > Fedoraの技 > 101-200 > 176

gpgで公開鍵に署名するには

公開鍵を使い署名を確認すると下記のように警告が出ます。"Good signature from "John Lennon"で署名は確認できましたが、その下では"not certified with a trusted signature"となっています。これはその公開鍵には信用できるという署名がないという意味です。

$ gpg --verify /tmp/hello_from_john.txt.asc
gpg: Signature made Wed 13 Apr 2005 10:09:12 AM JST using DSA key ID EC3934FC
gpg: Good signature from "John Lennon (Hello!) <john@fedora500.jp>"
gpg: checking the trustdb
gpg: checking at depth 0 signed=0 ot(-/q/n/m/f/u)=0/0/0/0/0/1
gpg: WARNING: This key is not certified with a trusted signature!
gpg:     There is no indication that the signature belongs to the owner.
Primary key fingerprint: 656A 649B 2CFA D7BC 3E09 5A06 E58D 7325 EC39 34FC

公開鍵が指紋の確認により本物であると確認できた場合は、公開鍵に"--sign-key"オプションで署名をします。通常は初期設定値のまま進めばいいでしょう。

$ gpg --sign-key John

署名後に"--verify"を実行すると警告が出なくなっていることが分かります。

$ gpg --verify /tmp/hello_from_john.txt.asc
gpg: Signature made Wed 13 Apr 2005 10:09:12 AM JST using DSA key ID EC3934FC
gpg: Good signature from "John Lennon (Hello!) <john@fedora500.jp>"
gpg: checking the trustdb
gpg: checking at depth 0 signed=1 ot(-/q/n/m/f/u)=0/0/0/0/0/1
gpg: checking at depth 1 signed=0 ot(-/q/n/m/f/u)=1/0/0/0/0/0

2005-12-03 作成