|
FTP协议的分析和扩展(15) 1)Clear (requested by PROT C) 2)Private (requested by PROT P) 在连接过程中通过ftp扩展指令PROT来完成状态的切换。 >>3.3 ssl FTP扩展 在RFC 2228中,ftp协议扩展了如下指令: AUTH (Authentication/Security Mechanism), ADAT (Authentication/Security Data), PROT (Data Channel Protection Level), PBSZ (Protection Buffer Size), CCC (Clear Command Channel), MIC (Integrity Protected Command), CONF (Confidentiality Protected Command), and ENC (Privacy Protected Command). 其中和SSL扩展相关的主要指令有以下几条: AUTH (协商扩展验证): 指定扩展认证方法,SSL或TLS; PBSZ (协商保护缓冲区): 制定保护缓冲区,SSL/TLS模式中必须为0; PROT (切换保护级别): 切换保护级别,可以为"C"无保护,或"P"保护级别; 在一个典型的ftp ssl通讯过程中指令序列如下: /====================================================================\ Client Server control data data control ==================================================================== socket() bind() socket() connect() -------------------------------------------> accept() <------------------------------------------- 220 AUTH TLS -------------------------------------------> <------------------------------------------- 234 TLSneg() <------------------------------------------> TLSneg() PBSZ 0 -------------------------------------------> <------------------------------------------- 200 PROT P ------------------------------------------->
|