Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37818278
en ru br
ALT Linux repositórios
S:10.0.0-alt5.r36

Group :: Development/Tools
RPM: android-tools

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: adb-system-openssl.patch
Download


--- platform/system/core/adb/client/auth.cpp	2017-09-02 14:04:39.730192170 +0200
+++ platform/system/core/adb/client/auth.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 calculate_public_key(std::string* out, RSA* private_key) {
     }
 
     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
 
     out->resize(expected_length);
     size_t actual_length = EVP_EncodeBlock(reinterpret_cast<uint8_t*>(out->data()), binary_key_data,
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009