diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-08-23 14:03:00 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-04 14:52:35 -0400 |
commit | 7163389b550a36fa017f700713405fc3c89dc234 (patch) | |
tree | 50bafc5964a7a9eac229d3b47635f1bb1050689f /src/lib/tls/x509_nss.c | |
parent | 02086a216f15fd8c45e603a8d9bab482f60753f4 (diff) | |
download | tor-7163389b550a36fa017f700713405fc3c89dc234.tar.gz tor-7163389b550a36fa017f700713405fc3c89dc234.zip |
Several unit tests to improve test coverage of x509*.c
Diffstat (limited to 'src/lib/tls/x509_nss.c')
-rw-r--r-- | src/lib/tls/x509_nss.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/tls/x509_nss.c b/src/lib/tls/x509_nss.c index 35b3d2542b..68aebbb69a 100644 --- a/src/lib/tls/x509_nss.c +++ b/src/lib/tls/x509_nss.c @@ -62,9 +62,11 @@ tor_tls_create_certificate_internal(crypto_pk_t *rsa, validity = CERT_CreateValidity(((PRTime)start_time) * PRTIME_PER_SEC, ((PRTime)end_time) * PRTIME_PER_SEC); - if (! validity) { + if (BUG(! validity)) { + /* LCOV_EXCL_START */ crypto_nss_log_errors(LOG_WARN, "creating a validity object"); goto err; + /* LCOV_EXCL_STOP */ } unsigned long serial_number; |