apache起動時にエラー「Init: SSLPassPhraseDialog builtin is not supported on Win32」が発生した場合の対処法

windows環境で、apache起動時にエラー「Init: SSLPassPhraseDialog builtin is not supported on Win32」が発生した場合の原因と対処法を記述してます。
環境
- OS windows10 pro 64bit
- Apache 2.4.43
エラー全文
「logs」フォルダの「error.log」を確認
[ssl:emerg] [pid 24200:tid 904] AH02577: Init: SSLPassPhraseDialog builtin is not supported on Win32 (key file C:/Apache24/conf/server.key)
[ssl:emerg] [pid 24200:tid 904] AH02311: Fatal error initialising mod_ssl, exiting. See C:/Apache24/logs/error.log for more information
[ssl:emerg] [pid 24200:tid 904] AH02564: Failed to configure encrypted (?) private key 192.168.101.246:443:0, check C:/Apache24/conf/server.key
[ssl:emerg] [pid 24200:tid 904] SSL Library Error: error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag
[ssl:emerg] [pid 24200:tid 904] SSL Library Error: error:0D08303A:asn1 encoding routines:asn1_template_noexp_d2i:nested asn1 error
[ssl:emerg] [pid 24200:tid 904] SSL Library Error: error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag
[ssl:emerg] [pid 24200:tid 904] SSL Library Error: error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error (Type=RSAPrivateKey)
[ssl:emerg] [pid 24200:tid 904] SSL Library Error: error:04093004:rsa routines:old_rsa_priv_decode:RSA lib
[ssl:emerg] [pid 24200:tid 904] SSL Library Error: error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag
[ssl:emerg] [pid 24200:tid 904] SSL Library Error: error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error (Type=PKCS8_PRIV_KEY_INFO)
原因
keyにパスワードがかかっていたことが原因。windows環境では対応してないようです。
対処法
パスワードを外してあげる
server.key → パスワードがかかってるkey
nopass.key → パスワードを外したkey
openssl rsa -in server.key -out nopass.key
<出力結果>
Enter pass phrase for server.key:
writing RSA key
-
前の記事
javascript 画像の読み込み中を確認する 2020.08.27
-
次の記事
javascript 配列内の数値の最大値と最小値を取得する 2020.08.27
コメントを書く