Fix return type for get_key.
Move encrypt / decrypt stuff to separate functions.  Move main processing loop which is comment to both encrypt / decrypt to it's own function.

Likely we'll pass a function pointer to the main processing function
to have it do the real encryption or decryption though it'll still
do the common IO.
A bit of cleanup and more verbose output.
Fix the return type for iv_read.
Add autoconf macros to check for libssl version 1.0.0, export flags and linker stuff.  Include cflags and libraries for linking the executable.  Add .gitignore rules for new generated files.
Add function pointer type for encrypt / decrypt functions, stubs for the functions themselves and the plumbing to call them as appropriate.
Add an openssl context object to the crypt_data structure.  Initialize it.  Flatten out the call depth a bit by moving the IV initialization stuff back into the main function.

Flattening out the call depth a bit prevents us from having to
make two identical calls to the openssl ctx initialization function.
Select encryption algorithm based on key size.  Make read & write buffers a multiple of the algorithms block size.  Move the buffers to the crypt_data structure.  Move initialization to a dedicated function.