diff options
author | Jean-Paul Calderone <exarkun@twistedmatrix.com> | 2013-12-27 16:50:56 -0500 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@twistedmatrix.com> | 2013-12-27 16:50:56 -0500 |
commit | 2dd6cc89f6822ede162ef402f270493b2263d829 (patch) | |
tree | 2fc7f2a694ba0fc85c622e56862539bdf07466f2 | |
parent | 470a116786e692753ef96da2095d72e5383d417d (diff) | |
download | cryptography-2dd6cc89f6822ede162ef402f270493b2263d829.tar.gz cryptography-2dd6cc89f6822ede162ef402f270493b2263d829.tar.bz2 cryptography-2dd6cc89f6822ede162ef402f270493b2263d829.zip |
expand the explanation for this workaround
and switch XXX to TODO
-rw-r--r-- | cryptography/hazmat/backends/openssl/asn1.py | 14 | ||||
-rw-r--r-- | cryptography/hazmat/backends/openssl/bignum.py | 14 |
2 files changed, 24 insertions, 4 deletions
diff --git a/cryptography/hazmat/backends/openssl/asn1.py b/cryptography/hazmat/backends/openssl/asn1.py index e7c18a52..fa336cf3 100644 --- a/cryptography/hazmat/backends/openssl/asn1.py +++ b/cryptography/hazmat/backends/openssl/asn1.py @@ -17,9 +17,19 @@ INCLUDES = """ TYPES = """ /* - * XXX This typedef is wrong. - * https://bitbucket.org/cffi/cffi/issue/69 + * TODO: This typedef is wrong. + * + * This is due to limitations of cffi. + * See https://bitbucket.org/cffi/cffi/issue/69 + * + * For another possible work-around (not used here because it involves more + * complicated use of the cffi API which falls outside the general pattern used + * by this package), see * http://paste.pound-python.org/show/iJcTUMkKeBeS6yXpZWUU/ + * + * The work-around used here is to just be sure to declare a type that is at + * least as large as the real type. Maciej explains: + * * <fijal> I think you want to declare your value too large (e.g. long) * <fijal> that way you'll never pass garbage */ diff --git a/cryptography/hazmat/backends/openssl/bignum.py b/cryptography/hazmat/backends/openssl/bignum.py index a5ba07b1..599eadc8 100644 --- a/cryptography/hazmat/backends/openssl/bignum.py +++ b/cryptography/hazmat/backends/openssl/bignum.py @@ -18,9 +18,19 @@ INCLUDES = """ TYPES = """ typedef ... BIGNUM; /* - * XXX This typedef is wrong. - * https://bitbucket.org/cffi/cffi/issue/69 + * TODO: This typedef is wrong. + * + * This is due to limitations of cffi. + * See https://bitbucket.org/cffi/cffi/issue/69 + * + * For another possible work-around (not used here because it involves more + * complicated use of the cffi API which falls outside the general pattern used + * by this package), see * http://paste.pound-python.org/show/iJcTUMkKeBeS6yXpZWUU/ + * + * The work-around used here is to just be sure to declare a type that is at + * least as large as the real type. Maciej explains: + * * <fijal> I think you want to declare your value too large (e.g. long) * <fijal> that way you'll never pass garbage */ |