Coder Social home page Coder Social logo

aioopenssl's People

Contributors

freundtech avatar horazont avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aioopenssl's Issues

Python3.7

Hello,

Is version 0.3.2 meant to have this fix 7839188 ?

Cause it seems it doesn't...

Thanks.

Does it support server mode?

Hello!

Thank you for this library, it looks like what I need!

For context, I'm playing with the idea of an HTTPS server that lazily produces certificate from ACME/Let's Encrypt when they are first accessed.

To do this I need to execute my code (a blocking asyncio callback) after the SSL handshake to and use the SNI and ALPN data to fetch/generate the correct certificate

However it is not completely clear how to do that:

  • can the post_handshake_callback do that?
  • Can STARTTLSTransport be used in server-mode? The tests always use it in client-mode

Thank you!

Windows 10 support.

Windows 10 support is broken as of python 3.8 now thanks to the event loop policy changing. Any plans on fixing this?

DeprecationWarning: "@coroutine" decorator is deprecated

Hello,

In Python3.8 my pytest tests give me

.venv/lib/python3.8/site-packages/aioopenssl/__init__.py:726
  ~/project/.venv/lib/python3.8/site-packages/aioopenssl/__init__.py:726: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
    def create_starttls_connection(

-- Docs: https://docs.pytest.org/en/latest/warnings.html

Incorrect use of SSL_write leads to OpenSSL.SSL.Error exception

See horazont/aioxmpp#116. @jomag reported:

[3286.014] ERR:  [asyncio] Fatal write error on STARTTLS transport
protocol: <aioxmpp.protocol.XMLStream object at 0xb41d0ad0>
transport: <aioopenssl.STARTTLSTransport object at 0xb41d0c10>Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/aioopenssl/__init__.py", line 478, in _write_ready
    nsent = self._sock.send(bytes(self._buffer))
  File "/usr/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1254, in send
    self._raise_ssl_error(self._ssl, result)
  File "/usr/lib/python3.5/site-packages/OpenSSL/SSL.py", line 1172, in _raise_ssl_error
    _raise_current_error()
  File "/usr/lib/python3.5/site-packages/OpenSSL/_util.py", line 48, in exception_from_error_queue
    raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'ssl3_write_pending', 'bad write retry')]

Reseraching the error condition, it appears that OpenSSL by default does not allow you to change the buffer pointer or size between SSL_write calls which returned with a "NEED_READ" or "NEED_WRITE" condition.

Specify local_addr to bind?

asyncio.BaseEventLoop.create_connection lets you specify a local address to bind to, doesn't seem to be a similar option in aioopenssl.create_starttls_connection

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.