diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-05-09 08:35:38 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-05-09 08:35:38 +0000 |
commit | b7a80920e26f53e354975a7252e3a1f33ef9192b (patch) | |
tree | 48bdba9b757b436021a4d714aed6aac75aeb76d8 /src/common | |
parent | 32065813ac34437971cb9c8a95a1923557d0557d (diff) | |
download | tor-b7a80920e26f53e354975a7252e3a1f33ef9192b.tar tor-b7a80920e26f53e354975a7252e3a1f33ef9192b.tar.gz |
r15558@tombo: nickm | 2008-05-09 04:35:12 -0400
New (temporary) tool to dump the modulus of a key. May help with a project of weasel's.
svn:r14580
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/crypto.c | 6 | ||||
-rw-r--r-- | src/common/crypto.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index 44fa3b2b4..55893fd98 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -258,6 +258,12 @@ _crypto_new_pk_env_evp_pkey(EVP_PKEY *pkey) return _crypto_new_pk_env_rsa(rsa); } +RSA * +_crypto_pk_env_get_rsa(crypto_pk_env_t *env) +{ + return env->key; +} + /** used by tortls.c: get an equivalent EVP_PKEY* for a crypto_pk_env_t. Iff * private is set, include the private-key portion of the key. */ EVP_PKEY * diff --git a/src/common/crypto.h b/src/common/crypto.h index 262733511..64b9097f5 100644 --- a/src/common/crypto.h +++ b/src/common/crypto.h @@ -199,6 +199,7 @@ void secret_to_key(char *key_out, size_t key_out_len, const char *secret, struct rsa_st; struct evp_pkey_st; struct dh_st; +struct rsa_st *_crypto_pk_env_get_rsa(crypto_pk_env_t *env); crypto_pk_env_t *_crypto_new_pk_env_rsa(struct rsa_st *rsa); crypto_pk_env_t *_crypto_new_pk_env_evp_pkey(struct evp_pkey_st *pkey); struct evp_pkey_st *_crypto_pk_env_get_evp_pkey(crypto_pk_env_t *env, |