aboutsummaryrefslogtreecommitdiff
path: root/src/orkeygen/orkeygen.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2002-09-24 10:43:57 +0000
committerRoger Dingledine <arma@torproject.org>2002-09-24 10:43:57 +0000
commit253f0f160e1185cbab507920b6391064757be677 (patch)
tree19ca43835dff932ff14921ac32b78ead6150c253 /src/orkeygen/orkeygen.c
parentc262b34a3c49b7ab6ae9d826b86c5ad16088cf5f (diff)
downloadtor-253f0f160e1185cbab507920b6391064757be677.tar
tor-253f0f160e1185cbab507920b6391064757be677.tar.gz
laying the groundwork for dynamic router lists
revamped the router reading section reference counting for crypto pk env's (so we can dup them) we now read and write pem pk keys from string rather than from FILE*, in anticipation of fetching directories over a socket (so now on startup we slurp in the whole file, then parse it as a string) fixed a bug in the proxy side, where you could get some circuits wedged if they showed up while the connection was being made svn:r110
Diffstat (limited to 'src/orkeygen/orkeygen.c')
-rw-r--r--src/orkeygen/orkeygen.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/orkeygen/orkeygen.c b/src/orkeygen/orkeygen.c
index 8e4c87fff..d26a9237e 100644
--- a/src/orkeygen/orkeygen.c
+++ b/src/orkeygen/orkeygen.c
@@ -8,6 +8,20 @@
/*
* Changes :
* $Log$
+ * Revision 1.3 2002/09/24 10:43:57 arma
+ * laying the groundwork for dynamic router lists
+ *
+ * revamped the router reading section
+ *
+ * reference counting for crypto pk env's (so we can dup them)
+ *
+ * we now read and write pem pk keys from string rather than from FILE*,
+ * in anticipation of fetching directories over a socket
+ * (so now on startup we slurp in the whole file, then parse it as a string)
+ *
+ * fixed a bug in the proxy side, where you could get some circuits
+ * wedged if they showed up while the connection was being made
+ *
* Revision 1.2 2002/07/25 08:18:05 badbytes
* Updated to use crypto.h instead of OpenSSL.
*
@@ -20,6 +34,13 @@
*
*/
+/* likely obsoleted by:
+ *
+ * openssl genrsa -out private.pem 1024
+ * openssl rsa -in private.pem -pubout -out public.pem
+ *
+ */
+
#include <stdlib.h>
#include <stdio.h>
@@ -84,7 +105,7 @@ int main(int argc, char *argv[])
}
/* write the private key */
- if (crypto_pk_write_private_key(env, f_pr) == -1)
+ if (crypto_pk_write_private_key_to_file(env, f_pr) == -1)
{
printf("%s",crypto_perror());
fclose(f_pr);
@@ -94,7 +115,7 @@ int main(int argc, char *argv[])
}
/* write the public key */
- if (crypto_pk_write_public_key(env, f_pu) == -1)
+ if (crypto_pk_write_public_key_to_file(env, f_pu) == -1)
{
printf("%s",crypto_perror());
fclose(f_pr);