ming
1
149 line extract_public_rsa_key(queue+52, core_private_key);
153 line const int len = 52+MAX_DEVICE_PUBLIC_KEY_LENGTH;
LOG(INFO,"Encrypting handshake nonce");
extract_public_rsa_key(queue+52, core_private_key);
rsa_context rsa;
init_rsa_context_with_public_key(&rsa, server_public_key);
const int len = 52+MAX_DEVICE_PUBLIC_KEY_LENGTH;
#ifdef USE_MBEDTLS
err = mbedtls_rsa_pkcs1_encrypt(&rsa, mbedtls_default_rng, nullptr, MBEDTLS_RSA_PUBLIC, len, queue, queue + len);
#else
err = rsa_pkcs1_encrypt(&rsa, RSA_PUBLIC, len, queue, queue + len);
#endif
rsa_free(&rsa);