tests/pa/test_import.c

/* [<][>]
[^][v][top][bottom][index][help] */

FUNCTIONS

This source file includes following functions.
  1. main

   1 #include <stdio.h>
   2 
   3 #include "gpg.h"
   4 
   5 extern struct VerifySignObject verifySignObj;
   6 extern struct ReadCryptedObject readCryptedObj;
   7 extern struct ImportKeyObject importKeyObj;
   8 
   9 int main(int argc, char **argv)
     /* [<][>][^][v][top][bottom][index][help] */
  10 {
  11 
  12   char iSignedFilename[100] = "foo.asc";
  13   char iSignatureFilename[100] = "";
  14   char iImportKeyFilename[100] = "goo";
  15   char iKeyRing[100] = "/home/filippo/.gnupg/pubring.gpg";
  16   int i;
  17 
  18 
  19   /*  char iCryptedFilename[100] = "foo.asc"; */
  20 
  21   /*  readCryptedObj.iFilename = iCryptedFilename;  
  22 
  23   PA_Decrypt( &readCryptedObj );
  24   printf("cryptedObj status:\n");
  25 
  26   printf("output buffer: %s\n", readCryptedObj.oStream);
  27   */
  28 
  29   importKeyObj.iFilename = iImportKeyFilename;
  30   importKeyObj.keyRing = iKeyRing;
  31   
  32   /*   unlink("/home/filippo/.gnupg/.PAlock"); */
  33   
  34   for (i = 0; i< 1000; i++) {
  35     printf("Iteration %02d \n", i);
  36     PA_ImportKey(&importKeyObj);
  37   }
  38   
  39   printf("importKeyObj status:\n");
  40   
  41   printf("isValid: %d\n", importKeyObj.rc);
  42   printf("keyID: %08lX\n", importKeyObj.keyID);
  43 
  44   return 0;
  45 }

/* [<][>][^][v][top][bottom][index][help] */