mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-03-06 04:23:01 +00:00
modify programs/*.c to use polarssl_snprintf
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_snprintf snprintf
|
||||
#define polarssl_printf printf
|
||||
#endif
|
||||
|
||||
@@ -133,7 +134,7 @@ int main( int argc, char *argv[] )
|
||||
/*
|
||||
* Write the signature into <filename>-sig.txt
|
||||
*/
|
||||
snprintf( filename, sizeof(filename), "%s.sig", argv[2] );
|
||||
polarssl_snprintf( filename, sizeof(filename), "%s.sig", argv[2] );
|
||||
|
||||
if( ( f = fopen( filename, "wb+" ) ) == NULL )
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_snprintf snprintf
|
||||
#define polarssl_printf printf
|
||||
#endif
|
||||
|
||||
@@ -94,7 +95,7 @@ int main( int argc, char *argv[] )
|
||||
* Extract the signature from the text file
|
||||
*/
|
||||
ret = 1;
|
||||
snprintf( filename, sizeof(filename), "%s.sig", argv[2] );
|
||||
polarssl_snprintf( filename, sizeof(filename), "%s.sig", argv[2] );
|
||||
|
||||
if( ( f = fopen( filename, "rb" ) ) == NULL )
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_snprintf snprintf
|
||||
#define polarssl_printf printf
|
||||
#endif
|
||||
|
||||
@@ -143,7 +144,7 @@ int main( int argc, char *argv[] )
|
||||
/*
|
||||
* Write the signature into <filename>-sig.txt
|
||||
*/
|
||||
snprintf( filename, 512, "%s.sig", argv[2] );
|
||||
polarssl_snprintf( filename, 512, "%s.sig", argv[2] );
|
||||
|
||||
if( ( f = fopen( filename, "wb+" ) ) == NULL )
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_snprintf snprintf
|
||||
#define polarssl_printf printf
|
||||
#endif
|
||||
|
||||
@@ -105,7 +106,7 @@ int main( int argc, char *argv[] )
|
||||
* Extract the RSA signature from the text file
|
||||
*/
|
||||
ret = 1;
|
||||
snprintf( filename, 512, "%s.sig", argv[2] );
|
||||
polarssl_snprintf( filename, 512, "%s.sig", argv[2] );
|
||||
|
||||
if( ( f = fopen( filename, "rb" ) ) == NULL )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user