获取有关ssl证书的所有信息。

certifier的Python项目详细描述


certifier证明人

PyPi VersionDownloads

certifier是一个apache许可的python库,允许您获取有关ssl证书的所有信息。这个库已经用Python2.7.x和Python3.6+进行了测试。

安装:

源代码使用

	$ python setup.py install

或者从pypi安装

	$ pip install certifier

文档:

>>>fromcertifierimportCertInfo>>>cert=CertInfo('example.com',443)>>>cert.info([binary_form]){'subject':((('countryName','US'),),(('stateOrProvinceName','California'),),(('localityName','Los Angeles'),),(('organizationName','Internet Corporation for Assigned Names and Numbers'),),(('organizationalUnitName','Technology'),),(('commonName','www.example.org'),)),'issuer':((('countryName','US'),),(('organizationName','DigiCert Inc'),),(('commonName','DigiCert SHA2 Secure Server CA'),)),'version':3,'serialNumber':'0FD078DD48F1A2BD4D0F2BA96B6038FE','notBefore':'Nov 28 00:00:00 2018 GMT','notAfter':'Dec  2 12:00:00 2020 GMT','subjectAltName':(('DNS','www.example.org'),('DNS','example.com'),('DNS','example.edu'),('DNS','example.net'),('DNS','example.org'),('DNS','www.example.com'),('DNS','www.example.edu'),('DNS','www.example.net')),'OCSP':('http://ocsp.digicert.com',),'caIssuers':('http://cacerts.digicert.com/DigiCertSHA2SecureServerCA.crt',),'crlDistributionPoints':('http://crl3.digicert.com/ssca-sha2-g6.crl','http://crl4.digicert.com/ssca-sha2-g6.crl')}
>>>cert.expire([format])'Nov 13 12:00:00 2020 GMT'
>>>cert.protocol()u'TLSv1.2'
>>>cert.cipher()('ECDHE-RSA-AES128-GCM-SHA256','TLSv1/SSLv3',128)
>>>cert.default_paths()DefaultVerifyPaths(cafile='/usr/local/etc/openssl/cert.pem',capath='/usr/local/etc/openssl/certs',openssl_cafile_env='SSL_CERT_FILE',openssl_cafile='/usr/local/etc/openssl/cert.pem',openssl_capath_env='SSL_CERT_DIR',openssl_capath='/usr/local/etc/openssl/certs')
>>>cert.cert_stats(){'x509':179,'crl':0,'x509_ca':179}
>>>cert.ca_certs([binary_form])[{'notBefore':u'Apr 16 07:09:14 2007 GMT','serialNumber':u'49330001','notAfter':'Apr 16 07:09:14 2027 GMT','version':3L,'subject':((('countryName',u'CN'),),(('organizationName',u'CNNIC'),),(('commonName',u'CNNIC ROOT'),)),'issuer':((('countryName',u'CN'),),(('organizationName',u'CNNIC'),),(('commonName',u'CNNIC ROOT'),))},{[...]}]
>>>cert.openssl_version()OpenSSL1.0.2s28May2019
>>>cert.session_stats(){'connect_renegotiate':0L,'hits':0L,'accept_good':0L,'cache_full':0L,'accept_renegotiate':0L,'timeouts':0L,'number':0L,'accept':0L,'connect_good':2L,'connect':2L,'misses':0L}

许可证:

Copyright 2015-2019 Martin Simon

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

给我买杯咖啡?

如果你想给我买杯咖啡(或啤酒?),欢迎捐赠:

BTC : 1BNFXHPNRtg7LrLUmQWwPUwzoicUi3uP8Q
ETH : 0xd061B7dD794F6EB357bf132172ce06D1B0E5b97B
BCH : qpcmv8vstulfhgdf29fd8sf2g769sszscvaktty2rv

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java测试访问令牌过滤器   close()上的java Apache POI运行时异常   java为什么Eclipse中的GWT总是显示错误404?   java从socket python服务器接收消息   java mediaRecorder:start()函数失败   不关闭DB连接可能是Tomcat上Java堆溢出的原因吗?   java JFrame无法关闭   java BigQuery加载本地文件不起作用,位置有问题   java可以在递归任务中使用吗?   servlets如何从JSESSIONID加载Java HttpSession?   java将JFileChooser与PDFBox一起使用时,文件不会另存为pdf,但保存时不带扩展名   java将处理结果存储在表中   java算法发现循环世界中重叠间隔的持续时间(24小时)   在windows 10上双击Eclipse安装程序可执行文件(eclipseinstjrewin64.exe)后,java不会发生任何事情   java编译和部署自定义Solr请求处理程序   Java/Android崩溃ApacheCommonsio2。4.jar   spring web应用程序中的java集成收件箱功能   java Grizzly、Jersey和Spring自动布线问题   java如何在pom中添加jar文件依赖项。xml   关于Android中大量GUI更新编码的java概念(GUI处理程序)