Check return value of EVP_* functions, and check if length before en/decryption