mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 07:07:52 +01:00
warn, not err
svn:r630
This commit is contained in:
parent
efce1b8b3e
commit
dc85b7af3c
1 changed files with 3 additions and 4 deletions
|
@ -88,7 +88,6 @@ tor_tls_get_error(tor_tls *tls, int r, int extra,
|
||||||
case SSL_ERROR_SYSCALL:
|
case SSL_ERROR_SYSCALL:
|
||||||
if (extra&CATCH_SYSCALL)
|
if (extra&CATCH_SYSCALL)
|
||||||
return _TOR_TLS_SYSCALL;
|
return _TOR_TLS_SYSCALL;
|
||||||
assert(severity != LOG_ERR); /* XXX remove me when the bug is found */
|
|
||||||
log(severity, "TLS error: <syscall error> (errno=%d)",errno);
|
log(severity, "TLS error: <syscall error> (errno=%d)",errno);
|
||||||
tls_log_errors(severity, doing);
|
tls_log_errors(severity, doing);
|
||||||
return TOR_TLS_ERROR;
|
return TOR_TLS_ERROR;
|
||||||
|
@ -471,11 +470,11 @@ tor_tls_get_peer_cert_nickname(tor_tls *tls, char *buf, int buflen)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!(cert = SSL_get_peer_certificate(tls->ssl))) {
|
if (!(cert = SSL_get_peer_certificate(tls->ssl))) {
|
||||||
log_fn(LOG_ERR, "Peer has no certificate");
|
log_fn(LOG_WARN, "Peer has no certificate");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!(name = X509_get_subject_name(cert))) {
|
if (!(name = X509_get_subject_name(cert))) {
|
||||||
log_fn(LOG_ERR, "Peer certificate has no subject name");
|
log_fn(LOG_WARN, "Peer certificate has no subject name");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if ((nid = OBJ_txt2nid("commonName")) == NID_undef)
|
if ((nid = OBJ_txt2nid("commonName")) == NID_undef)
|
||||||
|
@ -485,7 +484,7 @@ tor_tls_get_peer_cert_nickname(tor_tls *tls, char *buf, int buflen)
|
||||||
if (lenout == -1)
|
if (lenout == -1)
|
||||||
return -1;
|
return -1;
|
||||||
if (strspn(buf, LEGAL_NICKNAME_CHARACTERS) != lenout) {
|
if (strspn(buf, LEGAL_NICKNAME_CHARACTERS) != lenout) {
|
||||||
log_fn(LOG_ERR, "Peer certificate nickname has illegal characters.");
|
log_fn(LOG_WARN, "Peer certificate nickname has illegal characters.");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue