aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2016-06-26 14:07:28 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-06-26 13:07:28 -0500
commitb28c20c4503a49b1020a9bc7fc9adeb4989da553 (patch)
tree952114dc2f7c35b65d5ed4a60c9c12c8091c83a3 /src
parenta8f935b813538d8ca50efd62620a250d02856760 (diff)
downloadcryptography-b28c20c4503a49b1020a9bc7fc9adeb4989da553.tar.gz
cryptography-b28c20c4503a49b1020a9bc7fc9adeb4989da553.tar.bz2
cryptography-b28c20c4503a49b1020a9bc7fc9adeb4989da553.zip
Opaquify RSA and DSA structs in OpenSSL (#3016)
Diffstat (limited to 'src')
-rw-r--r--src/_cffi_src/openssl/dsa.py14
-rw-r--r--src/_cffi_src/openssl/rsa.py12
2 files changed, 2 insertions, 24 deletions
diff --git a/src/_cffi_src/openssl/dsa.py b/src/_cffi_src/openssl/dsa.py
index 5f0f6493..16f00fe6 100644
--- a/src/_cffi_src/openssl/dsa.py
+++ b/src/_cffi_src/openssl/dsa.py
@@ -9,19 +9,7 @@ INCLUDES = """
"""
TYPES = """
-typedef struct dsa_st {
- /* Prime number (public) */
- BIGNUM *p;
- /* Subprime (160-bit, q | p-1, public) */
- BIGNUM *q;
- /* Generator of subgroup (public) */
- BIGNUM *g;
- /* Private key x */
- BIGNUM *priv_key;
- /* Public key y = g^x */
- BIGNUM *pub_key;
- ...;
-} DSA;
+typedef ... DSA;
"""
FUNCTIONS = """
diff --git a/src/_cffi_src/openssl/rsa.py b/src/_cffi_src/openssl/rsa.py
index 6b3365de..79c968bc 100644
--- a/src/_cffi_src/openssl/rsa.py
+++ b/src/_cffi_src/openssl/rsa.py
@@ -9,17 +9,7 @@ INCLUDES = """
"""
TYPES = """
-typedef struct rsa_st {
- BIGNUM *n;
- BIGNUM *e;
- BIGNUM *d;
- BIGNUM *p;
- BIGNUM *q;
- BIGNUM *dmp1;
- BIGNUM *dmq1;
- BIGNUM *iqmp;
- ...;
-} RSA;
+typedef ... RSA;
typedef ... BN_GENCB;
static const int RSA_PKCS1_PADDING;
static const int RSA_SSLV23_PADDING;