You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Oscar A Figueroa <pe...@gmail.com> on 2011/09/15 16:56:25 UTC

Re: [users@httpd] Compile Apache HTTP with customized OpenSSL version [SOLVED]

Thanks Ian!

I solved exporting some environment variables before the ./configure:

CPPFLAGS="-I/usr/local/openssl-0.9.8r/include"
LDFLAGS="-I/usr/local/openssl-0.9.8r/lib -R/usr/local/openssl-0.9.8r/lib
-L/usr/local/openssl-0.9.8r/lib"
LD_LIBRARY_PATH=/usr/local/openssl-0.9.8r/lib:$LD_LIBRARY_PATH
export  LD_LIBRARY_PATH LDFLAGS CPPFLAGS

./configure --prefix=/usr/local/apache2 ...
make && make install

Then the result of 'ldd /usr/local/apache2/modules/mod_ssl.so' is:

        linux-vdso.so.1 =>  (0x00007fff772ab000)
        libssl.so.0.9.8 => /usr/local/openssl-0.9.8r/lib/libssl.so.0.9.8
(0x00007fc2231d3000)
        libcrypto.so.0.9.8 =>
/usr/local/openssl-0.9.8r/lib/libcrypto.so.0.9.8 (0x00007fc222e42000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007fc222c38000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007fc222a21000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007fc222805000)
        libc.so.6 => /lib/libc.so.6 (0x00007fc2224b1000)
        /lib/ld-linux.so.2 (0x00007fc223656000)

And the result of 'ldconfig -p | grep ssl' is:

        libssl.so.0.9.8 (libc6,x86-64) => /usr/lib/libssl.so.0.9.8
        libssl.so (libc6,x86-64) => /usr/lib/libssl.so
        libgnutls-openssl.so.26 (libc6,x86-64) =>
/usr/lib/libgnutls-openssl.so.26


Error log of the Apache when has been started:

[notice] suEXEC mechanism enabled (wrapper: /usr/local/apache2/sbin/suexec)
[notice] Digest: generating secret for digest authentication ...
[notice] Digest: done
[notice] Apache/2.2.20 (Unix) mod_ssl/2.2.20 OpenSSL/0.9.8r mod_fcgid/2.3.6
configured -- resuming normal operations

There is an application in Debian distribution which can change the RPATH of
an ELF binary named 'chrpath', but i don't know if could set if didn't do at
configure time.

Thanks for your attention :)


2011/9/15 Ian Zimmerman <it...@buug.org>

>
> Oscar> As is visible, the libssl linked is not the
> Oscar> /usr/local/openssl-0.9.8r that was compiled manually.
>
> Oscar> After compile openssl, i cant add the path to the /etc/ld.so.conf
> Oscar> an make 'ldconfig' because this makes that ssh service fails per
> Oscar> the use of the compiled libcrypto.so
>
> Methinks you need -rpath linker option.  No idea how to force the build
> to use it, though.
>
> --
> Ian Zimmerman
> gpg public key: 1024D/C6FF61AD
> fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
> Rule 420: All persons more than eight miles high to leave the court.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>