diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-10-05 17:52:09 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-10-05 17:52:09 -0500 |
commit | 1f33553b8d33770572d4982e3862ed5bc52ea9c7 (patch) | |
tree | 7ed7f1c8dc052a2684c89fc50737510f5512a12a | |
parent | 5babb229b343251e4f7bf637db3e9a6db59ae402 (diff) | |
download | cryptography-1f33553b8d33770572d4982e3862ed5bc52ea9c7.tar.gz cryptography-1f33553b8d33770572d4982e3862ed5bc52ea9c7.tar.bz2 cryptography-1f33553b8d33770572d4982e3862ed5bc52ea9c7.zip |
Bindings for OpenSSL's RSA. Refs #77
-rw-r--r-- | cryptography/bindings/openssl/api.py | 1 | ||||
-rw-r--r-- | cryptography/bindings/openssl/rsa.py | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py index 8b13277e..0da1af61 100644 --- a/cryptography/bindings/openssl/api.py +++ b/cryptography/bindings/openssl/api.py @@ -30,6 +30,7 @@ class API(object): "dh", "dsa", "evp", + "rsa", "opensslv", ] diff --git a/cryptography/bindings/openssl/rsa.py b/cryptography/bindings/openssl/rsa.py new file mode 100644 index 00000000..03892135 --- /dev/null +++ b/cryptography/bindings/openssl/rsa.py @@ -0,0 +1,31 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +INCLUDES = """ +#include <openssl/rsa.h> +""" + +TYPES = """ +typedef ... RSA; +typedef ... BN_GENCB; +""" + +FUNCTIONS = """ +RSA * RSA_new(void); +void RSA_free(RSA *r); +int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); +int RSA_check_key(const RSA *); +""" + +MACROS = """ +""" |