phptext.net PHPText.Net
PHPText.Net > 文章 > 技术 > WEB开发

php读取证书信息

2017/07/10 11:58
134人阅读
这些都是php自带函数echo $_SERVER[ "CERT_FLAGS "] " "; 使用证书的标识,1或0echo $_SERVER[ "CERT_ISSUER "] " "; 颁发机构echo $_SERV R[ "CERT_SERIALNUMBER "] " "; 序列号echo $_SERVER[ "CERT_SUBJECT "] "
 

这些都是php自带函数

echo $_SERVER["CERT_FLAGS"]."";//使用证书的标识,1或0
echo $_SERVER["CERT_ISSUER"]."";//颁发机构
echo $_SERV R["CERT_SERIALNUMBER"]."";//序列号
echo $_SERVER["CERT_SUBJECT"]."";//主题
echo $_SERVER["HTTPS"]."";//https开关,on或off
echo $_SERVER["HTTPS_KEYSIZE"]."";//密钥长度,128
echo $_SERVER["HTTPS_SECRETKEYSIZE"]."";//加密强度,1024
echo $_SERVER["HTTPS_SERVER_ISSUER"]."";//服务器证书颁发机构
echo $_SERVER["HTTPS_SERVER_SUBJECT"]."";//服务器证书主题