[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Downgrade a few INFO level logs to DEBUG again. Also add t...
Update of /home/or/cvsroot/tor/src/common
In directory moria:/tmp/cvs-serv27959/common
Modified Files:
crypto.c tortls.c
Log Message:
Downgrade a few INFO level logs to DEBUG again. Also add two or three new
logs in cases where a calling function's log was downgraded and we wouldn't
get any log message otherwise.
Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/crypto.c,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -d -r1.168 -r1.169
--- crypto.c 8 Oct 2005 05:47:15 -0000 1.168
+++ crypto.c 17 Oct 2005 16:21:41 -0000 1.169
@@ -738,7 +738,7 @@
env->key, crypto_get_rsa_padding(padding));
if (r<0) {
- crypto_log_errors(warnOnFailure?LOG_WARN:LOG_INFO,
+ crypto_log_errors(warnOnFailure?LOG_WARN:LOG_DEBUG,
"performing RSA decryption");
return -1;
}
@@ -942,7 +942,7 @@
}
outlen = crypto_pk_private_decrypt(env,buf,from,pkeylen,padding,warnOnFailure);
if (outlen<0) {
- log_fn(warnOnFailure?LOG_WARN:LOG_INFO, "Error decrypting public-key data");
+ log_fn(warnOnFailure?LOG_WARN:LOG_DEBUG, "Error decrypting public-key data");
return -1;
}
if (outlen < CIPHER_KEY_LEN) {
@@ -1425,8 +1425,10 @@
tor_assert(dh->dh->pub_key);
bytes = BN_num_bytes(dh->dh->pub_key);
tor_assert(bytes >= 0);
- if (pubkey_len < (size_t)bytes)
+ if (pubkey_len < (size_t)bytes) {
+ log_fn(LOG_WARN, "Weird! pubkey_len (%d) was smaller than DH_BYTES (%d)", (int) pubkey_len, bytes);
return -1;
+ }
memset(pubkey, 0, pubkey_len);
BN_bn2bin(dh->dh->pub_key, (unsigned char*)(pubkey+(pubkey_len-bytes)));
Index: tortls.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/tortls.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- tortls.c 17 Oct 2005 00:35:51 -0000 1.106
+++ tortls.c 17 Oct 2005 16:21:41 -0000 1.107
@@ -479,7 +479,7 @@
r = SSL_read(tls->ssl, cp, len);
if (r > 0)
return r;
- err = tor_tls_get_error(tls, r, CATCH_ZERO, "reading", LOG_INFO);
+ err = tor_tls_get_error(tls, r, CATCH_ZERO, "reading", LOG_DEBUG);
if (err == _TOR_TLS_ZERORETURN) {
log_fn(LOG_DEBUG,"read returned r=%d; TLS is closed",r);
tls->state = TOR_TLS_ST_CLOSED;