60 #ifndef OPENSSL_NO_DSA
95 int MAIN(
int,
char **);
97 int MAIN(
int argc,
char **argv)
105 int informat,outformat,
text=0,noout=0;
106 int pubin = 0, pubout = 0;
107 char *infile,*outfile,*prog;
108 #ifndef OPENSSL_NO_ENGINE
111 char *passargin = NULL, *passargout = NULL;
112 char *passin = NULL, *passout = NULL;
126 #ifndef OPENSSL_NO_ENGINE
139 if (strcmp(*argv,
"-inform") == 0)
141 if (--argc < 1)
goto bad;
144 else if (strcmp(*argv,
"-outform") == 0)
146 if (--argc < 1)
goto bad;
149 else if (strcmp(*argv,
"-in") == 0)
151 if (--argc < 1)
goto bad;
154 else if (strcmp(*argv,
"-out") == 0)
156 if (--argc < 1)
goto bad;
159 else if (strcmp(*argv,
"-passin") == 0)
161 if (--argc < 1)
goto bad;
162 passargin= *(++argv);
164 else if (strcmp(*argv,
"-passout") == 0)
166 if (--argc < 1)
goto bad;
167 passargout= *(++argv);
169 #ifndef OPENSSL_NO_ENGINE
170 else if (strcmp(*argv,
"-engine") == 0)
172 if (--argc < 1)
goto bad;
176 else if (strcmp(*argv,
"-pvk-strong") == 0)
178 else if (strcmp(*argv,
"-pvk-weak") == 0)
180 else if (strcmp(*argv,
"-pvk-none") == 0)
182 else if (strcmp(*argv,
"-noout") == 0)
184 else if (strcmp(*argv,
"-text") == 0)
186 else if (strcmp(*argv,
"-modulus") == 0)
188 else if (strcmp(*argv,
"-pubin") == 0)
190 else if (strcmp(*argv,
"-pubout") == 0)
213 #ifndef OPENSSL_NO_ENGINE
217 BIO_printf(
bio_err,
" -des3 encrypt PEM output with ede cbc des using 168 bit key\n");
218 #ifndef OPENSSL_NO_IDEA
221 #ifndef OPENSSL_NO_AES
225 #ifndef OPENSSL_NO_CAMELLIA
229 #ifndef OPENSSL_NO_SEED
240 #ifndef OPENSSL_NO_ENGINE
251 if ((in == NULL) || (out == NULL))
275 passin, e,
"Public Key");
278 passin, e,
"Private Key");
296 #ifdef OPENSSL_SYS_VMS
322 fprintf(stdout,
"Public Key=");
324 fprintf(stdout,
"\n");
334 i=PEM_write_bio_DSA_PUBKEY(out,dsa);
335 else i=PEM_write_bio_DSAPrivateKey(out,dsa,enc,
336 NULL,0,NULL, passout);
337 #if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_RC4)
344 else if (pubin || pubout)
373 static void *dummy=&dummy;