8000 axTLS-based modussl: ussl.wrap_socket silently accepts invalid certificates · Issue #1862 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content
axTLS-based modussl: ussl.wrap_socket silently accepts invalid certificates #1862
Open
@ncoghlan

Description

@ncoghlan

Investigating micropython/micropython-lib#69, I found the current SSL/TLS socket creation code at

STATIC mp_obj_ssl_socket_t *socket_new(mp_obj_t sock) {

If I'm reading that correctly:

  1. Wrapping a socket without providing any certificate verification details results in no verification being performed;
  2. Even if verification details are provided, they're still ignored

This makes the documentation at http://docs.micropython.org/en/latest/library/ussl.html#ussl.ssl.wrap_socket thoroughly misleading, as even if the additional arguments are passed in, they won't be processed.

I realise actually implementing this will require a significant amount of work, so my request at this point would be for passing in unsupported arguments to result in a hard failure, rather than silently appearing to succeed without actually providing the claimed security guarantees.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0