作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在我的一个 PHP 应用程序上启用了 Azure 登录,并按照以下文档使用 cUrl 启用此功能 https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow
直到几天前,当我请求 token 时收到授权码后,它才工作正常,即 https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token
我收到返回错误
{"error":"invalid_request","error_description":"AADSTS1002016: You are using TLS version 1.0, 1.1 and/or 3DES cipher which are deprecated to improve the security posture of Azure AD. Your TenantID is: {tenant_id}. Please refer to https://go.microsoft.com/fwlink/?linkid=2161187 and conduct needed actions to remediate the issue. For further questions, please contact your administrator."}
已在应用服务器上禁用 tls1 和 1.0 以及 3DES 密码。负载均衡器上的配置也相同。
我的/etc/httpd/conf.d/ssl.conf包含以下内容
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5:!DES:!3DES
SSLHonorCipherOrder on
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
最佳答案
需要强制curl才能使用tls1.2
curl --tlsv1.2 {...REST_OF_CURL}
PHP 代码
$chwnd = curl_init();
curl_setopt ($chwnd, CURLOPT_SSLVERSION, 6);
curl_exec($chwnd);
关于php - AADSTS1002016 : You are using TLS version 1. 0、1.1 和/或 3DES 密码已弃用,以改善 Azure AD 的安全状况,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73283734/
我是一名优秀的程序员,十分优秀!