int main(int argc, char **argv) { DSA *dsa; FILE *fp; int i; if (argc < 2) return 1; for (i = 0; i < argc-1; i++) { if ( !(fp = fopen( argv[i+1], "r"))) return 1; if ( !(dsa = PEM_read_DSA_PUBKEY(fp, NULL, NULL, NULL))) { fprintf(stderr, "Could not read public key from file\n"); return 1; } print_mpi( stdout, i, "P", dsa->p ); print_mpi( stdout, i, "Q", dsa->q ); print_mpi( stdout, i, "G", dsa->g ); print_mpi( stdout, i, "Y", dsa->pub_key ); fclose( fp ); } print_structs( stdout, argc-1 ); fprintf(stdout, "static int const dsa_key_count = %d;\n", argc-1); return 0; }
/* output GFF file */ void output(void) { print_structs(); }