Security fixes brought forward from 0.9.7.
[openssl.git] / crypto / cryptlib.h
index 88e4ae509f45155eb27108c1a048cc277a65f160..b8727aa6e1a591ef2c4819703fa233e707b958d5 100644 (file)
@@ -89,9 +89,13 @@ extern "C" {
 #define X509_CERT_DIR_EVP        "SSL_CERT_DIR"
 #define X509_CERT_FILE_EVP       "SSL_CERT_FILE"
 
-/* size of string represenations */
-#define DECIMAL_SIZE(type)     ((sizeof(type)*8+2)/3+1)
-#define HEX_SIZE(type)         ((sizeof(type)*2)
+/* size of string representations */
+#define DECIMAL_SIZE(type)     ((sizeof(type)*8+2)/3+1)
+#define HEX_SIZE(type)         (sizeof(type)*2)
+
+/* die if we have to */
+void OpenSSLDie(const char *file,int line,const char *assertion);
+#define OPENSSL_assert(e)      ((e) ? (void)0 : OpenSSLDie(__FILE__, __LINE__, #e))
 
 #ifdef  __cplusplus
 }