Re: Linux build problem.

From: Imran Khan <imran_k01_at_DOMAIN_REMOVED>
Date: Tue, 23 Aug 2005 21:35:59 -0700 (PDT)

I see plenty of these in the debug log file:
 
[24-Aug-2005 00:29:38] DEBUG: Received SNMP trap .1.3.6.1.4.1.5562 from 209.82.49.48
[24-Aug-2005 00:29:38] DEBUG: Received SNMP trap .1.3.6.1.4.1.5562 from 209.82.49.48
[24-Aug-2005 00:29:38] DEBUG: Received SNMP trap .1.3.6.1.4.1.5562 from 209.82.49.48
[24-Aug-2005 00:29:38] DEBUG: Received SNMP trap .1.3.6.1.4.1.5562 from 209.82.49.48

 
But I don't see any traps in the Alarm viewer or NetXMS console on the client side, as you can see though it is getting late, I must sleep.
 
I am mainly interested in this software for the purpose of a nice Trapviewer. In addition, I require good logging feature to keep track of all traps that occured over time. Are these features supported and/or planned for?
 
Cheers,
 
Imran

Imran Khan <imran_k01_at_yahoo.com> wrote:
openssl version
OpenSSL 0.9.6b [engine] 9 Jul 2001

I've manually edited the file and now I am able to build the server and fire it up.
 
Still trying to get the trap viewer to work tho!
 
Cheers,
 
Imran

Alex Kirhenshtein <alk_at_undernet.lv> wrote:
Hello.

small patch attached, should solve this problem.
for further investigation, can you send me output of "openssl version"?

Imran Khan wrote:
> Hi All,
>
> Looking forward to trying out this software, I am trying to build on
> linux, but I get the following error:
>
> g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -fno-exceptions
> -I/usr/local/include -I/usr/kerberos/include -I/usr/local/mysql/include
> -I/usr/local/mysql/include/mysql -I/usr/local/mysql/mysql/include
> -DDATADIR=\"/usr/local/netxms/share/netxms\" -g -O2 -MT crypto.lo -MD
> -MP -MF .deps/crypto.Tpo -c crypto.cpp -fPIC -DPIC -o .libs/crypto.o
> cc1plus: warning: changing search order for system directory
> "/usr/local/include"
> cc1plus: warning: as it has already been specified as a non-system
> directory
> crypto.cpp:86: invalid conversion from `EVP_CIPHER*(*)()' to `const
> EVP_CIPHER*(*)()'
> crypto.cpp:86: invalid conversion from `EVP_CIPHER*(*)()' to `const
> EVP_CIPHER*(*)()'

looks like you have old(redhat-specific?) openssl library.
check /usr/include/opessl/evp.h for
EVP_aes_256_cbc/EVP_bf_cbc/EVP_idea_cbc/EVP_des_ede3_cbc declaration, it
should look like
-- cut --
const EVP_CIPHER *EVP_aes_256_cbc(void);
-- cut --

anyway, as temporary solution, you can change line 63 in file crypto.cpp
from
-- cut --
typedef const EVP_CIPHER * (*CIPHER_FUNC)(void);
-- cut --
to
-- cut --
typedef EVP_CIPHER * (*CIPHER_FUNC)(void);
-- cut --

> crypto.cpp: In function `DWORD SetupEncryptionContext(CSCPMessage*,
> CSCP_ENCRYPTION_CONTEXT**, CSCPMessage**, RSA*)':
> crypto.cpp:301: invalid conversion from `const BYTE**' to `unsigned char**'
> crypto.cpp: In function `RSA* LoadRSAKeys(char*)':
> crypto.cpp:436: invalid conversion from `const BYTE**' to `unsigned char**'
> crypto.cpp:440: invalid conversion from `const BYTE**' to `unsigned char**'

strange, i'll check it a bit later.
replace "const BYTE **" with "unsigned char **" in lines 436 and 440

> make[3]: *** [crypto.lo] Error 1
> make[3]: Leaving directory
> `/opt/redknee/home/rkadm/imran/netxms-0.2.4/src/libnxcscp'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/opt/redknee/home/rkadm/imran/netxms-0.2.4/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/opt/redknee/home/rkadm/imran/netxms-0.2.4'
> make: *** [all] Error 2
> Below is the compiler version, I'm working on a redhat linux box. Any
> help appreciated, not sure what else I can add to this, so please let me
> know if u need more info.
>
> Thanks,
>
>
> #g++ -v
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info --enable-shared --enable-threads=posix
> --disable-checking --host=i386-redhat-linux --with-system-zlib
> --enable-__cxa_atexit
> Thread model: posix
> gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
Index: crypto.cpp
===================================================================
RCS file: /cvs/nms/src/libnxcscp/crypto.cpp,v
retrieving revision 1.8
diff -u -u -r1.8 crypto.cpp
--- crypto.cpp 17 Aug 2005 12:09:25 -0000 1.8
+++ crypto.cpp 24 Aug 2005 00:00:05 -0000
@@ -60,7 +60,7 @@

#ifdef _WITH_ENCRYPTION

-typedef const EVP_CIPHER * (*CIPHER_FUNC)(void);
+typedef EVP_CIPHER * (*CIPHER_FUNC)(void);
static CIPHER_FUNC m_pfCipherList[NETXMS_MAX_CIPHERS] =
{
#ifndef OPENSSL_NO_AES
@@ -433,10 +433,10 @@
CalculateSHA1Hash(pKeyBuffer, dwLen, hash2);
if (!memcmp(hash, hash2, SHA1_DIGEST_SIZE))
{
- pKey = d2i_RSAPublicKey(NULL, (const BYTE **)&pBufPos, dwLen);
+ pKey = d2i_RSAPublicKey(NULL, (unsigned char**)&pBufPos, dwLen);
if (pKey != NULL)
{
- if (d2i_RSAPrivateKey(&pKey, (const BYTE **)&pBufPos,
+ if (d2i_RSAPrivateKey(&pKey, (unsigned char**)&pBufPos,
dwLen - (pBufPos - pKeyBuffer)) == NULL)
{
RSA_free(pKey);

---------------------------------
Yahoo! Mail
Stay connected, organized, and protected. Take the tour
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Received on Wed Aug 24 2005 - 07:35:59 EEST

This archive was generated by hypermail 2.2.0 : Wed Aug 24 2005 - 07:44:37 EEST