Are you modifying ssl.c from openSSL?  Can you mention the full pathname of
the file you are modifying.

I would suggest you try to fix this, without modifying the .c file, but
rather the makefile and include directory.  If you have confirmed that the
symbol is present in evp.h then you will need to add its location to the
include path.

For that, go to the src directory of ossec and open the Config.Make file

you will see a line
CFLAGS = -g -Wall -I${PT} -I${PT}headers ${CPATH} ${CEXTRA} ${DEXTRA}
${EEXTRA} ${FEXTRA} ${GEXTRA} ${HEXTRA} -DARGV0=\"${NAME}\"
-DXML_VAR=\"var\" -DOSSECHIDS

Add the ssl directory as an include path
CFLAGS = -g -Wall -I${PT} -I${PT}headers *-I/usr/include/openssl* ${CPATH}
${CEXTRA} ${DEXTRA} ${EEXTRA} ${FEXTRA} ${GEXTRA} ${HEXTRA}
-DARGV0=\"${NAME}\" -DXML_VAR=\"var\" -DOSSECHIDS

 If you still get errors try moving the openssl directory ahead of the
other -I declarations like
CFLAGS = -g -Wall *-I/usr/include/openssl* -I${PT} -I${PT}headers  ${CPATH}
${CEXTRA} ${DEXTRA} ${EEXTRA} ${FEXTRA} ${GEXTRA} ${HEXTRA}
-DARGV0=\"${NAME}\" -DXML_VAR=\"var\" -DOSSECHIDS

Do a "make clean", before compiling again.

During the compilation, check that the added directive "*
-I/usr/include/openssl*" is being used.

On Fri, Apr 20, 2012 at 11:31 AM, S@R <[email protected]> wrote:

> Chir,
>
> I have checked this. what i did was edited the ssl.c file adding the
> entry mentioned below by copying the header files in local dir from /
> usr/include/openssl/.
>
> #include "evp.h"
> #include "ssl.h"
>
> and running the script and it fails with the same error, no difference
> found.
>
> Is there any other way that i need to do instead of copying it to
> local dir.
>
> On Apr 20, 7:42 pm, Christopher Moraes <[email protected]> wrote:
> > I wouldn't recommend commenting out that line.   I did a bit of research
> on
> > your version of openSSL (0.9.8) and this is what I found from a similar
> > article (related to mysql)
> >
> > "Starting with 0.9.7, OpenSSL_add_all_algorithms() is no longer available
> > as a function but as a macro, that is defined in  openssl/evp.h.
> >
> > If your compilation fails with OpenSSL_add_all_algorithms() being
> > flagged as an unresolved symbol, it means that either openssl/evp.h
> > is not included when using the function call or that the version of
> > the header files does not match your library."
> >
> > Have a look at this page.  http://lists.mysql.com/mysql/120099
> >
> > As a next step to debug this, go to /usr/include and run this command
> >
> > $ find . -name "*.h" -exec grep -H "OpenSSL_add_all_algorithms" {} \;
> >
> > This will search all header files in the current dir and sub-dirs.  If
> > grep returns nothing, then you have a missing header file.
> >
> > If you find the header file that contains the function, make sure it
> > is included in your -I flag to the compiler.
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Apr 20, 2012 at 8:11 AM, S@R <[email protected]> wrote:
> > > Chris,
> >
> > > ld: 0711-317 ERROR: Undefined symbol: .OpenSSL_add_all_algorithms
> >
> > > The above error is caused because the function
> > > "OpenSSL_add_all_algorithms();" declared under the "ssl.c" file has
> > > issues. when i commented that line and ran "make", files got created.
> > > But am not sure how this will effect the OSSEC. Can you check how we
> > > can avoid this by running make without commenting the ssl algorithm
> > > function.
> >
> > > $ make
> > >         gcc -g -Wall -I../ -I../headers  -DDEFAULTDIR=\"/var/ossec\" -
> > > DCLIENT -DUSE_OPENSSL -DAIX -DHIGHFIRST    -DARGV0=\"ossec-authd\" -
> > > DXML_VAR=\"var\" -DOSSECHIDS  main-server.c ssl.c  ../addagent/
> > > validate.c ../config/lib_config.a ../shared/lib_shared.a ../os_net/
> > > os_net.a ../os_regex/os_regex.a ../os_crypto/os_crypto.a ../os_zlib/
> > > os_zlib.c ../external/libz.a -lssl -lcrypto -o ossec-authd
> > > main-server.c: In function 'main':
> > > main-server.c:39:11: warning: variable 'cfg' set but not used [-
> > > Wunused-but-set-variable]
> > >         gcc -g -Wall -I../ -I../headers  -DDEFAULTDIR=\"/var/ossec\" -
> > > DCLIENT -DUSE_OPENSSL -DAIX -DHIGHFIRST    -DARGV0=\"ossec-authd\" -
> > > DXML_VAR=\"var\" -DOSSECHIDS  main-client.c ssl.c  ../addagent/
> > > validate.c ../config/lib_config.a ../shared/lib_shared.a ../os_net/
> > > os_net.a ../os_regex/os_regex.a ../os_crypto/os_crypto.a ../os_zlib/
> > > os_zlib.c ../external/libz.a -lssl -lcrypto -o agent-auth
> > > main-client.c: In function 'main':
> > > main-client.c:52:11: warning: variable 'cfg' set but not used [-
> > > Wunused-but-set-variable]
> > > main-client.c:49:11: warning: variable 'dir' set but not used [-
> > > Wunused-but-set-variable]
> > > main-client.c:47:12: warning: variable 'test_config' set but not used
> > > [-Wunused-but-set-variable]
> >
> > > On Apr 20, 1:54 am, Christopher Moraes <[email protected]> wrote:
> > > > Can you confirm that you have libssl.so or libssl.a in /usr/lib.
> If you
> > > > don't check if it is present on the system anywhere.
> >
> > > > I'm not familiar with AIX, but from this site (
> > >http://www.romuloaraujo.com/2010/03/installing-nrpe-212-on-aix.html),
> they
> > > > say that AIX does not have libssl.so.  You need to use libssl.a
> >
> > > > If libssl is not in /usr/lib then you will need to modify the shared
> > > > library path when compiling.  (-L option to the compiler)
> >
> > > > On Thu, Apr 19, 2012 at 3:48 PM, Jaime Cabeza <
> [email protected]
> > > >wrote:
> >
> > > > > Installed openssl-devel:
> >
> > > > > rpm -q openssl-devel
> > > > > openssl-devel-1.0.0d-2
> >
> > > > > Still no dice... install stops with the same behavior noted before.
> >
> > > > > On Thu, Apr 19, 2012 at 1:03 PM, dan (ddp) <[email protected]>
> wrote:
> >
> > > > >> Do you have openssl development libraries installed? The openssl
> thing
> > > > >> you mention at the bottom looks like it's actually openssh.
> >
> > > > >> On Thu, Apr 19, 2012 at 12:51 PM, InfoSecGeek <
> [email protected]
> >
> > > > >> wrote:
> > > > >> > I'm having trouble compiling an OSSEC agent on AIX (5.3).
> >
> > > > >> > Initially, there was an error "making shared" with the headers.
> > > > >> Compiling
> > > > >> > the latest gcc from source seemed to solve this issue.
> > > > >> > However, the install now fails at making os_auth:
> >
> > > > >> >  *** Making os_auth ***
> >
> > > > >> >         gcc -g -Wall -I../ -I../headers
>  -DDEFAULTDIR=\"/var/ossec\"
> > > > >> > -DCLIENT -DUSE_OPENSSL -DAIX -DHIGHFIRST
>  -DARGV0=\"ossec-authd\"
> > > > >> > -DXML_VAR=\"var\" -DOSSECHIDS  main-server.c ssl.c
> > > > >> ../addagent/validate.c
> > > > >> > ../config/lib_config.a ../shared/lib_shared.a ../os_net/os_net.a
> > > > >> > ../os_regex/os_regex.a ../os_crypto/os_crypto.a
> ../os_zlib/os_zlib.c
> > > > >> > ../external/libz.a -lssl -lcrypto -o ossec-authd
> > > > >> > main-server.c: In function 'main':
> > > > >> > main-server.c:39:11: warning: variable 'cfg' set but not used
> > > > >> > [-Wunused-but-set-variable]
> > > > >> > ld: 0711-317 ERROR: Undefined symbol:
> .OpenSSL_add_all_algorithms
> > > > >> > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain
> more
> > > > >> > information.
> > > > >> > collect2: ld returned 8 exit status
> > > > >> > make: 1254-004 The error code from the last command is 1.
> >
> > > > >> > Stop.
> >
> > > > >> > Error Making os_auth
> > > > >> > make: 1254-004 The error code from the last command is 1.
> >
> > > > >> > Stop.
> >
> > > > >> >  Error 0x5.
> > > > >> >  Building error. Unable to finish the installation.
> >
> > > > >> > Here is some additional information:
> >
> > > > >> > Related rpm's installed:
> >
> > > > >> > gcc-cpp-4.6.3-2
> > > > >> > libgcc-4.6.3-2
> > > > >> > bash-4.2-5
> > > > >> > expat-2.0.1-3
> > > > >> > AIX-rpm-5.3.12.1-3
> > > > >> > libffi-3.0.10-1
> > > > >> > glib2-2.30.3-1
> > > > >> > gettext-0.17-1
> > > > >> > info-4.13a-2
> > > > >> > gmp-4.3.2-2
> > > > >> > mpfr-2.4.2-2
> > > > >> > libmpc-0.8.2-1
> > > > >> > gcc-4.6.3-2
> > > > >> > libgomp-4.6.3-2
> > > > >> > libstdc++-4.6.3-2
> > > > >> > libstdc++-devel-4.6.3-2
> > > > >> > gcc-gfortran-4.6.3-2
> > > > >> > gcc-c++-4.6.3-2
> >
> > > > >> > gcc -v
> >
> > > > >> > Using built-in specs.
> > > > >> > COLLECT_GCC=gcc
> >
> > >
> COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix5.3.0.0/4.6.3/
> > > lto-wrapper
> > > > >> > Target: powerpc-ibm-aix5.3.0.0
> > > > >> > Configured with: ../gcc-4.6.3/configure --with-as=/usr/bin/as
> > > > >> > --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran
> > > > >> > --prefix=/opt/freeware --mandir=/opt/freeware/man
> > > > >> > --infodir=/opt/freeware/info --enable-threads
> > > > >> > --enable-version-specific-runtime-libs --disable-nls
> > > > >> > --enable-decimal-float=dpd --host=powerpc-ibm-aix5.3.0.0 Thread
> > > model:
> > > > >> aix
> > > > >> > gcc version 4.6.3 (GCC)
> >
> > > > >> > rpm -qa|grep -I openssl
> >
> > > > >> >   freeware.openssl.rte      0.9.6.12  COMMITTED  Openssl 0.9.6l
> > > > >> (0.9.6.12)
> > > > >> >   openssl.base            0.9.8.1801  COMMITTED  Open Secure
> Socket
> > > > >> Layer
> > > > >> >   openssl.license         0.9.8.1801  COMMITTED  Open Secure
> Socket
> > > > >> License
> > > > >> >   openssl.man.en_US       0.9.8.1801  COMMITTED  Open Secure
> Socket
> > > > >> Layer
> > > > >> >   openssl.base            0.9.8.1801  COMMITTED  Open Secure
> Socket
> > > > >> Layer
> >
> > > > >> > openssl version
> >
> > > > >> > OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011
> >
> > > > >> > Anyone come across this issue or have any suggestions?
> >
> > > > >> > Thanks!
>

Reply via email to