Lines Matching refs:fp
119 gen_rsa_key(FILE *fp, size_t bits, unsigned long exp)
136 fprintf(fp, "# : PUB 0s%s\n", pubkey64->v);
137 fprintf(fp, ": RSA\t{\n");
138 fprintf(fp, "\t# RSA %zu bits\n", bits);
139 fprintf(fp, "\t# pubkey=0s%s\n", pubkey64->v);
140 fprintf(fp, "\tModulus: 0x%s\n", lowercase(BN_bn2hex(key->n)));
141 fprintf(fp, "\tPublicExponent: 0x%s\n", lowercase(BN_bn2hex(key->e)));
142 fprintf(fp, "\tPrivateExponent: 0x%s\n", lowercase(BN_bn2hex(key->d)));
143 fprintf(fp, "\tPrime1: 0x%s\n", lowercase(BN_bn2hex(key->p)));
144 fprintf(fp, "\tPrime2: 0x%s\n", lowercase(BN_bn2hex(key->q)));
145 fprintf(fp, "\tExponent1: 0x%s\n", lowercase(BN_bn2hex(key->dmp1)));
146 fprintf(fp, "\tExponent2: 0x%s\n", lowercase(BN_bn2hex(key->dmq1)));
147 fprintf(fp, "\tCoefficient: 0x%s\n", lowercase(BN_bn2hex(key->iqmp)));
148 fprintf(fp, " }\n");
158 FILE *fp = stdout;
193 fp = fopen(fname, "w");
194 if (fp == NULL) {
203 gen_rsa_key(fp, bits, pubexp);
205 fclose(fp);