Fixed to compile with latest version of rust

Changed all instances of fail! to panic!

Fixed errors related to openssl-rust

Fixed things caused by enum changes