|
@@ -775,8 +775,8 @@ tor_tls_context_decref(tor_tls_context_t *ctx)
|
|
|
|
|
|
* and ID certificate that we're currently using for our V3 in-protocol
|
|
* and ID certificate that we're currently using for our V3 in-protocol
|
|
* handshake's certificate chain. If <b>server</b> is true, provide the certs
|
|
* handshake's certificate chain. If <b>server</b> is true, provide the certs
|
|
- * that we use in server mode; otherwise, provide the certs that we use in
|
|
+ * that we use in server mode (auth, ID); otherwise, provide the certs that we
|
|
- * client mode. */
|
|
+ * use in client mode. (link, ID) */
|
|
int
|
|
int
|
|
tor_tls_get_my_certs(int server,
|
|
tor_tls_get_my_certs(int server,
|
|
const tor_x509_cert_t **link_cert_out,
|
|
const tor_x509_cert_t **link_cert_out,
|
|
@@ -1026,6 +1026,8 @@ tor_tls_context_init_one(tor_tls_context_t **ppcontext,
|
|
|
|
|
|
#define NID_tor_default_ecdhe_group NID_X9_62_prime256v1
|
|
#define NID_tor_default_ecdhe_group NID_X9_62_prime256v1
|
|
|
|
|
|
|
|
+#define RSA_LINK_KEY_BITS 2048
|
|
|
|
+
|
|
|
|
|
|
* <b>identity</b> should be set to the identity key used to sign the
|
|
* <b>identity</b> should be set to the identity key used to sign the
|
|
* certificate.
|
|
* certificate.
|
|
@@ -1051,7 +1053,7 @@ tor_tls_context_new(crypto_pk_t *identity, unsigned int key_lifetime,
|
|
|
|
|
|
if (!(rsa = crypto_pk_new()))
|
|
if (!(rsa = crypto_pk_new()))
|
|
goto error;
|
|
goto error;
|
|
- if (crypto_pk_generate_key(rsa)<0)
|
|
+ if (crypto_pk_generate_key_with_bits(rsa, RSA_LINK_KEY_BITS)<0)
|
|
goto error;
|
|
goto error;
|
|
if (!is_client) {
|
|
if (!is_client) {
|
|
|
|
|