aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-03-31 21:35:23 +0000
committerNick Mathewson <nickm@torproject.org>2004-03-31 21:35:23 +0000
commitbf83b1e345bcdcdd95950ce5decf6c19cbc93568 (patch)
treef253c616c1b1d0048a84c8ed95ba8623bec423aa /src/or/router.c
parent157cd7fe1528be75b3064642ec1f3a3db8f77ca7 (diff)
downloadtor-bf83b1e345bcdcdd95950ce5decf6c19cbc93568.tar
tor-bf83b1e345bcdcdd95950ce5decf6c19cbc93568.tar.gz
Add code to configure hidden services, parse configuration, generate keys and service IDs, and store/load them from disk
svn:r1410
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c
index fe1cc070c..bf7c2247b 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -44,7 +44,11 @@ crypto_pk_env_t *get_identity_key(void) {
/************************************************************/
-static crypto_pk_env_t *init_key_from_file(const char *fname)
+/* Try to read an RSA key from 'fname'. If 'fname' doesn't exist, create a new
+ * RSA key and save it in 'fname'. Return the read/created key, or NULL on
+ * error.
+ */
+crypto_pk_env_t *init_key_from_file(const char *fname)
{
crypto_pk_env_t *prkey = NULL;
int fd = -1;