diff options
author | Kenny Root <kroot@google.com> | 2012-11-12 16:33:48 -0800 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2012-11-13 17:13:43 -0800 |
commit | 184b3bc9cbce3ee4cce79c24c69800722f3f0df2 (patch) | |
tree | ee62277d7e584b6d1a628aa0ae0ff712873c166c | |
parent | e9780b9481b88ef37fdac2a0171e50cab6112781 (diff) | |
download | wpa_supplicant_6-184b3bc9cbce3ee4cce79c24c69800722f3f0df2.tar.gz |
Switch keystore to binder
Change-Id: I9dd32b1f1ac5d32cb2335f805ce74bb649459f97
-rw-r--r-- | wpa_supplicant/Android.mk | 2 | ||||
-rw-r--r-- | wpa_supplicant/src/crypto/tls_openssl.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk index 2706193..64d37b7 100644 --- a/wpa_supplicant/Android.mk +++ b/wpa_supplicant/Android.mk @@ -1125,7 +1125,7 @@ endif ifneq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),) LOCAL_STATIC_LIBRARIES += $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB) endif -LOCAL_SHARED_LIBRARIES := libc libcutils libcrypto libssl +LOCAL_SHARED_LIBRARIES := libc libcutils libcrypto libssl libkeystore_binder LOCAL_CFLAGS := $(L_CFLAGS) LOCAL_SRC_FILES := $(OBJS) LOCAL_C_INCLUDES := $(INCLUDES) diff --git a/wpa_supplicant/src/crypto/tls_openssl.c b/wpa_supplicant/src/crypto/tls_openssl.c index 70fe79c..3e5d8ca 100644 --- a/wpa_supplicant/src/crypto/tls_openssl.c +++ b/wpa_supplicant/src/crypto/tls_openssl.c @@ -49,16 +49,17 @@ #ifdef ANDROID #include <openssl/pem.h> -#include "keystore_get.h" +#include <keystore/keystore_get.h> static BIO *BIO_from_keystore(const char *key) { BIO *bio = NULL; - char value[KEYSTORE_MESSAGE_SIZE]; - int length = keystore_get(key, strlen(key), value); + uint8_t *value = NULL; + int length = keystore_get(key, strlen(key), &value); if (length != -1 && (bio = BIO_new(BIO_s_mem())) != NULL) { BIO_write(bio, value, length); } + free(value); return bio; } #endif |