From: Harlan Stenn Date: Sat, 23 Jun 2007 04:18:26 +0000 (-0400) Subject: Add more assertions (Calypso) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22b2535d610910781ff61c1fdaec4e2bdc7d7ed6;p=thirdparty%2Fntp.git Add more assertions (Calypso) bk: 467c9f12KeWnZEfdSoFYmThWMIcl9Q --- diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c index b7fa09e345..ef7d73fede 100644 --- a/ntpd/ntp_crypto.c +++ b/ntpd/ntp_crypto.c @@ -16,7 +16,8 @@ #include "ntp_stdlib.h" #include "ntp_unixtime.h" #include "ntp_string.h" -#include +#include "ntp_random.h" +#include "ntp_assert.h" #include "openssl/asn1_mac.h" #include "openssl/bn.h" @@ -3066,6 +3067,8 @@ cert_parse( * objects at this time, since the real crunch can happen only * when the time is valid but not yet certificated. */ + NTP_INSIST(cert->cert_info != NULL); + NTP_INSIST(cert->cert_info->signature != NULL); ret->nid = OBJ_obj2nid(cert->cert_info->signature->algorithm); ret->digest = (const EVP_MD *)EVP_get_digestbynid(ret->nid); ret->serial =