Configuring two way SSL between Client and Weblogic server with Apache proxying the request.

Configure Apache for SSL

Create the certificates using openssl (present in apache_homebin) using the below steps:

openssl genrsa -des3 -out server.key 1024

openssl req -config ..confopenssl.cnf -new -key server.key -out localhost

openssl x509 -req -days 730 -in localhost -signkey server.key -out server.crt

Add the following in the httpd.conf file

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin

Listen 443
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile “C:Program FilesApache GroupApache2confserver.crt”
SSLCertificateKeyFile “C:Program FilesApache GroupApache2confserver.key”
SSLCACertificateFile “C:Documents and SettingsAdministratorDesktopcertIntermediateCA.cer”
#SSLLog “C:Program FilesApache GroupApache2confssl.log”
#SSLLogLevel debug

Configure SSL between Apache and Weblogic Server

Add the following in the Location Directive

SecureProxy ON
TrustedCAFile C:bea101wlserver_10.0serverlibCertGenCA.pem
RequireSSLHostMatch false

Configure Apache to Request for Client Certificate

Add the following in the Location Directive

SSLVerifyClient optional_no_ca
SSLOptions +ExportCertData

Configure Weblogic Server for 2-way SSL

mydomain> Servers> myserver>Keystores & SSL > Advanced Options
Hostname Verification: None
Two Way Client Cert Behavior: Client Certs Requested but not enforced

Apache_SSL> Domain Wide Security Settings> Realms> myrealm> Authentication Providers> DefaultIdentityAsserter

Trusted Client Principals: provide CN of the Client Certificate
Types: X509


Use Default User Name Mapper: Checked
Default User Name Mapper Attribute Type: CN
Base64Decoding Required: Checked

Go the security realm and create a user wih the username as CN of the certificate

Add the following in the config.xml
<Server ClientCertProxyEnabled=”true”

Configure the Web Application

The Web Application should require client cert authentication.

Add the following in the web.xml


Add the following in the weblogic.xml

<principal-name> CN of the certificate</principal-name>




  1. Hi Faisal, Got stucked with SSL, previously it was working and now it is throwing eating exception by saying that Algorithm MD5 not available(self-tuning)'> <> <> <> <1269284150344> <……….. Eating Exception ……… Algorithm MD5 not available at javax.crypto.Mac.getInstance(DashoA13*..) at com.certicom.tls.provider.Mac.getInstance(Unknown Source) at com.certicom.tls.ciphersuite.SecurityParameters.makeKeys(Unknown Source) at com.certicom.tls.ciphersuite.SecurityParameters.deriveKeys(Unknown Source) at com.certicom.tls.ciphersuite.SecurityParameters.(Unknown Source) at com.certicom.tls.record.handshake.HandshakeHandler.generateSecurityParameters(Unknown Source) at com.certicom.tls.record.handshake.ServerStateNoHandshake.resumeSession(Unknown Source) at com.certicom.tls.record.handshake.ServerStateNoHandshake.handle(Unknown Source) at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage(Unknown Source) at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown Source) at com.certicom.tls.record.MessageInterpreter.interpretContent(Unknown Source) at com.certicom.tls.record.MessageInterpreter.decryptMessage(Unknown Source) at com.certicom.tls.record.ReadHandler.processRecord(Unknown Source) at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source) at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source) at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source) at Source) at weblogic.server.channels.DynamicSSLListenThread$ at at> please help

  2. Hi Faizal,

    I am trying to configure Apache as SSL

    I am getting the following error

    Thu Jun 03 20:18:24 2010 ERROR: Failed to load trusted CA file(D:\hk\certificates\rootCA.der). err = 0 loaded = 0
    Thu Jun 03 20:18:24 2010 ERROR: SSL initialization failed

    I am not able to access the console however this is working fine with http

    WLS 10.3 and Apache 2.2

    1. Hi Hari

      convert the der file to pem file using the following command line and then use it as a trustedCA file

      java utils.der2pem .der

      This will create a pem file in the same directory.

      Try it and let me know.

  3. Hi Faisal,

    I am facing some issues with on way SSL from iPlanet (Sun web Server 7) to WebLogic Cluster.

    The architecture is 4 WLS Managed Servers, 1 iPlanet web Server.

    There are 4 self signed certs on 4 managed servers.
    So to have secure connection between wl proxy plugin and backend Managed Servers, I tried to use Trust keystore as a TrustedCAFile parameter to the wl proxy plugin, but it doesn’t work.
    If I use the Public key of one of the Self-signed cert in PEM format it works.

    Is there any way to make wl proxy config in such a way that, it should trust all the self signed certs on all managed servers at a time.

    Your help in this regard is highly appreciated.

    Best regards,

  4. U can give multiple TrustedCAFile parameter in the httpd.conf file. Each TrustedCAFile pointing to the managed server certificate in PEM format.

    Thanks for posting

  5. remove password from the server.key to overcome the error below.

    SSLPassPhraseDialog builtin is not supported on Win32

    openssl rsa -in server.key.bak -out server.key

Comments are closed.