質問者
CLickOnceにおける、SSL配布および通信について

質問
-
お世話になっております。
ClickOnceの配布について、質問させてください。
※前レスがないことは確認しましたが…もし重複がありましたら、ご容赦ください。
また、表現や言葉の間違い等あるかもしれませんが、ご容赦ください。
現在ClickOnceでのC#Formアプリケーション配布について、以下の通り困っています。
■APサーバ上に配置した、CLickOnce配布モジュール(~.application)にhttpsでアクセスした場合、ダウンロードできない
※ClickOnceの配布およびサーバアクセスはhttpsで実現したいと思っております。
※以下ログが出力されます。
-------------------------------------------------------------------------------------------------------------
プラットフォームのバージョン情報
Windows : 5.1.2600.196608 (Win32NT)
Common Language Runtime : 4.0.30319.1
System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
ソース
配置の URL : https://192.168.1.1/test/clickonce.application?userId=aaa
エラーの概要
以下はエラーの概要です。これらのエラーの詳細はログに一覧表示されています。
* https://192.168.1.1/test/clickonce.application?userId=aaa のライセンス認証により例外が発生しました。 次の失敗メッセージが検出されました:
+ https://192.168.1.1/test/clickonce.application?userId=aaa のダウンロードに失敗しました。
+ 基礎になる接続が閉じられました: SSL/TLS のセキュリティで保護されているチャネルに対する信頼関係を確立できませんでした
+ 検証プロシージャによると、リモート証明書は無効です。
コンポーネント ストア トランザクションの失敗の概要
トランザクション エラーは検出されませんでした。
警告
この操作中に警告は発生しませんでした。
操作の進行状況
* [2012/10/29 11:32:05] : https://192.168.1.1/test/clickonce.application?userId=aaa のライセンス認証が開始されました。
エラーの詳細
この操作中に次のエラーが検出されました。
* [2012/10/29 11:32:05] System.Deployment.Application.DeploymentDownloadException (不明な subtype)
- https://192.168.1.1/test/clickonce.application?userId=aaa のダウンロードに失敗しました。
- ソース: System.Deployment
- スタック トレース:
場所 System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
場所 System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
場所 System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
場所 System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
場所 System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
場所 System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
場所 System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
場所 System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- 内部例外 ---
System.Net.WebException
- 基礎になる接続が閉じられました: SSL/TLS のセキュリティで保護されているチャネルに対する信頼関係を確立できませんでした
- ソース: System
- スタック トレース:
場所 System.Net.HttpWebRequest.GetResponse()
場所 System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
--- 内部例外 ---
System.Security.Authentication.AuthenticationException
- 検証プロシージャによると、リモート証明書は無効です。
- ソース: System
- スタック トレース:
場所 System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
場所 System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
場所 System.Net.TlsStream.CallProcessAuthentication(Object state)
場所 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
場所 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
場所 System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
場所 System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
場所 System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
場所 System.Net.ConnectStream.WriteHeaders(Boolean async)
コンポーネント ストア トランザクションの詳細
トランザクション情報はありません。
-------------------------------------------------------------------------------------------------------------
なお、動作環境および実行手順・事象は以下の通りとなっています。
<動作環境>
クライアント : Windows XP SP3
Webサーバ : Redhat Enterprise Linux 5.7(64bit)、apache 2.2.3
※verisignより購入したサーバ証明書を配置
ただし、現状では都合上DNSサーバにてサーバ証明書のホスト名を解決できないようになっているため、
代わりに、Redhatのhosts設定にてホスト名とIPアドレスのマッチングを実施
※IPは例として左の通りとします → 192.168.1.1
APサーバ : Redhat Enterprise Linux 5.7(64bit)、JBossEAP5.1.0
※JBoss上にJavaアプリケーション(test.war)を配置し、公開
※発行したClickOnceモジュール(clickonce.application)は、Javaアプリケーション(test.war)内にClickOnce用フォルダを作成して配置
※IPは例として左の通りとします → 192.168.1.2
※WebサーバのapacheとAPサーバのJBossはProxy_AJP.confの設定にて連携させています。
<実行手順・事象>
①ClickOnceアプリケーションの起動のため、IEより以下にアクセス
<https://192.168.1.1/test/clickonce.application?userId=aaa>
②ClickOnce検証中のダイアログが表示される
③ダウンロード失敗のダイアログが表示される
<補足>
・C#Formアプリケーションの作成および、発行はVisual C# 2010 Expressで実施
・C#Formアプリケーションのコード署名の証明書(~.pfx)は、発行時に生成されるテスト用のものを一旦使用
・発行ファイル(~.application)にhttpでアクセスした場合、ダウンロードはできアプリケーション自体も実行されるが
内部で行っているサーバアクセス(相手はSeasar2で作成したJavaアプリケーション)がhttpsだと、やはり接続できない
※ログ(アプリで出力しているログ内容です。)
-------------------------------------------------------------------------------------------------------------
要求は中止されました: SSL/TLS のセキュリティで保護されているチャネルを作成できませんでした
(HTTPステータスコード:SecureChannelFailure)
-------------------------------------------------------------------------------------------------------------
また、併せて以下についてもご教授いただけますと幸いです。
■ClickOnceの配布モジュールをサーバに配置する場合、WebサーバとAPサーバのどちらに配置するのが一般的でしょうか?
■アプリケーションの署名について、インターネットの世界で「信頼されたアプリケーション」としてClickOnce配布を行う場合、
コード署名の証明書は、やはりverisignなどの証明書発行機関から購入しないといけないのでしょうか?
(自作の場合はNG?)
■ClickOnceの配布およびサーバアクセスにおけるhttpsでの通信失敗について、コード署名の証明書は何かしら関係しているのでしょうか?
(個人的には、あくまで通信プロトコルの話なので、サーバ証明書が正しいものと認識できればよく、コード署名の証明書は関係ないと思っているのですが…)
そもそも、システム構成が変である、またなぜC#とJavaでやりとりするのか等疑問も持たれるかと思いますが、
様々な要件上、基本的にご説明しました内容で実現したいと思っております。
お手数ですが、ご教授をお願いいたします。
※不足情報が多数あるかと思いますので、その際は都度補足させてください。
以上、よろしくお願いいたします。
すべての返信
-
IP アドレスでアクセスしているのであれば、証明書が示すホスト名と一致しないということになっているのでは?
これらのログはそのままのログなのか、ホスト名部分を隠すために書き換えたものなのかどうなのでしょうか?Azulean 様
ご回答ありがとうございます。IPアドレスではなく、ホスト名でアクセスしても同様の事象でした。
※記述していませんでしたが、クライアントはDNSにはアクセスできない状態(サーバとはVPNで繋がっており、インターネットの世界にはアクセスできません。)であったため、IPとホスト名のマッピングはクライアントのhostsに設定しています。
ログに関しては、ホスト名部分を隠すため、書き換えたものになります。