Hi @rohitpaulk
I know I emailed you concerning the issue of using OpenSSL library for stage 6 of the bitTorrent client. I got the response that this has been updated, however, I still seem to be getting the error. Could it be something else? Can anyone perhaps help me here?
It says undefined reference to SHA1 (OpenSSL). I am compiling with -lcrypto and included openssl.h in my code. Here is a screenshot of compiling locally, but it seems to fail when I test.
I was able to come to this conclusion because I commented out the use of SHA1() function in my code, and it complied successfully when I tested. But of course, the results were wrong, since I didnt actually hash.
char *bencoded_info = bencode(info);
size_t length = strlen(bencoded_info);
// using sha1 hash
unsigned char *hash = malloc(SHA_DIGEST_LENGTH);
// SHA1((unsigned char*)bencoded_info, length, hash);
I can provide more snippets if needed, please let me know