* commit 'c720a12a6ae1901c5a1537372897fc763e7a44a9': Switch md5 over to openssl rather than libc.
This commit is contained in:
commit
41b797de46
2 changed files with 73 additions and 75 deletions
|
|
@ -2,73 +2,73 @@ LOCAL_PATH:= $(call my-dir)
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
TOOLS := \
|
TOOLS := \
|
||||||
ls \
|
|
||||||
mount \
|
|
||||||
cat \
|
cat \
|
||||||
ps \
|
chcon \
|
||||||
kill \
|
|
||||||
ln \
|
|
||||||
insmod \
|
|
||||||
rmmod \
|
|
||||||
lsmod \
|
|
||||||
ifconfig \
|
|
||||||
rm \
|
|
||||||
mkdir \
|
|
||||||
rmdir \
|
|
||||||
getevent \
|
|
||||||
sendevent \
|
|
||||||
date \
|
|
||||||
wipe \
|
|
||||||
sync \
|
|
||||||
umount \
|
|
||||||
start \
|
|
||||||
stop \
|
|
||||||
notify \
|
|
||||||
cmp \
|
|
||||||
dmesg \
|
|
||||||
route \
|
|
||||||
hd \
|
|
||||||
dd \
|
|
||||||
df \
|
|
||||||
getprop \
|
|
||||||
setprop \
|
|
||||||
watchprops \
|
|
||||||
log \
|
|
||||||
sleep \
|
|
||||||
renice \
|
|
||||||
printenv \
|
|
||||||
smd \
|
|
||||||
chmod \
|
chmod \
|
||||||
chown \
|
chown \
|
||||||
newfs_msdos \
|
clear \
|
||||||
netstat \
|
cmp \
|
||||||
ioctl \
|
date \
|
||||||
mv \
|
dd \
|
||||||
schedtop \
|
df \
|
||||||
top \
|
dmesg \
|
||||||
iftop \
|
du \
|
||||||
|
getenforce \
|
||||||
|
getevent \
|
||||||
|
getprop \
|
||||||
|
getsebool \
|
||||||
|
hd \
|
||||||
id \
|
id \
|
||||||
|
ifconfig \
|
||||||
|
iftop \
|
||||||
|
insmod \
|
||||||
|
ioctl \
|
||||||
|
ionice \
|
||||||
|
kill \
|
||||||
|
ln \
|
||||||
|
load_policy \
|
||||||
|
log \
|
||||||
|
ls \
|
||||||
|
lsmod \
|
||||||
|
lsof \
|
||||||
|
md5 \
|
||||||
|
mkdir \
|
||||||
|
mkswap \
|
||||||
|
mount \
|
||||||
|
mv \
|
||||||
|
nandread \
|
||||||
|
netstat \
|
||||||
|
newfs_msdos \
|
||||||
|
notify \
|
||||||
|
printenv \
|
||||||
|
ps \
|
||||||
|
readlink \
|
||||||
|
renice \
|
||||||
|
restorecon \
|
||||||
|
rm \
|
||||||
|
rmdir \
|
||||||
|
rmmod \
|
||||||
|
route \
|
||||||
|
runcon \
|
||||||
|
schedtop \
|
||||||
|
sendevent \
|
||||||
|
setenforce \
|
||||||
|
setprop \
|
||||||
|
setsebool \
|
||||||
|
sleep \
|
||||||
|
smd \
|
||||||
|
start \
|
||||||
|
stop \
|
||||||
|
swapoff \
|
||||||
|
swapon \
|
||||||
|
sync \
|
||||||
|
top \
|
||||||
|
touch \
|
||||||
|
umount \
|
||||||
uptime \
|
uptime \
|
||||||
vmstat \
|
vmstat \
|
||||||
nandread \
|
watchprops \
|
||||||
ionice \
|
wipe \
|
||||||
touch \
|
|
||||||
lsof \
|
|
||||||
du \
|
|
||||||
md5 \
|
|
||||||
clear \
|
|
||||||
getenforce \
|
|
||||||
setenforce \
|
|
||||||
chcon \
|
|
||||||
restorecon \
|
|
||||||
runcon \
|
|
||||||
getsebool \
|
|
||||||
setsebool \
|
|
||||||
load_policy \
|
|
||||||
swapon \
|
|
||||||
swapoff \
|
|
||||||
mkswap \
|
|
||||||
readlink
|
|
||||||
|
|
||||||
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
|
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
|
||||||
TOOLS += r
|
TOOLS += r
|
||||||
|
|
@ -92,21 +92,25 @@ LOCAL_SRC_FILES := \
|
||||||
toolbox.c \
|
toolbox.c \
|
||||||
uid_from_user.c \
|
uid_from_user.c \
|
||||||
|
|
||||||
LOCAL_C_INCLUDES := bionic/libc/bionic
|
|
||||||
|
|
||||||
LOCAL_CFLAGS += \
|
LOCAL_CFLAGS += \
|
||||||
-std=gnu99 \
|
-std=gnu99 \
|
||||||
-Werror -Wno-unused-parameter \
|
-Werror -Wno-unused-parameter \
|
||||||
-include bsd-compatibility.h \
|
-include bsd-compatibility.h \
|
||||||
|
|
||||||
|
LOCAL_C_INCLUDES += external/openssl/include
|
||||||
|
|
||||||
LOCAL_SHARED_LIBRARIES := \
|
LOCAL_SHARED_LIBRARIES := \
|
||||||
libcutils \
|
libcrypto \
|
||||||
liblog \
|
libcutils \
|
||||||
libc \
|
libselinux \
|
||||||
libusbhost \
|
|
||||||
libselinux
|
# libusbhost is only used by lsusb, and that isn't usually included in toolbox.
|
||||||
|
# The linker strips out all the unused library code in the normal case.
|
||||||
|
LOCAL_STATIC_LIBRARIES := \
|
||||||
|
libusbhost \
|
||||||
|
|
||||||
LOCAL_MODULE := toolbox
|
LOCAL_MODULE := toolbox
|
||||||
|
LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
|
||||||
|
|
||||||
# Including this will define $(intermediates).
|
# Including this will define $(intermediates).
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <md5.h>
|
#include <openssl/md5.h>
|
||||||
|
|
||||||
/* When this was written, bionic's md5.h did not define this. */
|
|
||||||
#ifndef MD5_DIGEST_LENGTH
|
|
||||||
#define MD5_DIGEST_LENGTH 16
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int usage()
|
static int usage()
|
||||||
{
|
{
|
||||||
|
|
@ -30,7 +25,6 @@ static int do_md5(const char *path)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note that bionic's MD5_* functions return void. */
|
|
||||||
MD5_Init(&md5_ctx);
|
MD5_Init(&md5_ctx);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue