httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Klinger <cklin...@novareto.de>
Subject Re: How can i decrypt a cookie in a module
Date Tue, 28 Oct 2008 14:40:12 GMT
Hi again,

ldd mod_auth_tkt.so
	linux-gate.so.1 =>  (0xffffe000)
	libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0xb7f6f000)
	libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb7e29000)
	libc.so.6 => /lib/libc.so.6 (0xb7cf6000)
	libdl.so.2 => /lib/libdl.so.2 (0xb7cf2000)
	libz.so.1 => /lib/libz.so.1 (0xb7cde000)
	/lib/ld-linux.so.2 (0x80000000)

is this ok? Or do I need something special for blowfish.h?

Christian

Am 28.10.2008 um 14:45 schrieb Christian Klinger:

>
> Am 28.10.2008 um 14:30 schrieb Peter Poeml:
>
>> On Tue, Oct 28, 2008 at 02:12:26PM +0100, Christian Klinger wrote:
>>>>>
>>>>
>>>> The symbol BF_Decrypt is probably to be found in libcrypto from
>>>> OpenSSL.
>>>>
>>>> When mod_auth_tkt was compiled, it was not linked with that  
>>>> library.
>>>> So
>>>> either you need to add -lcrypto to the compile command, or you can
>>>> alternatively start Apache with the "LoadFile directive", which  
>>>> will
>>>> cause Apache to load the library so that the symbol can be found at
>>>> runtime.
>>>>
>>>> Peter
>>>
>>> Hello Peter,
>>>
>>> thanks for the answers, but i don´t get it.
>>>
>>> I try to add the Icrypto in my Makefile i get the error again:
>>
>> I meant -l (as in "link"), not -I (as in "include").
>>
>> Try to add this into the command:
>> -lssl -lcrypto
>>
>> This will add a reference to libssl and libcrypto (from your library
>> path) be added to the shared object that you compile with 'apxs - 
>> c ...'.
>>
>
>
> Hi Peter,
>
> now i have the -lssl and -lcrypt in the gcc command but i alwas get  
> the same error again.
>
> make
> cd src && make all
> make[1]: Entering directory `/opt/apache/mod_auth_tkt-2.0.0rc3/src'
> /opt/apache/server/bin/apxs -c -Wc, "-Wall -ansi -g -Wall -ansi - 
> pedantic -Wno-implicit-function-declaration -Wno-long-long -lssl - 
> lcrypto" -lssl -lcrypto mod_auth_tkt.c
> /opt/apache/server/build/libtool --silent --mode=compile gcc -prefer- 
> pic  -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT - 
> D_GNU_SOURCE -g -O2 -pthread -I/opt/apache/server/include  -I/opt/ 
> apache/server/include   -I/opt/apache/server/include    -c -o  
> mod_auth_tkt.lo mod_auth_tkt.c && touch mod_auth_tkt.slo
> /opt/apache/server/build/libtool --silent --mode=link gcc -o  
> mod_auth_tkt.la  -lssl -lcrypto -rpath /opt/apache/server/modules - 
> module -avoid-version    mod_auth_tkt.lo
> make[1]: Leaving directory `/opt/apache/mod_auth_tkt-2.0.0rc3/src'
> cd doc && make all
> make[1]: Entering directory `/opt/apache/mod_auth_tkt-2.0.0rc3/doc'
> pod2man --section=3 --release=2.0.0rc3 mod_auth_tkt.pod mod_auth_tkt.3
> make[1]: Leaving directory `/opt/apache/mod_auth_tkt-2.0.0rc3/doc'
> g3:/opt/apache/mod_auth_tkt-2.0.0rc3 # make install
> cd src && make install
> make[1]: Entering directory `/opt/apache/mod_auth_tkt-2.0.0rc3/src'
> /opt/apache/server/bin/apxs -i mod_auth_tkt.la
> /opt/apache/server/build/instdso.sh SH_LIBTOOL='/opt/apache/server/ 
> build/libtool' mod_auth_tkt.la /opt/apache/server/modules
> /opt/apache/server/build/libtool --mode=install cp mod_auth_tkt.la / 
> opt/apache/server/modules/
> cp .libs/mod_auth_tkt.so /opt/apache/server/modules/mod_auth_tkt.so
> cp .libs/mod_auth_tkt.lai /opt/apache/server/modules/mod_auth_tkt.la
> cp .libs/mod_auth_tkt.a /opt/apache/server/modules/mod_auth_tkt.a
> chmod 644 /opt/apache/server/modules/mod_auth_tkt.a
> ranlib /opt/apache/server/modules/mod_auth_tkt.a
> PATH="$PATH:/sbin" ldconfig -n /opt/apache/server/modules
> ----------------------------------------------------------------------
> Libraries have been installed in:
>   /opt/apache/server/modules
>
> If you ever happen to want to link against installed libraries
> in a given directory, LIBDIR, you must either use libtool, and
> specify the full pathname of the library, or use the `-LLIBDIR'
> flag during linking and do at least one of the following:
>   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
>     during execution
>   - add LIBDIR to the `LD_RUN_PATH' environment variable
>     during linking
>   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
>   - have your system administrator add LIBDIR to `/etc/ld.so.conf'
>
> See any operating system documentation about shared libraries for
> more information, such as the ld(1) and ld.so(8) manual pages.
> ----------------------------------------------------------------------
> chmod 755 /opt/apache/server/modules/mod_auth_tkt.so
> make[1]: Leaving directory `/opt/apache/mod_auth_tkt-2.0.0rc3/src'
> cd doc && make install
> make[1]: Entering directory `/opt/apache/mod_auth_tkt-2.0.0rc3/doc'
> mkdir -p /usr/share/man/man3
> cp mod_auth_tkt.3 /usr/share/man/man3
> chmod 644 /usr/share/man/man3/mod_auth_tkt.3
> make[1]: Leaving directory `/opt/apache/mod_auth_tkt-2.0.0rc3/doc'
> g3:/opt/apache/mod_auth_tkt-2.0.0rc3 #
>
>
>
> I have added the LoadFile with all possibilitys of libcrypto
>
> I´ve included all versions of the libcrypto lib.
>
> LoadFile /usr/lib/libcrypto.so.0.9.8
> LoadFile /usr/lib/libcrypto.so.0.9.7
> LoadFile /usr/lib/libcrypto
>
> but with no success....
>
> Any Ideas left....
>
> Christian


Mime
View raw message