From 1f33553b8d33770572d4982e3862ed5bc52ea9c7 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sat, 5 Oct 2013 17:52:09 -0500 Subject: Bindings for OpenSSL's RSA. Refs #77 --- cryptography/bindings/openssl/api.py | 1 + cryptography/bindings/openssl/rsa.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 cryptography/bindings/openssl/rsa.py 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 +""" + +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 = """ +""" -- cgit v1.2.3