Set up secure data connection.
(self)
| 744 | return resp |
| 745 | |
| 746 | def prot_p(self): |
| 747 | '''Set up secure data connection.''' |
| 748 | # PROT defines whether or not the data channel is to be protected. |
| 749 | # Though RFC-2228 defines four possible protection levels, |
| 750 | # RFC-4217 only recommends two, Clear and Private. |
| 751 | # Clear (PROT C) means that no security is to be used on the |
| 752 | # data-channel, Private (PROT P) means that the data-channel |
| 753 | # should be protected by TLS. |
| 754 | # PBSZ command MUST still be issued, but must have a parameter of |
| 755 | # '0' to indicate that no buffering is taking place and the data |
| 756 | # connection should not be encapsulated. |
| 757 | self.voidcmd('PBSZ 0') |
| 758 | resp = self.voidcmd('PROT P') |
| 759 | self._prot_p = True |
| 760 | return resp |
| 761 | |
| 762 | def prot_c(self): |
| 763 | '''Set up clear text data connection.''' |