Mageia Bugzilla – Attachment 10476 Details for
Bug 23853
Update android-tools to 9.0.0_r21
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Openssl system patch for ADB
adb-system-openssl.patch (text/plain), 911 bytes, created by
Kristoffer Grundström
on 2018-11-17 01:12:18 CET
(
hide
)
Description:
Openssl system patch for ADB
Filename:
MIME Type:
Creator:
Kristoffer Grundström
Created:
2018-11-17 01:12:18 CET
Size:
911 bytes
patch
obsolete
>--- platform/system/core/adb/adb_auth_host.cpp.omv~ 2017-09-02 14:04:39.730192170 +0200 >+++ platform/system/core/adb/adb_auth_host.cpp 2017-09-02 14:09:58.291983196 +0200 >@@ -34,7 +34,9 @@ > #include <android-base/stringprintf.h> > #include <android-base/strings.h> > #include <crypto_utils/android_pubkey.h> >+#if defined(OPENSSL_IS_BORINGSSL) > #include <openssl/base64.h> >+#endif > #include <openssl/evp.h> > #include <openssl/objects.h> > #include <openssl/pem.h> >@@ -83,10 +85,14 @@ static bool write_public_keyfile(RSA* pr > } > > size_t expected_length; >+#if defined(OPENSSL_IS_BORINGSSL) > if (!EVP_EncodedLength(&expected_length, sizeof(binary_key_data))) { > LOG(ERROR) << "Public key too large to base64 encode"; > return false; > } >+#else >+ expected_length = 1 + ((sizeof(binary_key_data) + 2) / 3 * 4); >+#endif > > std::string content; > content.resize(expected_length);
--- platform/system/core/adb/adb_auth_host.cpp.omv~ 2017-09-02 14:04:39.730192170 +0200 +++ platform/system/core/adb/adb_auth_host.cpp 2017-09-02 14:09:58.291983196 +0200 @@ -34,7 +34,9 @@ #include <android-base/stringprintf.h> #include <android-base/strings.h> #include <crypto_utils/android_pubkey.h> +#if defined(OPENSSL_IS_BORINGSSL) #include <openssl/base64.h> +#endif #include <openssl/evp.h> #include <openssl/objects.h> #include <openssl/pem.h> @@ -83,10 +85,14 @@ static bool write_public_keyfile(RSA* pr } size_t expected_length; +#if defined(OPENSSL_IS_BORINGSSL) if (!EVP_EncodedLength(&expected_length, sizeof(binary_key_data))) { LOG(ERROR) << "Public key too large to base64 encode"; return false; } +#else + expected_length = 1 + ((sizeof(binary_key_data) + 2) / 3 * 4); +#endif std::string content; content.resize(expected_length);
View Attachment As Raw
Actions:
View
Attachments on
bug 23853
:
10474
|
10475
|
10476
|
10477
|
10478
|
10479
|
10480
|
10481
|
10482
|
11104
|
11105
|
11106
|
11107
|
11108
|
11109
|
11110
|
11111
|
11112
|
11113
|
11114