V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
xiaoqpy
V2EX  ›  Python

爬虫 Linux 怎么导入客户端证书呢?

  •  
  •   xiaoqpy · 2018-09-17 20:53:38 +08:00 · 1594 次点击
    这是一个创建于 2019 天前的主题,其中的信息可能已经有所发展或是发生改变。
    做一个京东的商家后台管理系统的爬虫,第一次登录需要接收手机验证码后下载证书,这个证书是用于校验客户端的,在 Windows 下安装成功,也可以在证书管理那里导出,但是如何安装到 linux 上呢?现在登录程序都做好了,就差导入这个客户端证书到 linux 中了。查到说是添加到 /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem ,试了,不好使。系统是 centos7,望各位大佬不吝赐教。
    3 条回复    2018-09-17 21:54:24 +08:00
    xiaoqpy
        1
    xiaoqpy  
    OP
       2018-09-17 21:05:42 +08:00   ❤️ 1
    Firxiao
        2
    Firxiao  
       2018-09-17 21:08:04 +08:00 via iPhone   ❤️ 1
    # rhel 安装自制证书
    cp *.crt /etc/pki/ca-trust/source/anchors/

    update-ca-trust
    wdlth
        3
    wdlth  
       2018-09-17 21:54:24 +08:00
    直接在爬虫请求代码里加上也可以吧。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2750 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 12:14 · PVG 20:14 · LAX 05:14 · JFK 08:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.