|
Android-cuttlefish cvd tool
|
#include <dirent.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <map>#include <mutex>#include <set>#include <string>#include <adb/crypto/rsa_2048_key.h>#include <adb/crypto/x509_generator.h>#include <adb/tls/adb_ca_list.h>#include <adb/tls/tls_connection.h>#include <android-base/errors.h>#include <android-base/file.h>#include <android-base/stringprintf.h>#include <android-base/strings.h>#include <crypto_utils/android_pubkey.h>#include <openssl/base64.h>#include <openssl/evp.h>#include <openssl/objects.h>#include <openssl/pem.h>#include <openssl/rsa.h>#include <openssl/sha.h>#include "adb.h"#include "adb_auth.h"#include "adb_io.h"#include "adb_utils.h"#include "sysdeps.h"#include "transport.h"
Functions | |
| static bool | generate_key (const std::string &file) |
| static std::string | hash_key (RSA *key) |
| static std::shared_ptr< RSA > | read_key_file (const std::string &file) |
| static bool | load_key (const std::string &file) |
| static bool | load_keys (const std::string &path, bool allow_dir=true) |
| std::string | adb_auth_get_userkey_path () |
| static bool | load_userkey () |
| static std::set< std::string > | get_vendor_keys () |
| std::deque< std::shared_ptr< RSA > > | adb_auth_get_private_keys () |
| static std::string | adb_auth_sign (RSA *key, const char *token, size_t token_size) |
| static bool | pubkey_from_privkey (std::string *out, const std::string &path) |
| bssl::UniquePtr< EVP_PKEY > | adb_auth_get_user_privkey () |
| std::string | adb_auth_get_userkey () |
| int | adb_auth_keygen (const char *filename) |
| int | adb_auth_pubkey (const char *filename) |
| void | adb_auth_init () |
| static void | send_auth_publickey (atransport *t) |
| void | send_auth_response (const char *token, size_t token_size, atransport *t) |
| void | adb_auth_tls_handshake (atransport *t) |
| int | adb_tls_set_certificate (SSL *ssl) |
Variables | |
| static std::mutex & | g_keys_mutex = *new std::mutex |
| static std::map< std::string, std::shared_ptr< RSA > > & | g_keys |
| static std::map< int, std::string > & | g_monitored_paths = *new std::map<int, std::string> |
| std::deque< std::shared_ptr< RSA > > adb_auth_get_private_keys | ( | ) |
| bssl::UniquePtr< EVP_PKEY > adb_auth_get_user_privkey | ( | ) |
| std::string adb_auth_get_userkey | ( | ) |
| std::string adb_auth_get_userkey_path | ( | ) |
| void adb_auth_init | ( | ) |
| int adb_auth_keygen | ( | const char * | filename | ) |
| int adb_auth_pubkey | ( | const char * | filename | ) |
|
static |
| void adb_auth_tls_handshake | ( | atransport * | t | ) |
| int adb_tls_set_certificate | ( | SSL * | ssl | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| void send_auth_response | ( | const char * | token, |
| size_t | token_size, | ||
| atransport * | t | ||
| ) |
|
static |
|
static |
|
static |