File: adb_libssl_bc.diff

package info (click to toggle)
android-platform-system-core 1%3A7.0.0%2Br33-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,464 kB
  • sloc: cpp: 96,742; ansic: 39,563; asm: 3,482; python: 1,571; sh: 666; lex: 311; java: 169; makefile: 65; xml: 19
file content (30 lines) | stat: -rw-r--r-- 838 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Description: adb: backward compatibility with openssl < 1.1
  A change introduced previously (adb_libssl_11.diff) made
  changes that would not work with openssl < 1.1, so add the
  one function we use for that case.
Origin: other, https://wiki.openssl.org/index.php/1.1_API_Changes
Last-Update: 2016-11-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/adb/adb_auth_host.cpp
+++ b/adb/adb_auth_host.cpp
@@ -47,6 +47,19 @@
 #include <openssl/base64.h>
 #endif
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+void RSA_get0_key(const RSA *r,
+                 const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
+{
+   if (n != NULL)
+       *n = r->n;
+   if (e != NULL)
+       *e = r->e;
+   if (d != NULL)
+       *d = r->d;
+}
+#endif
+
 #define ANDROID_PATH   ".android"
 #define ADB_KEY_FILE   "adbkey"