userauth.c: fread() from public key file to correctly detect any errors
userauth.c: fread() from public key file to correctly detect any errors

If the filename parameter for file_read_publickey() was the name of a
directory instead of a file then libssh2 would spin trying to fgetc()
from the FILE * for the opened directory when trying to determine the
length of the encoded public key, since fgetc() can't report errors.

Use fread() instead to correctly detect this error condition along
with many others.

This fixes the problem reported in
http://www.libssh2.org/mail/libssh2-devel-archive-2012-04/0021.shtml

Reported-by: Oleksiy Zagorskyi <e11abb0f240d878b6dbff44883d7881cde54a8d4@i.ua>

libssh2/libssh2,libssh2/libssh2,libssh2/libssh2,libssh2/libssh2