summaryrefslogtreecommitdiff
path: root/src/lib/tls/x509.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-08-23 14:03:00 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-04 14:52:35 -0400
commit7163389b550a36fa017f700713405fc3c89dc234 (patch)
tree50bafc5964a7a9eac229d3b47635f1bb1050689f /src/lib/tls/x509.c
parent02086a216f15fd8c45e603a8d9bab482f60753f4 (diff)
downloadtor-7163389b550a36fa017f700713405fc3c89dc234.tar.gz
tor-7163389b550a36fa017f700713405fc3c89dc234.zip
Several unit tests to improve test coverage of x509*.c
Diffstat (limited to 'src/lib/tls/x509.c')
-rw-r--r--src/lib/tls/x509.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/tls/x509.c b/src/lib/tls/x509.c
index cff1c1302c..c88298b6cf 100644
--- a/src/lib/tls/x509.c
+++ b/src/lib/tls/x509.c
@@ -118,6 +118,7 @@ tor_x509_cert_new,(tor_x509_cert_impl_t *x509_cert))
crypto_pk_t *pk = tor_tls_cert_get_key(cert);
if (pk) {
if (crypto_pk_get_common_digests(pk, &cert->pkey_digests) < 0) {
+ log_warn(LD_CRYPTO, "unable to compute digests of certificate key");
crypto_pk_free(pk);
goto err;
}
@@ -128,10 +129,8 @@ tor_x509_cert_new,(tor_x509_cert_impl_t *x509_cert))
return cert;
err:
- /* LCOV_EXCL_START for the same reason as the exclusion above */
tor_free(cert);
log_err(LD_CRYPTO, "Couldn't wrap encoded X509 certificate.");
tor_x509_cert_impl_free_(x509_cert);
return NULL;
- /* LCOV_EXCL_STOP */
}