PHP - 如何使用Curl与Kerberos [英] PHP - How to use Curl with Kerberos

查看:581
本文介绍了PHP - 如何使用Curl与Kerberos的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用curl做一些操作,但是我要工作的网站使用Kerberos身份验证。因此,我必须启用默认禁用curl的SPNEGO函数。

I'm trying to do some operation with curl, but the website where I have to work uses Kerberos authentication. Consequently I have to enable the SPNEGO function of curl which is disabled by default.

这是从我的phpinfo的提取:

This is the extract from my phpinfo:

cURL support    enabled
cURL Information    7.19.7
Age 3
Features
AsynchDNS   No
Debug   No
GSS-Negotiate   Yes
IDN Yes
IPv6    Yes
Largefile   Yes
NTLM    Yes
SPNEGO  No
SSL Yes
SSPI    No
krb4    No
libz    Yes
CharConv    No
Protocols   tftp, ftp, telnet, dict, ldap, ldaps, http, file, https, ftps, scp, sftp
Host    x86_64-redhat-linux-gnu
SSL Version NSS/3.13.1.0
ZLib Version    1.2.3
libSSH Version  libssh2/1.2.2

我如何做到这一点?

推荐答案

补丁micheal正在谈论一点编码(改变卷曲源代码)。如果你不想这样做,使用fbopenssl库和链接curl反对。之后

The patch micheal is talking about a bit of coding(changing curl source code). In the event you do not wish to do that use fbopenssl library and link curl against that. After that

SPNEGO是

将成为帮助版本中的标志。

will be a flag in the help version.

请注意,您的curl版本不支持keytab,用户名密码验证或凭据缓存模式。如果你想使用我的fork的curl(这一个dosent有Micheal的补丁虽然): -

Please note that your curl version will not support keytabs, username password authentication or credential cache modes. If you want that use my fork of curl(this one dosent have Micheal's patch though):-

github.com/Khalian/CURL

这篇关于PHP - 如何使用Curl与Kerberos的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆