Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use tls socket to retrieve distinguished name #21

Merged

Commits on Apr 27, 2022

  1. Use tls socket to retrieve distinguished name

    Previously, it was possible to get DN using dn_callback passed to
    credentials object. This callback is invoked on every handshake (if
    'client_auth' is set to true) and accepts two parameters, subject and
    issuer. But there is no way for the user of the tls library to connect
    particular client connection with the DN string.
    
    This commit adds a 'get_distinguished_name' method to connected socket
    interface. This commit can be used to wait on a future that returns a
    distinguished name or nullopt after a handshake. The handshake is
    performed asynchrnously. Because of that the retrieval of the DN string
    should also be asynchronous.
    
    This commit also adds a unit test and scripts that generate a bunch of
    certificates/keys for it.
    Lazin committed Apr 27, 2022
    Configuration menu
    Copy the full SHA
    8fe5b6e View commit details
    Browse the repository at this point in the history