Commit 2d514037 authored by Nick Mathewson's avatar Nick Mathewson 🐘
Browse files

Log number of certs in wrong-length chains


svn:r2078
parent ddb6eb35
Loading
Loading
Loading
Loading
+2 −1
Changes for src/common/tortls.c: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -623,7 +623,8 @@ tor_tls_verify(tor_tls *tls, crypto_pk_env_t **identity_key)
  if (!(chain = SSL_get_peer_cert_chain(tls->ssl)))
    goto done;
  if (sk_X509_num(chain) != 2) {
    log_fn(LOG_WARN,"Unexpected number of certificates in chain");
    log_fn(LOG_WARN,"Unexpected number of certificates in chain (%d)",
           sk_X509_num(chain));
    goto done;
  }
  for (i=0; i<2; ++i) {