LTC: add cursory guards against unfilled modular dependencies (for code we hit...)
authorMarc Cannon <vyhdycokio@gmail.com>
Thu, 24 Jan 2013 11:38:39 +0000 (06:38 -0500)
committerPat Mac <itgpmc@gmail.com>
Thu, 7 Feb 2013 09:36:19 +0000 (01:36 -0800)
src/libtomcrypt/src/hashes/sha2/sha224.c
src/libtomcrypt/src/hashes/sha2/sha384.c
src/libtomcrypt/src/headers/tomcrypt_prng.h

index 655e203..204c01b 100644 (file)
 
 #ifdef LTC_SHA224
 
+#ifndef LTC_SHA256\r
+       #error SHA224 requires LTC_SHA256\r
+#endif
+
 /**
    @param sha224.c
    LTC_SHA-224 new NIST standard based off of LTC_SHA-256 truncated to 224 bits (Tom St Denis)
index 2a67df6..105e87f 100644 (file)
 
 #ifdef LTC_SHA384
 
+#ifndef LTC_SHA512\r
+       #error SHA384 requires LTC_SHA512\r
+#endif
+
 /** 
    @param sha384.c
    LTC_SHA384 hash included in sha512.c, Tom St Denis
index 508159d..847ccca 100644 (file)
@@ -1,5 +1,9 @@
 /* ---- PRNG Stuff ---- */
 #ifdef LTC_YARROW
+#ifndef LTC_CTR_MODE
+       #error Yarrow requires LTC_CTR_MODE
+#endif
+
 struct yarrow_prng {
     int                   cipher, hash;
     unsigned char         pool[MAXBLOCKSIZE];