WAMP Server 3.1.3 - Enable SSL with PassPhrase
Posted by: carinochan (---.static.hkbn.net)
Date: April 12, 2019 08:08AM

My web site is running on below platform with SSL enabled and it is working fine.

My Platform
MS Windows2012 R2
WAMP Server 3.1.3 (64bits) with Apache 2.4.34 and Openssl 1.1.0h

Recently our manager request us to add the password protection on the existing 'Private Key'. I added the password and create a password file on the server. After retstart the Apache server and it started with error.


[Fri Apr 12 08:59:41.359834 2019] [ssl:emerg] [pid 3180:tid 452] AH02580: Init: Pass phrase incorrect for key uat.abcde.com:443:0
[Fri Apr 12 08:59:41.375463 2019] [ssl:emerg] [pid 3180:tid 452] SSL Library Error: error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag
[Fri Apr 12 08:59:41.375463 2019] [ssl:emerg] [pid 3180:tid 452] SSL Library Error: error:0D08303A:asn1 encoding routines:asn1_template_noexp_d2i:nested asn1 error
[Fri Apr 12 08:59:41.375463 2019] [ssl:emerg] [pid 3180:tid 452] SSL Library Error: error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag
[Fri Apr 12 08:59:41.375463 2019] [ssl:emerg] [pid 3180:tid 452] SSL Library Error: error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error (Type=RSA)
[Fri Apr 12 08:59:41.375463 2019] [ssl:emerg] [pid 3180:tid 452] SSL Library Error: error:04093004:rsa routinesyawning smileyld_rsa_priv_decode:RSA lib
[Fri Apr 12 08:59:41.375463 2019] [ssl:emerg] [pid 3180:tid 452] SSL Library Error: error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag
[Fri Apr 12 08:59:41.375463 2019] [ssl:emerg] [pid 3180:tid 452] SSL Library Error: error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error (Type=PKCS8_PRIV_KEY_INFO)
[Fri Apr 12 08:59:41.375463 2019] [ssl:emerg] [pid 3180:tid 452] AH02564: Failed to configure encrypted (?) private key uat.abcde.com:443:0, check C:/wamp64/bin/apache/apache2.4.34/conf/key/server.protected.key


So I start to trace the problem;

1. I confirmed that the key password is correct by below command.

C:\wamp64\bin\apache\apache2.4.34\bin>openssl rsa -noout -in c:\wamp64\bin\apache\apache2.4.34\conf\key\server.protected.key -passin pass:abcd1234


2. I confirmed that the key file could work by below command.

openssl rsa -noout -in c:/wamp64/bin/apache/apache2.4.34/conf/key2019/server.protected.key -passin "file:C:\wamp64\bin\apache\apache2.4.34\conf\password.srpv"

So I have no idea what is the root causes!

Below is the httpd.conf configuration related to SSL

# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf


And httpd-ssl.conf
SSLPassPhraseDialog "exec:C:/wamp64/bin/apache/apache2.4.34/conf/password.srpv"


Anyone can help???

Options: ReplyQuote


Sorry, only registered users may post in this forum.