Tuesday, 3 September 2013

Python FTP-SSL / FTP-TLS: Verifying Public Certificate?

Python FTP-SSL / FTP-TLS: Verifying Public Certificate?

I'm using Python 2.7.5 (not 3.X) and I need to verify a FTPS (FTP-TLS)
public certificate. That is, I want to verify it against the standard
certificate authority, not a custom key. (Similar to HTTPS.)
I see some options but I cannot get them to work: The FTP_TLS() class
doesn't seem to offer the ability to verify certificates, unless I'm
mistaken: class ftplib.FTP_TLS([host[, user[, passwd[, acct[, keyfile[,
certfile[, timeout]]]]]]])
I've read into the certifi and also M2Crypto, but while I can connect and
transfer using FTP/TLS, I can't seem to find a way to verify the
certificate.
Also, I don't think I will be able to use the CURL libraries in this case
:( Just a note.

No comments:

Post a Comment