diff options
author | Colin Cross <ccross@google.com> | 2013-09-27 20:34:32 +0000 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2013-12-04 15:00:52 -0800 |
commit | b80e4c725d27fe316b0d6fde14d1f5eab34639ea (patch) | |
tree | 06e6ca9f7668f62ee8dc568052507b2e772ccbeb /fastbootd/commands | |
parent | 5621248d744a52a11ea927d7508d71cde44b63cd (diff) | |
download | system_core-b80e4c725d27fe316b0d6fde14d1f5eab34639ea.zip system_core-b80e4c725d27fe316b0d6fde14d1f5eab34639ea.tar.gz system_core-b80e4c725d27fe316b0d6fde14d1f5eab34639ea.tar.bz2 |
Revert "Fastbootd: flashing certification"
This reverts commit 5ccecfd26d2a7c3a79a139f0118b93ee64be4737.
Change-Id: I0ca31094c115e14982a27c258d9139a723da8428
Diffstat (limited to 'fastbootd/commands')
-rw-r--r-- | fastbootd/commands/flash.c | 47 | ||||
-rw-r--r-- | fastbootd/commands/flash.h | 2 |
2 files changed, 0 insertions, 49 deletions
diff --git a/fastbootd/commands/flash.c b/fastbootd/commands/flash.c index 0954217..5f8b931 100644 --- a/fastbootd/commands/flash.c +++ b/fastbootd/commands/flash.c @@ -39,9 +39,6 @@ #include "utils.h" #include "commands/partitions.h" -#ifdef FLASH_CERT -#include "secure.h" -#endif #define ALLOWED_CHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-." #define BUFFER_SIZE 1024 * 1024 @@ -115,47 +112,3 @@ int flash_write(int partition_fd, int data_fd, ssize_t size, ssize_t skip) return 0; } - -#ifdef FLASH_CERT - -int flash_validate_certificate(int signed_fd, int *data_fd) { - int ret = 0; - const char *cert_path; - X509_STORE *store = NULL; - CMS_ContentInfo *content_info; - BIO *content; - - cert_path = fastboot_getvar("certificate-path"); - if (!strcmp(cert_path, "")) { - D(ERR, "could not find cert-key value in config file"); - goto finish; - } - - store = cert_store_from_path(cert_path); - if (store == NULL) { - D(ERR, "unable to create certification store"); - goto finish; - } - - if (cert_read(signed_fd, &content_info, &content)) { - D(ERR, "reading data failed"); - goto finish; - } - - ret = cert_verify(content, content_info, store, data_fd); - cert_release(content, content_info); - - return ret; - -finish: - if (store != NULL) - cert_release_store(store); - - return ret; -} - -#else -int flash_validate_certificate(int signed_fd, int *data_fd) { - return 1; -} -#endif diff --git a/fastbootd/commands/flash.h b/fastbootd/commands/flash.h index 86dc811..8ffd688 100644 --- a/fastbootd/commands/flash.h +++ b/fastbootd/commands/flash.h @@ -58,7 +58,5 @@ static inline ssize_t read_data_once(int fd, char *buffer, ssize_t size) { return readcount; } -int flash_validate_certificate(int signed_fd, int *data_fd); - #endif |