Synss / python-mbedtls

Cryptographic library with an mbed TLS back end
MIT License
79 stars 28 forks source link

Show whole source code #53

Closed martinapalmucci closed 2 years ago

martinapalmucci commented 2 years ago

Description

While I was following the library code flow,

I noticed that it was impossible to find definitions of some functions

such as "mbedtls_pk_check_pair" (used in https://github.com/Synss/python-mbedtls/blob/master/src/mbedtls/pk.pyx, and declared in https://github.com/Synss/python-mbedtls/blob/master/src/mbedtls/pk.pxd).

Please, would you help me to find all source code?

Synss commented 2 years ago

Hi Martina,

This library consists in Python bindings to mbedTLS from ARM (see upstream source code at https://github.com/ARMmbed/mbedtls/tree/v2.16.12, written in C). So what I do here is make the C implementation available in Python.

For example, you may notice that mbedtls_pk_check_pair is declared in a cdef extern from "mbedtls/pk.h" nogil: block and you will find mbedtls/pk.h upstream.

For example with mbedtls_pk_check_pair:

I hope that answers your question.

martinapalmucci commented 2 years ago

Yes, it answers my question. I appreciate your help and thank you so much for your work as well!