mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Merge remote-tracking branch 'origin/maint-0.2.2'
This commit is contained in:
@@ -777,6 +777,17 @@ crypto_pk_keysize(crypto_pk_env_t *env)
|
||||
return (size_t) RSA_size(env->key);
|
||||
}
|
||||
|
||||
/** Return the size of the public key modulus of <b>env</b>, in bits. */
|
||||
int
|
||||
crypto_pk_num_bits(crypto_pk_env_t *env)
|
||||
{
|
||||
tor_assert(env);
|
||||
tor_assert(env->key);
|
||||
tor_assert(env->key->n);
|
||||
|
||||
return BN_num_bits(env->key->n);
|
||||
}
|
||||
|
||||
/** Increase the reference count of <b>env</b>, and return it.
|
||||
*/
|
||||
crypto_pk_env_t *
|
||||
|
||||
@@ -119,6 +119,7 @@ int crypto_pk_write_private_key_to_filename(crypto_pk_env_t *env,
|
||||
int crypto_pk_check_key(crypto_pk_env_t *env);
|
||||
int crypto_pk_cmp_keys(crypto_pk_env_t *a, crypto_pk_env_t *b);
|
||||
size_t crypto_pk_keysize(crypto_pk_env_t *env);
|
||||
int crypto_pk_num_bits(crypto_pk_env_t *env);
|
||||
crypto_pk_env_t *crypto_pk_dup_key(crypto_pk_env_t *orig);
|
||||
crypto_pk_env_t *crypto_pk_copy_full(crypto_pk_env_t *orig);
|
||||
int crypto_pk_key_is_private(const crypto_pk_env_t *key);
|
||||
|
||||
Reference in New Issue
Block a user