Trying to run cryptography example from.open ssl wikihttps://wiki.openssl.org/images/1/17/Evp-symmetric-encrypt.c
/usr/bin/ld: /tmp/cc9IFOtb.o: in function `main':
main.c:(.text+0xb2): undefined reference to `BIO_dump_fp'
/usr/bin/ld: /tmp/cc9IFOtb.o: in function `handleErrors':
main.c:(.text+0x145): undefined reference to `ERR_print_errors_fp'
I added the header for BIO_dump_fp explicitly
I'm assuming it was already included by one of the other headers.
Is this because the functions are BSD? Is there a way to make this work?
Can you just replace these functions with something standard?
It looks to me that BIO_dump_fp() takes a standard input and some character string and length. You could invent your own dump function that prints given amount of characters on the standard output.
Same for ERR_print_errors_fp(), replace it with something else, that has a similar purpose: print the error (check errno, or just print "cryptography error" for now, and you can fix it later after everything else works).