Why is my server displaying openssl 0.9.8 when I have openssl1.0.1 installed?

Solution 1:

The missing step is that you must say to the system that you want to use OpenSSL from ports over the one from the base system:

  • build OpenSSL from ports:

  • create/add to your /etc/make.conf the following line:

    WITH_OPENSSL_PORT=yes
    
  • then re-install all the other modules needing OpenSSL (devel/apr1, www/apache24, ...)

  • you can check the OpenSSL lib used by apache24 (in fact the apache24 mod_ssl module):

    # ldd /usr/local/libexec/apache24/mod_ssl.so |grep ssl 
    /usr/local/libexec/apache24/mod_ssl.so:
            libssl.so.8 => /usr/local/lib/libssl.so.8 (0x801634000)
    

    The apache24 mod_ssl is now using the OpenSSL library from the ports.

Solution 2:

Compiling OpenSSL will not help you much. Your Apache is still linked with the old OpenSSL. You can verify this using the ldd command.

You should recompile Apache or mod_ssl for it to be linked to your new OpenSSL.