Rewind the file before trying to use PEM_read_RSA_PUBKEY().