HDFS-7138. Fix hftp to work with encryption. (clamb via wang)