From: Harlan Stenn Date: Sun, 27 Dec 2009 05:40:27 +0000 (-0500) Subject: [Bug 1127] Properly check the return of X590_verify() - missed one X-Git-Tag: NTP_4_2_7P6~10^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4585f2183598fa24071df3c8e92cb4dfb8bb6057;p=thirdparty%2Fntp.git [Bug 1127] Properly check the return of X590_verify() - missed one bk: 4b36f34bL--O3TdMkIlepoItxt2wVg --- diff --git a/ChangeLog b/ChangeLog index b7300bdfc..007d11af1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ --- (4.2.6p1-RC2) 2009/12/25 Released by Harlan Stenn +* [Bug 1127] Properly check the return of X590_verify() - missed one. * [Bug 1411] Fix status messages in refclock_oncore.c. * [Bug 1416] MAXDNAME undefined on Solaris 2.6. * [Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir. diff --git a/util/ntp-keygen.c b/util/ntp-keygen.c index 3a85f0dc2..dd6b6549e 100644 --- a/util/ntp-keygen.c +++ b/util/ntp-keygen.c @@ -1926,7 +1926,7 @@ x509 ( * Sign and verify. */ X509_sign(cert, pkey, md); - if (!X509_verify(cert, pkey)) { + if (X509_verify(cert, pkey) <= 0) { fprintf(stderr, "Verify %s certificate fails\n%s\n", id, ERR_error_string(ERR_get_error(), NULL)); X509_free(cert);