dounue1965 2012-10-13 00:35
浏览 33

php / perl或其他能够对启用SmartCard的网站进行自动身份验证的Web脚本

I have a php script that goes to a rss feed url and pulls down the xml, processes it and then loads the data I need into a database. The script has been working flawlessly, until the site owners secured it using smartcard authentication(Military CAC).

I've been trying to figure out a way to take my x.509 cert from my smartcard and present it via php or any other scripting language to the webserver hosting the rss. I can't see to figure this out.

Concept of operations: 1. Request rss url 2. rss url requests authentication 3. present cert + pin(I'll store the pin securely for the script to use, I know how to do this) 4. rss url authenticates my cert and posts the data.

Thanks! -Dan

  • 写回答

1条回答 默认 最新

  • donglu0494 2012-10-15 16:53
    关注

    In PHP would this work (using phpseclib, a pure-PHP X.509 implementation)?:

    <?php
    include('File/X509.php');
    
    $x509 = new File_X509();
    $cert = $x509->loadX509('...');
    echo $x509->validateSignature() ? 'valid' : 'invalid';
    ?>
    

    Other things you could validate against are listed below:

    http://phpseclib.sourceforge.net/x509/examples.html#validate

    评论

报告相同问题?

悬赏问题

  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制