- PR -

proFTPDのサーバー証明書のパスワードについて

1
投稿者投稿内容
クール
会議室デビュー日: 2005/06/11
投稿数: 6
投稿日時: 2005-06-11 21:06
サーバー証明書(pem)のパスワードの指定がconfigにないのに、
なぜ、通信できるのか、どなたかご教授いただけますでしょうか。

実は、pure JAVAでFTPSを実装していまして、問題なく通信できています。
トレースを入れましたが、AUTH TLS〜ハンドシェイクは問題なくされていて、
暗号化も問題なくされています。
(ornosv でも、implicit/explicit 問題なく動作しています)

smartFTPクライアントでも、explicit SSLで問題なく通信できています。

実装を終えてから、なぜ通信できるのかとの疑問にぶち当たりました。
(TOMCATだと、server.xmlにパスワードの指定をしてるのに・・・・)

クライアント側で指定したパスワードが使われているのでしょうか?
(-Djavax.net.ssl.keyStorePassword=manager)

proFTPDはINETDモードで動作しています。

以上、ご教授をお願いできれば、幸いです。

=================================================
configを貼ります。

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName "ProFTPD Default Installation"
ServerType inetd
DefaultServer on

# Port 21 is the standard FTP port.
Port 21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances 30

# Set the user and group under which the server will run.
#User SYSTEM
#Group root

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite on

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>

LogFormat allinfo "%t : %u (%a [%h]) : [%s], %T, %m (%f)"
LogFormat write "%t : %u : %F (%a)"
LogFormat read "%t : %u : %F (%a)"
LogFormat auth "%t : %u (%a [%h])"

ExtendedLog /var/proftpd/all.log ALL allinfo
ExtendedLog /var/proftpd/write.log WRITE write
ExtendedLog /var/proftpd/read.log READ read
ExtendedLog /var/proftpd/auth.log AUTH auth

<IfModule mod_tls.c>
TLSEngine on
TLSLog /var/proftpd/tls.log
TLSProtocol SSLv23
TLSCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP

# Are clients required to use FTP over TLS when talking to this server?
TLSRequired on

TLSCACertificateFile /cygdrive/c/openssl/bin/demoCA/cacert.pem

# Server's certificate
TLSRSACertificateFile /cygdrive/c/openssl/bin/server.crt
TLSRSACertificateKeyFile /cygdrive/c/openssl/bin/server.key

# Authenticate clients that want to use FTP over TLS?
TLSVerifyClient on
</IfModule>

===========================================
念のため、TLSのLOGも貼っておきます。

Jun 11 18:21:37 mod_tls/2.0.7[2100]: SSL/TLS-P requested, starting TLS handshake
Jun 11 18:21:42 mod_tls/2.0.7[2100]: TLSv1/SSLv3 connection accepted, using cipher RC4-MD5 (128 bits)
Jun 11 18:21:42 mod_tls/2.0.7[2100]: Client: C = JP, ST = Hokkaido, L = Sapporo, O = WEUSER, OU = user, CN = usr, emailAddress = user@user.co.jp
Jun 11 18:21:43 mod_tls/2.0.7[2100]: starting TLS negotiation on data connection
Jun 11 18:21:46 mod_tls/2.0.7[2100]: TLSv1/SSLv3 data connection accepted, using cipher RC4-MD5 (128 bits)
ぽんす
ぬし
会議室デビュー日: 2003/05/21
投稿数: 1023
投稿日時: 2005-06-12 00:29
proFTPDがどうやってるかは知りませんが...
http://www.atmarkit.co.jp/fnetwork/rensai/cell05/ssl1.html
これでどうでしょ。
クール
会議室デビュー日: 2005/06/11
投稿数: 6
投稿日時: 2005-06-12 01:23
RES、恐れ入ります。

自分なりに、調べてみました。
言葉が足りなかったのですが、configで指定したトラスト・ストア
『/cygdrive/c/openssl/bin/demoCA/cacert.pem』をなぜproFTPDは読み込めるのかが
不思議でした。

遅れましたが、パスにあるようにcygwinでテストしたので、
ここの会議室でよかったのかどうか。。。。

このストア情報がない場合は、当然ですがクライアントから提示された証明書の認証者(issuer)がトラストでないと判断されて(自己認証のクライアント証明書)、proFTPDで当然拒絶されました。
===LOGです==
mod_tls/2.0.7[456]: error: cert issuer: C = JP, ST = Hokkaido, L = Sapporo, O = DIT, OU = DEV, CN = xxx, emailAddress = xxx@xxx.co.jp
============

ここからが、私の勘違いの部分で、お手数を掛けてしまった理由なのですが、、、、

パスワードが必要なのはCAのプライベートキーを必要とする場合で、
proFTPDの暗号複合化はサーバー証明書のプライベートキーで行うので、
CAのプライベートキーの指定がconfig上ないのも、当然でした。
申し訳ありません。<(_ _)>

又、件名がサーバー証明書のパスワードになってしまってますが、
正確には、トラスト・ストアのパスワードですよね。
お恥ずかしいかぎりです。

もう少し調べてから、みなさんのお知恵を借りるように致します。<(_ _)>
ぽんす
ぬし
会議室デビュー日: 2003/05/21
投稿数: 1023
投稿日時: 2005-06-12 02:24
なるほど、そういう話でしたか。
ぜんぜん見えてませんでした
1

スキルアップ/キャリアアップ(JOB@IT)