]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Add more assertions (Calypso)
authorHarlan Stenn <stenn@ntp.org>
Sat, 23 Jun 2007 04:18:26 +0000 (00:18 -0400)
committerHarlan Stenn <stenn@ntp.org>
Sat, 23 Jun 2007 04:18:26 +0000 (00:18 -0400)
bk: 467c9f12KeWnZEfdSoFYmThWMIcl9Q

ntpd/ntp_crypto.c

index b7fa09e34521e8f60a613ee5afb876cace3f153f..ef7d73fede0a204f74a9d1f958347a905377b1dc 100644 (file)
@@ -16,7 +16,8 @@
 #include "ntp_stdlib.h"
 #include "ntp_unixtime.h"
 #include "ntp_string.h"
-#include <ntp_random.h>
+#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 =