aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
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;