Metadata-Version: 2.1
Name: dane-discovery
Version: 0.2
Summary: A library for using DANE for public key discovery.
Home-page: https://github.com/valimail/dane_discovery
Author: Ash Wilson
Author-email: ash.d.wilson@gmail.com
License: BSD
Keywords: dane tlsa dns certificate discovery
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Security
Classifier: License :: OSI Approved :: BSD License
Requires-Dist: dnspython (==2.0.0)
Requires-Dist: cryptography (~=3.0)

==============
dane-discovery
==============


A library for using
`DANE TLSA records <https://tools.ietf.org/html/rfc6698>`_ for
certificate discovery.


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


.. image:: https://circleci.com/gh/ValiMail/dane-discovery.svg?style=shield
    :target: https://circleci.com/gh/ValiMail/dane-discovery


.. image:: https://api.codeclimate.com/v1/badges/ec76c78dc4ac97b4b5f7/maintainability
    :target: https://codeclimate.com/github/ValiMail/dane-discovery/maintainability
    :alt: Maintainability


.. image:: https://api.codeclimate.com/v1/badges/ec76c78dc4ac97b4b5f7/test_coverage
   :target: https://codeclimate.com/github/ValiMail/dane-discovery/test_coverage
   :alt: Test Coverage


Quick Start
===========

Installation
------------

``pip install dane-discovery``


Load a certificate from DNS and print the PEM representation
------------------------------------------------------------

.. code-block:: python

    from dane_discovery.dane import DANE
    dns_name = "dns.name.having.a.tlsa.record"
    tlsa_record = DANE.get_first_leaf_certificate(dns_name)
    if not tlsa_record:
        raise ValueError("No leaf certificate found for {}.".format(dns_name))

    der_cert = DANE.certificate_association_to_der(tlsa_record["certificate_association"])
    print(DANE.der_to_pem(der_cert))


`More examples <https://dane-discovery.readthedocs.io/en/latest/getting_started.html>`_

Changelog
=========


v0.2
----

New
~~~
- Support generating TLSA records for matching type 1, 2. [Ash Wilson]

  Closes #3


v0.1 (2020-08-04)
-----------------

New
~~~
- Add certificate_association_to_der() and der_to_pem() for formatting
  certs from TLSA RRs. [Ash Wilson]




