__init__.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:lokey 作者: jpf 项目源码 文件源码
def tls(ctx, domain_name):
    """Get the TLS certificate for a domain.

    Example:

        $ lokey fetch tls gliderlabs.com
    """
    try:
        cert = stdlib_ssl.get_server_certificate((domain_name, 443))
        click.echo(cert)
    except:
        msg =("Unable to fetch key from {}, "
              "is that domain configured for TLS?").format(domain_name)
        raise click.ClickException(msg)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号