[or-cvs] Add long-term format for dir-signing-key fields (commented ...
Nick Mathewson
nickm at seul.org
Tue Oct 12 15:52:59 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv26938/src/or
Modified Files:
dirserv.c
Log Message:
Add long-term format for dir-signing-key fields (commented out)
Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dirserv.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- dirserv.c 7 Oct 2004 21:10:40 -0000 1.91
+++ dirserv.c 12 Oct 2004 15:52:57 -0000 1.92
@@ -570,10 +570,19 @@
* everyone is running 0.0.9pre3 or later, we can shift to using a
* PEM-encoded key instead.
*/
+#if 1
if(crypto_pk_DER64_encode_public_key(private_key, &identity_pkey)<0) {
log_fn(LOG_WARN,"write identity_pkey to string failed!");
return -1;
}
+#else
+ { int l;
+ if(crypto_pk_write_public_key_to_string(private_key, &identity_pkey, &l)<0){
+ log_fn(LOG_WARN,"write identity_pkey to string failed!");
+ return -1;
+ }
+ }
+#endif
dirserv_remove_old_servers(ROUTER_MAX_AGE);
published_on = time(NULL);
format_iso_time(published, published_on);
@@ -774,11 +783,20 @@
* everyone is running 0.0.9pre3 or later, we can shift to using a
* PEM-encoded key instead.
*/
+#if 1
if(crypto_pk_DER64_encode_public_key(private_key, &identity_pkey)<0) {
log_fn(LOG_WARN,"write identity_pkey to string failed!");
tor_free(cp);
return -1;
}
+#else
+ { int l;
+ if(crypto_pk_write_public_key_to_string(private_key, &identity_pkey, &l)<0){
+ log_fn(LOG_WARN,"write identity_pkey to string failed!");
+ return -1;
+ }
+ }
+#endif
published_on = time(NULL);
format_iso_time(published, published_on);
sprintf(s, "network-status\n"
More information about the tor-commits
mailing list