summaryrefslogtreecommitdiffstats
path: root/adb/transport.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2016-08-12 21:21:57 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-08-12 21:21:57 +0000
commit81a3f71e45af5f19d426c7d0cc116ba3921d968a (patch)
treef2ba8819f618a6a93aa41df784ae6e47f9859921 /adb/transport.cpp
parent4c4a172ee911bb9e76414267168b816399f38755 (diff)
parentb85983045090df17c02167046112b787b4d7d022 (diff)
downloadcore-81a3f71e45af5f19d426c7d0cc116ba3921d968a.tar.gz
core-81a3f71e45af5f19d426c7d0cc116ba3921d968a.tar.bz2
core-81a3f71e45af5f19d426c7d0cc116ba3921d968a.zip
Merge "Clean up key handling in adb."
am: b859830450 Change-Id: I8d8ff82167a97e89eacbfcc97f3b704466927aa3
Diffstat (limited to 'adb/transport.cpp')
-rw-r--r--adb/transport.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/adb/transport.cpp b/adb/transport.cpp
index ad63a6aab..0d376b1da 100644
--- a/adb/transport.cpp
+++ b/adb/transport.cpp
@@ -35,6 +35,7 @@
#include <android-base/strings.h>
#include "adb.h"
+#include "adb_auth.h"
#include "adb_utils.h"
#include "diagnose_usb.h"
@@ -1072,3 +1073,11 @@ int check_data(apacket *p)
return 0;
}
}
+
+RSA* atransport::NextKey() {
+ if (keys_.empty()) keys_ = adb_auth_get_private_keys();
+
+ RSA* result = keys_[0];
+ keys_.pop_front();
+ return result;
+}