84 int MAIN(
int,
char **);
86 int MAIN(
int argc,
char **argv)
94 int informat, outformat,
text=0, noout=0;
95 int pubin = 0, pubout = 0, param_out = 0;
96 char *infile, *outfile, *prog, *engine;
97 char *passargin = NULL, *passargout = NULL;
98 char *passin = NULL, *passout = NULL;
102 int new_asn1_flag = 0;
124 if (strcmp(*argv,
"-inform") == 0)
126 if (--argc < 1)
goto bad;
129 else if (strcmp(*argv,
"-outform") == 0)
131 if (--argc < 1)
goto bad;
134 else if (strcmp(*argv,
"-in") == 0)
136 if (--argc < 1)
goto bad;
139 else if (strcmp(*argv,
"-out") == 0)
141 if (--argc < 1)
goto bad;
144 else if (strcmp(*argv,
"-passin") == 0)
146 if (--argc < 1)
goto bad;
147 passargin= *(++argv);
149 else if (strcmp(*argv,
"-passout") == 0)
151 if (--argc < 1)
goto bad;
152 passargout= *(++argv);
154 else if (strcmp(*argv,
"-engine") == 0)
156 if (--argc < 1)
goto bad;
159 else if (strcmp(*argv,
"-noout") == 0)
161 else if (strcmp(*argv,
"-text") == 0)
163 else if (strcmp(*argv,
"-conv_form") == 0)
169 if (strcmp(*argv,
"compressed") == 0)
171 else if (strcmp(*argv,
"uncompressed") == 0)
173 else if (strcmp(*argv,
"hybrid") == 0)
178 else if (strcmp(*argv,
"-param_enc") == 0)
184 if (strcmp(*argv,
"named_curve") == 0)
186 else if (strcmp(*argv,
"explicit") == 0)
191 else if (strcmp(*argv,
"-param_out") == 0)
193 else if (strcmp(*argv,
"-pubin") == 0)
195 else if (strcmp(*argv,
"-pubout") == 0)
223 "possibly a hardware device.\n");
225 "instead of 'des' every other \n"
227 "supported by OpenSSL can be used\n");
231 "curve parameters\n");
233 "point conversion form \n");
237 " uncompressed (default)\n");
241 " the ec parameters are encoded\n");
245 " named_curve (default)\n");
253 #ifndef OPENSSL_NO_ENGINE
265 if ((in == NULL) || (out == NULL))
293 eckey = PEM_read_bio_EC_PUBKEY(in, NULL, NULL,
314 #ifdef OPENSSL_SYS_VMS
357 else if (pubin || pubout)
365 i = PEM_write_bio_ECPKParameters(out, group);
366 else if (pubin || pubout)
367 i = PEM_write_bio_EC_PUBKEY(out, eckey);
369 i = PEM_write_bio_ECPrivateKey(out, eckey, enc,
370 NULL, 0, NULL, passout);
403 static void *dummy=&dummy;