mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Library files moved to use platform layer
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* RFC 1115/1319 compliant MD2 implementation
|
||||
*
|
||||
* Copyright (C) 2006-2013, Brainspark B.V.
|
||||
* Copyright (C) 2006-2014, Brainspark B.V.
|
||||
*
|
||||
* This file is part of PolarSSL (http://www.polarssl.org)
|
||||
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
|
||||
@ -39,6 +39,12 @@
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_printf printf
|
||||
#endif
|
||||
|
||||
#if !defined(POLARSSL_MD2_ALT)
|
||||
|
||||
static const unsigned char PI_SUBST[256] =
|
||||
@ -340,7 +346,7 @@ int md2_self_test( int verbose )
|
||||
for( i = 0; i < 7; i++ )
|
||||
{
|
||||
if( verbose != 0 )
|
||||
printf( " MD2 test #%d: ", i + 1 );
|
||||
polarssl_printf( " MD2 test #%d: ", i + 1 );
|
||||
|
||||
md2( (unsigned char *) md2_test_str[i],
|
||||
strlen( md2_test_str[i] ), md2sum );
|
||||
@ -348,17 +354,17 @@ int md2_self_test( int verbose )
|
||||
if( memcmp( md2sum, md2_test_sum[i], 16 ) != 0 )
|
||||
{
|
||||
if( verbose != 0 )
|
||||
printf( "failed\n" );
|
||||
polarssl_printf( "failed\n" );
|
||||
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
if( verbose != 0 )
|
||||
printf( "passed\n" );
|
||||
polarssl_printf( "passed\n" );
|
||||
}
|
||||
|
||||
if( verbose != 0 )
|
||||
printf( "\n" );
|
||||
polarssl_printf( "\n" );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
Reference in New Issue
Block a user