aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2014-05-21 14:01:45 -0700
committerDmitry Shmidt <dimitrysh@google.com>2014-05-21 14:01:45 -0700
commit50b691dc36a8075e8f594e8bea93cb524fa6b1d2 (patch)
tree9bfa2c196f72862429ac66a34f43c23d1fc570f0 /src/crypto
parent6dc03bd757d3befd2c03a543a402338db03914d6 (diff)
downloadandroid_external_wpa_supplicant_8-50b691dc36a8075e8f594e8bea93cb524fa6b1d2.tar.gz
android_external_wpa_supplicant_8-50b691dc36a8075e8f594e8bea93cb524fa6b1d2.tar.bz2
android_external_wpa_supplicant_8-50b691dc36a8075e8f594e8bea93cb524fa6b1d2.zip
Cumulative patch from commit 54ac6ff8c4a20f8c3678e0c610716ce7795b8320
54ac6ff PKCS 1: Add function for checking v1.5 RSA signature d381184 RSA: Add OID definitions and helper function for hash algorithms ab6d047 Add function for building RSA public key from n and e parameters 6c5be11 PKCS #1: Enforce minimum padding for decryption in internal TLS e6d83cc PKCS #1: Allow only BT=01 for signature in internal TLS 9c29d48 X.509: Fix internal TLS/X.509 validation of PKCS#1 signature 10b58b5 TNC: Allow TNC to be enabled dynamically 0a626a5 TNC: Move common definitions into a shared header file 4075e4e TNC: Allow tnc_config file path to be replaced f0356ec eloop: Add epoll option for better performance da96a6f eloop: Separate event loop select/poll implementation 68d2700 dbus: No need to recompute group object path on GroupStarted signal f3734e2 dbus: Provide the P2P Device Address from the relevant structure e956b83 dbus: Fix interface DeviceFound signal specification fc591a7 dbus: Declare GONegotiation signals properly Change-Id: I54a598ae249ca569f15eaef8f728985897e1b2f0 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/crypto.h4
-rw-r--r--src/crypto/crypto_internal-rsa.c9
2 files changed, 13 insertions, 0 deletions
diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h
index 4caa277d..f2d5662f 100644
--- a/src/crypto/crypto.h
+++ b/src/crypto/crypto.h
@@ -271,6 +271,10 @@ struct crypto_private_key;
*/
struct crypto_public_key * crypto_public_key_import(const u8 *key, size_t len);
+struct crypto_public_key *
+crypto_public_key_import_parts(const u8 *n, size_t n_len,
+ const u8 *e, size_t e_len);
+
/**
* crypto_private_key_import - Import an RSA private key
* @key: Key buffer (DER encoded RSA private key)
diff --git a/src/crypto/crypto_internal-rsa.c b/src/crypto/crypto_internal-rsa.c
index 54209fad..dc7f350a 100644
--- a/src/crypto/crypto_internal-rsa.c
+++ b/src/crypto/crypto_internal-rsa.c
@@ -26,6 +26,15 @@ struct crypto_public_key * crypto_public_key_import(const u8 *key, size_t len)
}
+struct crypto_public_key *
+crypto_public_key_import_parts(const u8 *n, size_t n_len,
+ const u8 *e, size_t e_len)
+{
+ return (struct crypto_public_key *)
+ crypto_rsa_import_public_key_parts(n, n_len, e, e_len);
+}
+
+
struct crypto_private_key * crypto_private_key_import(const u8 *key,
size_t len,
const char *passwd)