Changeset 472

Show
Ignore:
Timestamp:
05/04/07 16:36:53
Author:
rachel
Message:

make sure it compiles

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openpgpsdk/trunk/tests/test_crypt_mpi.c

    r471 r472  
    9999 
    100100    // is it the same? 
    101     int n=strncmp((char *)buf,(char *)out,sizeof(buf)); 
    102     printf ("n=%d\n",n); 
     101    CU_ASSERT(strncmp((char *)buf,(char *)out,sizeof(buf))==0); 
    103102    } 
    104103 
  • openpgpsdk/trunk/tests/test_rsa_encrypt.c

    r471 r472  
    1 #include <assert.h> 
    2 #include <stdio.h> 
    3 #include <string.h> 
    4 #include <stdlib.h> 
    5 #include <unistd.h> 
    6 #include <fcntl.h> 
    7 #include <sys/stat.h> 
    8 #include <sys/types.h> 
    9  
    101#include "CUnit/Basic.h" 
    112 
     3#include <openpgpsdk/types.h> 
     4#include "openpgpsdk/keyring.h" 
    125#include <openpgpsdk/armour.h> 
    13 #include "openpgpsdk/keyring.h" 
    146#include "openpgpsdk/packet.h" 
    157#include "openpgpsdk/packet-parse.h" 
    168#include "openpgpsdk/util.h" 
    179#include "openpgpsdk/std_print.h" 
     10 
     11#include "tests.h" 
    1812 
    1913/*  
     
    2620#define MAXBUF 128 
    2721static char pub_keyring_name[MAXBUF+1]; 
    28 static char dir[MAXBUF+1]; 
    2922static char keydetails[MAXBUF+1]; 
    3023static ops_keyring_t pub_keyring; 
     
    180173#endif 
    181174 
    182 static int mktmpdir (void) 
    183     { 
    184     int limit=10; // don't try indefinitely 
    185     long int rnd=0; 
    186     while (limit--)  
    187         { 
    188         rnd=random(); 
    189         snprintf(dir,MAXBUF,"./testdir.encrypt.%ld",rnd); 
    190  
    191         // Try to create directory 
    192         if (!mkdir(dir,0700)) 
    193             { 
    194             // success 
    195             return 1; 
    196             } 
    197         else 
    198             { 
    199             fprintf (stderr,"Couldn't open dir: errno=%d\n", errno); 
    200             perror(NULL); 
    201             } 
    202         } 
    203     return 0; 
    204     } 
    205  
    206175 
    207176/* Decryption suite initialization.