sslkeylog


Namesslkeylog JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/segevfiner/sslkeylog
SummaryLog SSL/TLS keys for decrypting SSL/TLS connections
upload_time2023-10-14 18:20:46
maintainer
docs_urlNone
authorSegev Finer
requires_python
licenseMIT
keywords ssl tls sslkeylogfile
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            sslkeylog
=========

.. image:: https://img.shields.io/pypi/v/sslkeylog.svg
   :target: https://pypi.org/project/sslkeylog/
   :alt: PyPI

.. image:: https://readthedocs.org/projects/sslkeylog/badge/?version=latest
   :target: https://sslkeylog.readthedocs.io/en/latest/?badge=latest
   :alt: Documentation Status

.. image:: https://github.com/segevfiner/sslkeylog/actions/workflows/build-and-test.yml/badge.svg
   :target: https://github.com/segevfiner/sslkeylog/actions/workflows/build-and-test.yml
   :alt: Build & Test Status

This is an implementation of the ``SSLKEYLOGFILE`` facility, available in Firefox and
Chromium/Google Chrome, that is supported by Wireshark in order to decrypt SSL/TLS connections
even when you don't have the private key, or when using key exchange methods that will prevent
decryption even if you do (Such as Diffie-Hellman).

This is for the standard library ``ssl`` module, it won't work for other ssl modules.

**Note:**
   Python 3.8+ includes built-in support for generating an SSL key log file via
   ``ssl.SSLContext.keylog_filename``, and will also enable it when the ``SSLKEYLOGFILE``
   environment variable is set when creating a context via ``ssl.create_default_context``.

   This package uses the same callback the built-in implementation is using, which will likely cause
   both implementations to trample each other, causing the other not to work, or other unintended
   consequences. As such, you should probably not enable both at the same time.

Quick Start
-----------
.. code-block:: python

    import os
    import sslkeylog

    sslkeylog.set_keylog(os.environ.get('SSLKEYLOGFILE'))  # Or directly specify a path

    # Do anything involving SSL (Using the built-in ssl module)

Set the ``SSLKEYLOGFILE`` environment variable if you use it, and set "(Pre)-Master-Secret log
filename" in Wireshark's SSL protocol preferences to the resulting file.

Links
-----
* `NSS Key Log Format`_
* `Wireshark - SSL`_

.. _NSS Key Log Format: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format
.. _Wireshark - SSL: https://wiki.wireshark.org/SSL

License
-------
MIT License, except OpenSSL which is licensed under it's own license. See LICENSE.txt

This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/segevfiner/sslkeylog",
    "name": "sslkeylog",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "ssl tls sslkeylogfile",
    "author": "Segev Finer",
    "author_email": "segev208@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/72/5a/2f46d6507a903ed0481191fd76ac8650717e5d04375bc11cf31310339a0d/sslkeylog-0.5.0.tar.gz",
    "platform": null,
    "description": "sslkeylog\r\n=========\r\n\r\n.. image:: https://img.shields.io/pypi/v/sslkeylog.svg\r\n   :target: https://pypi.org/project/sslkeylog/\r\n   :alt: PyPI\r\n\r\n.. image:: https://readthedocs.org/projects/sslkeylog/badge/?version=latest\r\n   :target: https://sslkeylog.readthedocs.io/en/latest/?badge=latest\r\n   :alt: Documentation Status\r\n\r\n.. image:: https://github.com/segevfiner/sslkeylog/actions/workflows/build-and-test.yml/badge.svg\r\n   :target: https://github.com/segevfiner/sslkeylog/actions/workflows/build-and-test.yml\r\n   :alt: Build & Test Status\r\n\r\nThis is an implementation of the ``SSLKEYLOGFILE`` facility, available in Firefox and\r\nChromium/Google Chrome, that is supported by Wireshark in order to decrypt SSL/TLS connections\r\neven when you don't have the private key, or when using key exchange methods that will prevent\r\ndecryption even if you do (Such as Diffie-Hellman).\r\n\r\nThis is for the standard library ``ssl`` module, it won't work for other ssl modules.\r\n\r\n**Note:**\r\n   Python 3.8+ includes built-in support for generating an SSL key log file via\r\n   ``ssl.SSLContext.keylog_filename``, and will also enable it when the ``SSLKEYLOGFILE``\r\n   environment variable is set when creating a context via ``ssl.create_default_context``.\r\n\r\n   This package uses the same callback the built-in implementation is using, which will likely cause\r\n   both implementations to trample each other, causing the other not to work, or other unintended\r\n   consequences. As such, you should probably not enable both at the same time.\r\n\r\nQuick Start\r\n-----------\r\n.. code-block:: python\r\n\r\n    import os\r\n    import sslkeylog\r\n\r\n    sslkeylog.set_keylog(os.environ.get('SSLKEYLOGFILE'))  # Or directly specify a path\r\n\r\n    # Do anything involving SSL (Using the built-in ssl module)\r\n\r\nSet the ``SSLKEYLOGFILE`` environment variable if you use it, and set \"(Pre)-Master-Secret log\r\nfilename\" in Wireshark's SSL protocol preferences to the resulting file.\r\n\r\nLinks\r\n-----\r\n* `NSS Key Log Format`_\r\n* `Wireshark - SSL`_\r\n\r\n.. _NSS Key Log Format: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format\r\n.. _Wireshark - SSL: https://wiki.wireshark.org/SSL\r\n\r\nLicense\r\n-------\r\nMIT License, except OpenSSL which is licensed under it's own license. See LICENSE.txt\r\n\r\nThis product includes software developed by the OpenSSL Project\r\nfor use in the OpenSSL Toolkit (http://www.openssl.org/)\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Log SSL/TLS keys for decrypting SSL/TLS connections",
    "version": "0.5.0",
    "project_urls": {
        "Documentation": "https://sslkeylog.readthedocs.io/",
        "Homepage": "https://github.com/segevfiner/sslkeylog",
        "Issue Tracker": "https://github.com/segevfiner/sslkeylog/issues"
    },
    "split_keywords": [
        "ssl",
        "tls",
        "sslkeylogfile"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "725a2f46d6507a903ed0481191fd76ac8650717e5d04375bc11cf31310339a0d",
                "md5": "f40ac91fcd5216d4f300a22c5518532b",
                "sha256": "0dde7420f64957b249cbe9d8632af31435809040454ccded74892bbee38ec843"
            },
            "downloads": -1,
            "filename": "sslkeylog-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f40ac91fcd5216d4f300a22c5518532b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5566408,
            "upload_time": "2023-10-14T18:20:46",
            "upload_time_iso_8601": "2023-10-14T18:20:46.770680Z",
            "url": "https://files.pythonhosted.org/packages/72/5a/2f46d6507a903ed0481191fd76ac8650717e5d04375bc11cf31310339a0d/sslkeylog-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-14 18:20:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "segevfiner",
    "github_project": "sslkeylog",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "sslkeylog"
}
        
Elapsed time: 0.12901s