mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
Add long-term format for dir-signing-key fields (commented out)
svn:r2442
This commit is contained in:
parent
0383afac9a
commit
43ef5a3e37
@ -570,10 +570,19 @@ dirserv_dump_directory_to_string(char *s, unsigned int maxlen,
|
|||||||
* everyone is running 0.0.9pre3 or later, we can shift to using a
|
* everyone is running 0.0.9pre3 or later, we can shift to using a
|
||||||
* PEM-encoded key instead.
|
* PEM-encoded key instead.
|
||||||
*/
|
*/
|
||||||
|
#if 1
|
||||||
if(crypto_pk_DER64_encode_public_key(private_key, &identity_pkey)<0) {
|
if(crypto_pk_DER64_encode_public_key(private_key, &identity_pkey)<0) {
|
||||||
log_fn(LOG_WARN,"write identity_pkey to string failed!");
|
log_fn(LOG_WARN,"write identity_pkey to string failed!");
|
||||||
return -1;
|
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);
|
dirserv_remove_old_servers(ROUTER_MAX_AGE);
|
||||||
published_on = time(NULL);
|
published_on = time(NULL);
|
||||||
format_iso_time(published, published_on);
|
format_iso_time(published, published_on);
|
||||||
@ -774,11 +783,20 @@ static int generate_runningrouters(crypto_pk_env_t *private_key)
|
|||||||
* everyone is running 0.0.9pre3 or later, we can shift to using a
|
* everyone is running 0.0.9pre3 or later, we can shift to using a
|
||||||
* PEM-encoded key instead.
|
* PEM-encoded key instead.
|
||||||
*/
|
*/
|
||||||
|
#if 1
|
||||||
if(crypto_pk_DER64_encode_public_key(private_key, &identity_pkey)<0) {
|
if(crypto_pk_DER64_encode_public_key(private_key, &identity_pkey)<0) {
|
||||||
log_fn(LOG_WARN,"write identity_pkey to string failed!");
|
log_fn(LOG_WARN,"write identity_pkey to string failed!");
|
||||||
tor_free(cp);
|
tor_free(cp);
|
||||||
return -1;
|
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);
|
published_on = time(NULL);
|
||||||
format_iso_time(published, published_on);
|
format_iso_time(published, published_on);
|
||||||
sprintf(s, "network-status\n"
|
sprintf(s, "network-status\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user