How to use a Client Certificate with ftp_ssl_connect

戏子无情 提交于 2019-12-23 01:07:38

问题


I'm looking for the best method to work with an FTP server over an SSL connection. (Generally, pushing a file up as well as getting a list of files on the server). One requirement for this project is that I must use a client side X.509 certificate as part of the authentication process.

Can I use a client certificate using the php function ftp_ssl_connect. If so, how? The only other option I've been able to identify would be using curl to work via FTPS.

Any suggestions or thoughts would be greatly appreciated!


回答1:


You could use PHP's stream context functions which allow setting SSL client certificates. Use the created context with standard functions like fopen.



来源:https://stackoverflow.com/questions/4027712/how-to-use-a-client-certificate-with-ftp-ssl-connect

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!