Hi all, I've created a method to generate ECDH Key, based on ecdhtest.c, available at /openssl/test directory. But I'm facing some trouble to compile it. I've inserted the following code in the begining of the file, acording ecdhtest.c, >static const int KDF1_SHA1_len = 20; >static void *KDF1_SHA1(const void *in, size_t inlen, void *out, size_t *outlen) >{ >#ifndef OPENSSL_NO_SHA > if (*outlen < SHA_DIGEST_LENGTH) > return NULL; > else > *outlen = SHA_DIGEST_LENGTH; > return SHA1(in, inlen, out); >#else > return NULL; >#endif >} in order to use the ECDH method: >out=ECDH_compute_key(buf,len,EC_KEY_get0_public_key(public_key),ec_key,KDF1_SHA1); When I compile it, the following messages appear. >aodv/aodv.cc: In function void* KDF1_SHA1(const void*, size_t, void*, size_t*): >aodv/aodv.cc:52: error: invalid conversion from const void* to const unsigned char* >aodv/aodv.cc:52: error: initializing argument 1 of unsigned char* SHA1(const unsigned char*, size_t, unsigned char*) >aodv/aodv.cc:52: error: invalid conversion from void* to unsigned char* >aodv/aodv.cc:52: error: initializing argument 3 of unsigned char* SHA1(const unsigned char*, size_t, unsigned char*)
I've already looked for the SHA1 constructor, and I don't know what is going wrong. Has anybody already faced this problem? if not, could you give me some tips in order to solve this problem? Thanks. Alexandre Gava Menezes NPD/UFSC ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]