#include <stdio.h>
#include <libpgp5.h>
void main()
{

  FILE *fp, *sfp;
  char kfn[] = "pubone.pkr";
  char skfn[] = "secring.skr";

  DSA *dsakey;
  unsigned long long keyid = 0;
  unsigned char *pp = NULL;

  dsakey = DSA_new();
  setkeyring5(kfn);
  getsecpubkey5(NULL, &dsakey, NULL, &keyid);
  DSA_free(dsakey);
  dsakey = DSA_new();
  setkeyring5(skfn);
  getsecpubkey5(NULL, &dsakey, pp, &keyid);

  fp = fopen(kfn, "rb");
  sfp = fopen("sigfile.out", "wb");

  makesig5(dsakey, fp, sfp, keyid, 0, 2, 0x11);

}
