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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
use Vec;
/// Trait for ADB authentication.
///
/// The ADB handshake requires signing a device-provided token with an RSA private key
/// (PKCS#1 v1.5 with SHA-1) and optionally sending the public key for on-device
/// authorization.
///
/// Implement this trait to plug in any RSA library (e.g. `rsa`, `ring`, `openssl`,
/// or a hardware security module). The `keys` feature ships a ready one,
/// `keys::AdbKey`, which also generates a key when there is none.
/// A mutable borrow authenticates as whatever it points at, so one key
/// can serve several connections in turn: pass `&mut key` where a
/// connection wants an authenticator of its own, rather than rebuilding
/// the key — or duplicating the secret — for each.
use Future;