Change the order in your gcc command.
gcc -I../include/ rsatest.c -L . -lcrypto -lssl
As far as I know linker has a list of undefined symbols. When it processes libcrypto.a and libssl.a it does not have anything in the list of undefined symbols so he just drops the libraries. Then after processing rsatest it has something in its list but it does not look for symbols in already processed libraries.