Home | History | Annotate | Download | only in adb

Lines Matching refs:rsa

41 #include <openssl/rsa.h>
51 static std::map<std::string, std::shared_ptr<RSA>>& g_keys =
52 *new std::map<std::string, std::shared_ptr<RSA>>;
76 static bool write_public_keyfile(RSA* private_key, const std::string& private_key_path) {
117 RSA* rsa = RSA_new();
118 if (!pkey || !exponent || !rsa) {
124 RSA_generate_key_ex(rsa, 2048, exponent, NULL);
125 EVP_PKEY_set1_RSA(pkey, rsa);
143 if (!write_public_keyfile(rsa, file)) {
153 RSA_free(rsa);
158 static std::string hash_key(RSA* key) {
162 LOG(ERROR) << "failed to encode RSA public key";
182 RSA* key = RSA_new();
195 g_keys[fingerprint] = std::shared_ptr<RSA>(key, RSA_free);
285 std::deque<std::shared_ptr<RSA>> adb_auth_get_private_keys() {
286 std::deque<std::shared_ptr<RSA>> result;
302 static std::string adb_auth_sign(RSA* key, const char* token, size_t token_size) {
466 std::shared_ptr<RSA> key = t->NextKey();