初期インストール状態のWindows Server 2008 SP2のルート証明書を更新する 2022/07/07版


2022/07/07時点でWindows Server 2008 SP2を新規インストールすると、OSが持っているルート証明書の有効期限が1つ残りして他は切れています。

この結果、何がおこるかと言えば、Windows Update に失敗します。

これはWindows Updateは SSL証明書を使用する https通信を利用していて、いま残っているルート証明書だけでは目的とするサイトにアクセスできないために発生しています。

WIndows Server 2008 R2であればルート証明書の更新プログラムが提供されているのですが、Windows Server 2008には有りません。

いろいろ調べていくとASHER TOOLSの「Root Certificate Updater」というのを発見しました。

こちらPower Shellスクリプトとして作成されており github にてソースコードが公開されています → https://github.com/asheroto/Root-Certificate-Updater

内容を確認すると至って簡単で、要約すると以下を実行しているだけです。

rem 信頼できるルート証明書をダウンロード
certutil -urlcache -f http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootstl.cab authrootstl.cab

rem 信頼されていない証明書をダウンロード
certutil -urlcache -f http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/disallowedcertstl.cab disallowedcertstl.cab

rem ダウンロードしたcabファイルを展開
expand authrootstl.cab -R .\
expand disallowedcertstl.cab -R .\

rem 証明書を登録
certutil -addstore -f root authroot.stl
certutil -addstore -f disallowed disallowedcert.stl

実際に実行してみます。

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\Administrator>mkdir t

C:\Users\Administrator>cd t

C:\Users\Administrator\t>certutil -urlcache -f http://ctldl.windowsupdate.com/ms
download/update/v3/static/trustedr/en/authrootstl.cab authrootstl.cab
****  Online  ****
CertUtil: -URLCache コマンドは正常に完了しました。

C:\Users\Administrator\t>certutil -urlcache -f http://ctldl.windowsupdate.com/ms
download/update/v3/static/trustedr/en/disallowedcertstl.cab disallowedcertstl.ca
b
****  Online  ****
CertUtil: -URLCache コマンドは正常に完了しました。

C:\Users\Administrator\t>expand authrootstl.cab -R .\
Microsoft (R) File Expansion Utility  Version 6.0.6001.18000
Copyright (c) Microsoft Corporation. All rights reserved.

.\authroot.stl を展開キューに追加しています

ファイルを解凍しています...

ファイルの解凍が完了しました...

C:\Users\Administrator\t>expand disallowedcertstl.cab -R .\
Microsoft (R) File Expansion Utility  Version 6.0.6001.18000
Copyright (c) Microsoft Corporation. All rights reserved.

.\disallowedcert.stl を展開キューに追加しています

ファイルを解凍しています...

ファイルの解凍が完了しました...

C:\Users\Administrator\t>certutil -addstore -f root authroot.stl
root
証明書 "CN=Microsoft Certificate List CA 2011, O=Microsoft Corporation, L=Redmon
d, S=Washington, C=US" がストアに追加されました。
証明書 "CN=Microsoft Certificate Trust List Publisher, O=Microsoft Corporation,
L=Redmond, S=Washington, C=US" がストアに追加されました。
CertUtil: -addstore コマンドは正常に完了しました。

C:\Users\Administrator\t>certutil -addstore -f disallowed disallowedcert.stl
disallowed
証明書 "CN=Microsoft Certificate List CA 2011, O=Microsoft Corporation, L=Redmon
d, S=Washington, C=US" がストアに追加されました。
証明書 "CN=Microsoft Certificate Trust List Publisher, O=Microsoft Corporation,
L=Redmond, S=Washington, C=US" がストアに追加されました。
CertUtil: -addstore コマンドは正常に完了しました。

C:\Users\Administrator\t>

実行後はOSの再起動が必須です。

再起動後 certmgr.msc を実行して確認すると有効期限が切れていない証明書が増えています。

これでWindows Updateもうまくいことでしょう!

あれ?

次!

エラーコード 80072efeで検索すると「Windows Server 2008 R2 でWindows Updateが実行できない」というのを発見

こちらはWindows Server 2008 R2の事例ですが、「トランスポート層セキュリティ 1.0 および 1.1 の無効化」によりTLS1.0/TLS1.1アクセスが廃止されたためにアクセスできないのでは?という推測から対処を行っているが、KB3140245 はWindows Server 2008に対応して折らず、またレジストリを設定してみても状況は変わらない。

お手上げになったのでとりあえずWSUS Offline Updateを適用してみて、何のパッチが増えたのかを確認

まず、ルート証明書が増えている

しかし、WSUS Offline Update実行中にKB???? といったファイルが8個ぐらい適用されたような感じだったのに、更新履歴にはない

しかし、Windows Updateはできるようになった。

WSUS Offline Updateのログは %SystemRoot%\wsusofflineupdate.log にあるので確認してみる

2022/07/07 17:23:37.24 - Info: Started service 'Windows Update' (wuauserv)
2022/07/07 17:23:39.39 - Info: Installed ..\w60-x64\glb\windows6.0-kb3205638-x64_e32da6effffd299aaacb0f293602c7e55832bfad.cab
2022/07/07 17:23:45.73 - Info: Installed ..\w60-x64\glb\windows6.0-kb4012583-x64_e881e527ca32b3c47b008fd42ea1ecc87c017a71.cab
2022/07/07 17:23:47.38 - Info: Installed ..\w60-x64\glb\windows6.0-kb4022887-x64_fb2bd4b42ea68149eeffc1ef53bb469345c36f26.cab
2022/07/07 17:23:49.11 - Info: Installed ..\w60-x64\glb\windows6.0-kb4022883-x64_519ce72edf20b1a75c181362d75e13a22242f455.cab
2022/07/07 17:23:53.48 - Info: Installed ..\w60-x64\glb\windows6.0-kb4493730-x64_de2cd401093a5c42254c7bd69349821ad10341ff.cab
2022/07/07 17:24:32.75 - Info: Installed ..\w60-x64\glb\windows6.0-kb4474419-v4-x64_a5f1b40e6afb4874248c3a71583010b4b7d4512e.cab
2022/07/07 17:25:47.35 - Info: Installed ..\w60-x64\glb\windows6.0-kb4537830-x64_b91926b46eb406b6a52766e7fc8c88e4255a192c.cab
2022/07/07 17:26:50.90 - Info: Installed ..\w60-x64\glb\ie9-windows6.0-kb4525106-x64_72d91f2712d4a944b285407f774db20298b19624.cab
2022/07/07 17:26:50.93 - Info: Installed 8 updates
2022/07/07 17:26:50.93 - Info: Installed Windows Update scan prerequisites
2022/07/07 17:26:50.93 - Info: Installation successful (Updates pending)
2022/07/07 17:26:50.95 - Info: Ending WSUS Offline Update

Windows Updateを適用するために上記8個の更新を適用しているらしい。

とりあえず、Windows Server 2008 SP2+Internet Explorer 9インストール直後という状態にもどしてから、下記をダウンロードして順に適用してみた。

KB3205638は何故かWindows Server 2008 for x64-Based System用だけない けどVista x64用で適用できた

Windows Server 2008 for x64-Based Systems 用セキュリティ更新プログラム (KB4012583)

Windows Server 2008 for x64-Based Systems 用セキュリティ更新プログラム (KB4022887)

Windows Server 2008 for x64-Based Systems 用セキュリティ更新プログラム (KB4022883)

Windows Server 2008 for x64-Based Systems 用セキュリティ更新プログラム (KB4493730)

2019-09 x64 ベース システム用 Windows Server 2008 のセキュリティ更新プログラム (KB4474419)

2020-02×64 ベース システム用 Windows Server 2008 サービス スタック更新プログラム (KB4537830)2019-11×64 ベース システム Windows Server 2008 用 Internet Explorer 9 の累積的なセキュリティ更新プログラム (KB4525106) は下記の様なメッセージが出て適用失敗。おそらく証明書更新関連の問題している。

再起動後、Windows Update履歴を確認すると下記の状態となっている。

certmgr.mscを確認すると、Microsoft関連のルート証明書が追加されているのを確認。

また、Windows Updateもできるようになっていた。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください