summaryrefslogtreecommitdiff
path: root/src/common/crypto.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-08-08 14:36:11 +0000
committerNick Mathewson <nickm@torproject.org>2008-08-08 14:36:11 +0000
commit22259a08771275acf8ee7396b9a948385750039a (patch)
treef082809203c939a48bf6c3433225145b953b14d7 /src/common/crypto.h
parentf6879caa0447a5fd65ff07d210146393d27cb88e (diff)
downloadtor-22259a08771275acf8ee7396b9a948385750039a.tar.gz
tor-22259a08771275acf8ee7396b9a948385750039a.zip
The first of Karsten's proposal 121 patches: configure and maintain client authorization data. Tweaked a bit: see comments on or-dev.
svn:r16475
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r--src/common/crypto.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 64b9097f5e..a0ddd3da20 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -79,8 +79,12 @@ int crypto_pk_read_private_key_from_filename(crypto_pk_env_t *env,
const char *keyfile);
int crypto_pk_write_public_key_to_string(crypto_pk_env_t *env,
char **dest, size_t *len);
+int crypto_pk_write_private_key_to_string(crypto_pk_env_t *env,
+ char **dest, size_t *len);
int crypto_pk_read_public_key_from_string(crypto_pk_env_t *env,
const char *src, size_t len);
+int crypto_pk_read_private_key_from_string(crypto_pk_env_t *env,
+ const char *s);
int crypto_pk_write_private_key_to_filename(crypto_pk_env_t *env,
const char *fname);
@@ -88,6 +92,7 @@ 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);
crypto_pk_env_t *crypto_pk_dup_key(crypto_pk_env_t *orig);
+int crypto_pk_key_is_private(const crypto_pk_env_t *key);
int crypto_pk_public_encrypt(crypto_pk_env_t *env, char *to,
const char *from, size_t fromlen, int padding);
@@ -206,8 +211,6 @@ struct evp_pkey_st *_crypto_pk_env_get_evp_pkey(crypto_pk_env_t *env,
int private);
struct dh_st *_crypto_dh_env_get_dh(crypto_dh_env_t *dh);
/* Prototypes for private functions only used by crypto.c and test.c*/
-int crypto_pk_read_private_key_from_string(crypto_pk_env_t *env,
- const char *s);
void add_spaces_to_fp(char *out, size_t outlen, const char *in);
#endif