[Cryptography-dev] Let the flood gates open!

Jean-Paul Calderone jean-paul at hybridcluster.com
Mon Sep 9 23:21:50 CEST 2013


On 09/09/2013 05:09 PM, Hynek Schlawack wrote:
> Well, let's keep this conversation going then.  What are the current issues?

All of the cffi cdef text is inline in a single string in a method in
cryptography/bindings/openssl/api.py.

This will be a problem (I suspect) once the string grows to the
necessary several thousand lines.

I suggest splitting this up by OpenSSL header file and by declaration type.

For example, all of the declarations for symbols (or whatever they're
called) in evp.h should go into cryptography/bindings/openssl/evp.py. 
They should be further split up into a few different variables:

  * the name of the header (or, sometimes, headers) to include
  * the types to define
  * the functions to define
  * extra arbitrary C code for glue

api.py should assemble all of this information and make the necessary
cffi API calls.

Jean-Paul

> Sent from my phone.
>
> Am 09.09.2013 um 15:17 schrieb Donald Stufft <donald at stufft.io>:
>
>> On Sep 9, 2013, at 8:12 AM, Jean-Paul Calderone <jean-paul at hybridcluster.com> wrote:
>>
>>> I was a little discouraged by the structure of the
>>> code which looks like it is much less amenable to improvement and
>>> maintenance than the code from opentls.  opentls had its problems but it
>>> was nice that it tried to split the necessary cffi declarations up a
>>> bit.  I'd like to see something like this happen to the structure of the
>>> openssl bindings in cryptography.
>> I liked what I saw from opentls with how it structured the cffi bindings, I would be +1 on something similar.
>>
>> -----------------
>> Donald Stufft
>> PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
>>
>> _______________________________________________
>> Cryptography-dev mailing list
>> Cryptography-dev at python.org
>> https://mail.python.org/mailman/listinfo/cryptography-dev
> _______________________________________________
> Cryptography-dev mailing list
> Cryptography-dev at python.org
> https://mail.python.org/mailman/listinfo/cryptography-dev


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/cryptography-dev/attachments/20130909/9c985b94/attachment.sig>


More information about the Cryptography-dev mailing list