~ubuntu-branches/debian/lenny/tor/lenny

« back to all changes in this revision

Viewing changes to src/or/or.h

  • Committer: Package Import Robot
  • Author(s): Peter Palfrader
  • Date: 2011-12-15 21:25:18 UTC
  • mfrom: (1.6.1) (6.1.16 sid)
  • Revision ID: package-import@ubuntu.com-20111215212518-4eaqirobd1uhcmxb
Tags: 0.2.1.32-1
New upstream version, fixing a heap overflow bug related to Tor's
SOCKS code (CVE-2011-2778).

Show diffs side-by-side

added added

removed removed

Lines of Context:
166
166
/** How often do we rotate onion keys? */
167
167
#define MIN_ONION_KEY_LIFETIME (7*24*60*60)
168
168
/** How often do we rotate TLS contexts? */
169
 
#define MAX_SSL_KEY_LIFETIME (2*60*60)
 
169
#define MAX_SSL_KEY_LIFETIME_INTERNAL (2*60*60)
 
170
/** What expiry time shall we place on our SSL certs? */
 
171
#define MAX_SSL_KEY_LIFETIME_ADVERTISED (365*24*60*60)
170
172
 
171
173
/** How old do we allow a router to get before removing it
172
174
 * from the router list? In seconds. */
1029
1031
   * because the connection is too old, or because there's a better one, etc.
1030
1032
   */
1031
1033
  unsigned int is_bad_for_new_circs:1;
 
1034
  /** True iff we have decided that the other end of this connection
 
1035
   * is a client.  Connections with this flag set should never be used
 
1036
   * to satisfy an EXTEND request.  */
 
1037
  unsigned int is_connection_with_client:1;
 
1038
  /** True iff this is an outgoing connection. */
 
1039
  unsigned int is_outgoing:1;
1032
1040
  uint8_t link_proto; /**< What protocol version are we using? 0 for
1033
1041
                       * "none negotiated yet." */
1034
1042
  circid_t next_circ_id; /**< Which circ_id do we try to use next on
4039
4047
                                   size_t request_len);
4040
4048
void rend_client_refetch_renddesc(const char *query);
4041
4049
void rend_client_refetch_v2_renddesc(const rend_data_t *rend_query);
 
4050
void rend_client_cancel_descriptor_fetches(void);
4042
4051
int rend_client_remove_intro_point(extend_info_t *failed_intro,
4043
4052
                                   const rend_data_t *rend_query);
4044
4053
int rend_client_rendezvous_acked(origin_circuit_t *circ,
4137
4146
void rend_cache_init(void);
4138
4147
void rend_cache_clean(void);
4139
4148
void rend_cache_clean_v2_descs_as_dir(void);
 
4149
void rend_cache_purge(void);
4140
4150
void rend_cache_free_all(void);
4141
4151
int rend_valid_service_id(const char *query);
4142
4152
int rend_cache_lookup_desc(const char *query, int version, const char **desc,
4144
4154
int rend_cache_lookup_entry(const char *query, int version,
4145
4155
                            rend_cache_entry_t **entry_out);
4146
4156
int rend_cache_lookup_v2_desc_as_dir(const char *query, const char **desc);
4147
 
int rend_cache_store(const char *desc, size_t desc_len, int published);
 
4157
int rend_cache_store(const char *desc, size_t desc_len, int published,
 
4158
                     const char *service_id);
4148
4159
int rend_cache_store_v2_desc_as_client(const char *desc,
4149
4160
                                       const rend_data_t *rend_query);
4150
4161
int rend_cache_store_v2_desc_as_dir(const char *desc);
4200
4211
 
4201
4212
crypto_pk_env_t *get_onion_key(void);
4202
4213
time_t get_onion_key_set_at(void);
4203
 
void set_identity_key(crypto_pk_env_t *k);
4204
 
crypto_pk_env_t *get_identity_key(void);
4205
 
int identity_key_is_set(void);
 
4214
void set_client_identity_key(crypto_pk_env_t *k);
 
4215
void set_server_identity_key(crypto_pk_env_t *k);
 
4216
crypto_pk_env_t *get_tlsclient_identity_key(void);
 
4217
crypto_pk_env_t *get_server_identity_key(void);
 
4218
int client_identity_key_is_set(void);
 
4219
int server_identity_key_is_set(void);
4206
4220
authority_cert_t *get_my_v3_authority_cert(void);
4207
4221
crypto_pk_env_t *get_my_v3_authority_signing_key(void);
4208
4222
authority_cert_t *get_my_v3_legacy_cert(void);
4234
4248
int authdir_mode_bridge(or_options_t *options);
4235
4249
 
4236
4250
int server_mode(or_options_t *options);
 
4251
int public_server_mode(or_options_t *options);
4237
4252
int advertised_server_mode(void);
4238
4253
int proxy_mode(or_options_t *options);
4239
4254
void consider_publishable_server(int force);