If you get the following error when trying to compile
rtmpdump:
Code:
gcc -Wall -DRTMPDUMP_VERSION=\"v2.2e\" -DUSE_OPENSSL -O2 -c -o rtmp.o rtmp.c
rtmp.c:39:25: error: openssl/ssl.h: No such file or directory
rtmp.c:40:25: error: openssl/rc4.h: No such file or directory
rtmp.c:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from rtmp.c:125:
handshake.h:60:25: error: openssl/sha.h: No such file or directory
handshake.h:61:26: error: openssl/hmac.h: No such file or directory
handshake.h:64:2: error: #error Your OpenSSL is too old, need 0.9.8 or newer with SHA256
In file included from rtmp.c:125:
handshake.h:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from handshake.h:79,
from rtmp.c:125:
dh.h:124:24: error: openssl/bn.h: No such file or directory
dh.h:125:24: error: openssl/dh.h: No such file or directory
In file included from handshake.h:79,
from rtmp.c:125:
dh.h:127: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from handshake.h:79,
from rtmp.c:125:
dh.h:154: error: expected ‘)’ before ‘y’
dh.h:204: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
dh.h:237: error: expected ‘)’ before ‘*’ token
dh.h:271: error: expected ‘)’ before ‘*’ token
dh.h:307: error: expected ‘)’ before ‘*’ token
In file included from rtmp.c:125:
handshake.h:109: error: expected declaration specifiers or ‘...’ before ‘RC4_handle’
handshake.h:109: error: expected declaration specifiers or ‘...’ before ‘RC4_handle’
handshake.h: In function ‘InitRC4Encryption’:
handshake.h:111: error: ‘SHA256_DIGEST_LENGTH’ undeclared (first use in this function)
handshake.h:111: error: (Each undeclared identifier is reported only once
handshake.h:111: error: for each function it appears in.)
handshake.h:113: error: ‘HMAC_CTX’ undeclared (first use in this function)
handshake.h:113: error: expected ‘;’ before ‘ctx’
handshake.h:115: error: ‘rc4keyIn’ undeclared (first use in this function)
handshake.h:115: error: ‘RC4_KEY’ undeclared (first use in this function)
handshake.h:116: error: ‘rc4keyOut’ undeclared (first use in this function)
handshake.h:118: warning: implicit declaration of function ‘HMAC_CTX_init’
handshake.h:118: error: ‘ctx’ undeclared (first use in this function)
handshake.h:118: warning: implicit declaration of function ‘HMAC_Init_ex’
handshake.h:118: warning: implicit declaration of function ‘EVP_sha256’
handshake.h:119: warning: implicit declaration of function ‘HMAC_Update’
handshake.h:120: warning: implicit declaration of function ‘HMAC_Final’
handshake.h:120: warning: implicit declaration of function ‘HMAC_CTX_cleanup’
handshake.h:125: warning: implicit declaration of function ‘RC4_set_key’
handshake.h:111: warning: unused variable ‘digest’
handshake.h: In function ‘HMACsha256’:
handshake.h:262: error: ‘HMAC_CTX’ undeclared (first use in this function)
handshake.h:262: error: expected ‘;’ before ‘ctx’
handshake.h:264: error: ‘ctx’ undeclared (first use in this function)
handshake.h: In function ‘CalculateDigest’:
handshake.h:275: error: ‘SHA256_DIGEST_LENGTH’ undeclared (first use in this function)
handshake.h:276: warning: unused variable ‘message’
handshake.h: In function ‘VerifyDigest’:
handshake.h:290: error: ‘SHA256_DIGEST_LENGTH’ undeclared (first use in this function)
handshake.h:290: warning: unused variable ‘calcDigest’
handshake.h: In function ‘HandShake’:
handshake.h:365: error: ‘RC4_handle’ undeclared (first use in this function)
handshake.h:365: error: expected ‘;’ before ‘keyIn’
handshake.h:366: error: expected ‘;’ before ‘keyOut’
handshake.h:434: warning: implicit declaration of function ‘DHInit’
handshake.h:434: warning: assignment makes pointer from integer without a cast
handshake.h:445: warning: implicit declaration of function ‘DHGenerateKey’
handshake.h:452: warning: implicit declaration of function ‘DHGetPublicKey’
handshake.h:468: error: ‘SHA256_DIGEST_LENGTH’ undeclared (first use in this function)
In file included from rtmp.c:125:
handshake.h:555: warning: implicit declaration of function ‘DHComputeSharedSecretKey’
handshake.h:569: error: ‘keyIn’ undeclared (first use in this function)
handshake.h:569: error: ‘keyOut’ undeclared (first use in this function)
handshake.h:569: error: too many arguments to function ‘InitRC4Encryption’
handshake.h:509: warning: unused variable ‘digestResp’
handshake.h:715: warning: implicit declaration of function ‘RC4’
handshake.h:647: warning: unused variable ‘digest’
handshake.h:646: warning: unused variable ‘signature’
handshake.h: In function ‘SHandShake’:
handshake.h:743: error: ‘RC4_handle’ undeclared (first use in this function)
handshake.h:743: error: expected ‘;’ before ‘keyIn’
handshake.h:744: error: expected ‘;’ before ‘keyOut’
handshake.h:826: warning: assignment makes pointer from integer without a cast
handshake.h:861: error: ‘SHA256_DIGEST_LENGTH’ undeclared (first use in this function)
handshake.h:943: error: ‘keyIn’ undeclared (first use in this function)
handshake.h:943: error: ‘keyOut’ undeclared (first use in this function)
handshake.h:943: error: too many arguments to function ‘InitRC4Encryption’
handshake.h:880: warning: unused variable ‘digestResp’
handshake.h:1009: warning: unused variable ‘digest’
handshake.h:1008: warning: unused variable ‘signature’
rtmp.c: In function ‘RTMP_TLS_Init’:
rtmp.c:218: warning: implicit declaration of function ‘SSL_load_error_strings’
rtmp.c:219: warning: implicit declaration of function ‘SSL_library_init’
rtmp.c:220: warning: implicit declaration of function ‘OpenSSL_add_all_digests’
rtmp.c:221: error: ‘RTMP_TLS_ctx’ undeclared (first use in this function)
rtmp.c:221: warning: implicit declaration of function ‘SSL_CTX_new’
rtmp.c:221: warning: implicit declaration of function ‘SSLv23_method’
rtmp.c:222: warning: implicit declaration of function ‘SSL_CTX_set_options’
rtmp.c:222: error: ‘SSL_OP_ALL’ undeclared (first use in this function)
rtmp.c:223: warning: implicit declaration of function ‘SSL_CTX_set_default_verify_paths’
rtmp.c: In function ‘RTMP_Init’:
rtmp.c:244: error: ‘RTMP_TLS_ctx’ undeclared (first use in this function)
rtmp.c: In function ‘RTMP_Connect1’:
rtmp.c:827: warning: implicit declaration of function ‘SSL_new’
rtmp.c:827: error: ‘RTMP_TLS_ctx’ undeclared (first use in this function)
rtmp.c:828: warning: implicit declaration of function ‘SSL_set_fd’
rtmp.c:829: warning: implicit declaration of function ‘SSL_connect’
rtmp.c: In function ‘RTMP_Close’:
rtmp.c:3382: warning: implicit declaration of function ‘DH_free’
rtmp.c: In function ‘RTMPSockBuf_Fill’:
rtmp.c:3412: warning: implicit declaration of function ‘SSL_read’
rtmp.c: In function ‘RTMPSockBuf_Send’:
rtmp.c:3455: warning: implicit declaration of function ‘SSL_write’
rtmp.c: In function ‘RTMPSockBuf_Close’:
rtmp.c:3471: warning: implicit declaration of function ‘SSL_shutdown’
rtmp.c:3472: warning: implicit declaration of function ‘SSL_free’
make[1]: *** [rtmp.o] Error 1
make[1]: Exit directory `/home/alex/Downloads/rtmpdump/librtmp'
make: *** [librtmp/librtmp.a] Error 2
Install libssl-dev
Code:
sudo apt-get install libssl-dev