Add crypto to existing network class

This commit is contained in:
Keith Winstein
2011-08-04 04:52:47 -04:00
parent 215c75c6ea
commit 7824318c54
4 changed files with 96 additions and 72 deletions
+6 -3
View File
@@ -4,11 +4,14 @@
#include <stdio.h>
#include <stdlib.h>
#include "crypto.hpp"
static void dos_detected( const char *expression, const char *file, int line, const char *function )
{
fprintf( stderr, "Illegal counterparty input (possible denial of service) in function %s at %s:%d, failed test: %s\n",
function, file, line, expression );
exit( 1 );
char buffer[ 2048 ];
snprintf( buffer, 2048, "Illegal counterparty input (possible denial of service) in function %s at %s:%d, failed test: %s\n",
function, file, line, expression );
throw CryptoException( buffer );
}
#define dos_assert(expr) \