diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2017-08-22 13:01:20 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2017-08-22 13:01:20 +0000 |
commit | 212056367b28056afc7702fbe11fef0d918cf928 (patch) | |
tree | 55352d2b91e51ca0f722cf9f1707bebdec74d38c /devel/android-tools-adb/files/patch-adb_adb__auth__host.cpp | |
parent | Update to 4.0 (diff) |
devel/android-tools-{adb,fastboot}: update to 8.0.0.r4 (oreo)
Changes: https://android.googlesource.com/platform/system/core/+log/android-7.1.2_r17..android-8.0.0_r4/adb
Changes: https://android.googlesource.com/platform/system/core/+log/android-7.1.2_r17..android-8.0.0_r4/fastboot
Diffstat (limited to 'devel/android-tools-adb/files/patch-adb_adb__auth__host.cpp')
-rw-r--r-- | devel/android-tools-adb/files/patch-adb_adb__auth__host.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/devel/android-tools-adb/files/patch-adb_adb__auth__host.cpp b/devel/android-tools-adb/files/patch-adb_adb__auth__host.cpp new file mode 100644 index 000000000000..2fb3e5335c76 --- /dev/null +++ b/devel/android-tools-adb/files/patch-adb_adb__auth__host.cpp @@ -0,0 +1,43 @@ +--- adb/adb_auth_host.cpp.orig 2016-06-29 23:43:15 UTC ++++ adb/adb_auth_host.cpp +@@ -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> +@@ -70,6 +72,30 @@ static std::string get_user_info() { + return " " + username + "@" + hostname; + } + ++#if !defined(OPENSSL_IS_BORINGSSL) ++// https://boringssl.googlesource.com/boringssl/+/6601402%5E!/ ++static int EVP_EncodedLength(size_t *out_len, size_t len) { ++ if (len + 2 < len) { ++ return 0; ++ } ++ len += 2; ++ len /= 3; ++ ++ if (((len << 2) >> 2) != len) { ++ return 0; ++ } ++ len <<= 2; ++ ++ if (len + 1 < len) { ++ return 0; ++ } ++ len++; ++ ++ *out_len = len; ++ return 1; ++} ++#endif ++ + static bool write_public_keyfile(RSA* private_key, const std::string& private_key_path) { + uint8_t binary_key_data[ANDROID_PUBKEY_ENCODED_SIZE]; + if (!android_pubkey_encode(private_key, binary_key_data, sizeof(binary_key_data))) { |