Deleted Added
full compact
pkeyparam.c (1.1.1.3) pkeyparam.c (1.1.1.4)
1/* apps/pkeyparam.c */
2/*
3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
4 * 2006
5 */
6/* ====================================================================
7 * Copyright (c) 2006 The OpenSSL Project. All rights reserved.
8 *

--- 60 unchanged lines hidden (view full) ---

69
70int MAIN(int argc, char **argv)
71{
72 char **args, *infile = NULL, *outfile = NULL;
73 BIO *in = NULL, *out = NULL;
74 int text = 0, noout = 0;
75 EVP_PKEY *pkey = NULL;
76 int badarg = 0;
1/* apps/pkeyparam.c */
2/*
3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
4 * 2006
5 */
6/* ====================================================================
7 * Copyright (c) 2006 The OpenSSL Project. All rights reserved.
8 *

--- 60 unchanged lines hidden (view full) ---

69
70int MAIN(int argc, char **argv)
71{
72 char **args, *infile = NULL, *outfile = NULL;
73 BIO *in = NULL, *out = NULL;
74 int text = 0, noout = 0;
75 EVP_PKEY *pkey = NULL;
76 int badarg = 0;
77#ifndef OPENSSL_NO_ENGINE
78 char *engine = NULL;
77 char *engine = NULL;
79#endif
78 ENGINE *e = NULL;
80 int ret = 1;
81
82 if (bio_err == NULL)
83 bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
84
85 if (!load_config(bio_err, NULL))
86 goto end;
87

--- 41 unchanged lines hidden (view full) ---

129 BIO_printf(bio_err,
130 "-noout don't output encoded parameters\n");
131#ifndef OPENSSL_NO_ENGINE
132 BIO_printf(bio_err,
133 "-engine e use engine e, possibly a hardware device.\n");
134#endif
135 return 1;
136 }
79 int ret = 1;
80
81 if (bio_err == NULL)
82 bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
83
84 if (!load_config(bio_err, NULL))
85 goto end;
86

--- 41 unchanged lines hidden (view full) ---

128 BIO_printf(bio_err,
129 "-noout don't output encoded parameters\n");
130#ifndef OPENSSL_NO_ENGINE
131 BIO_printf(bio_err,
132 "-engine e use engine e, possibly a hardware device.\n");
133#endif
134 return 1;
135 }
137#ifndef OPENSSL_NO_ENGINE
138 setup_engine(bio_err, engine, 0);
139#endif
136 e = setup_engine(bio_err, engine, 0);
140
141 if (infile) {
142 if (!(in = BIO_new_file(infile, "r"))) {
143 BIO_printf(bio_err, "Can't open input file %s\n", infile);
144 goto end;
145 }
146 } else
147 in = BIO_new_fp(stdin, BIO_NOCLOSE);

--- 25 unchanged lines hidden (view full) ---

173
174 if (text)
175 EVP_PKEY_print_params(out, pkey, 0, NULL);
176
177 ret = 0;
178
179 end:
180 EVP_PKEY_free(pkey);
137
138 if (infile) {
139 if (!(in = BIO_new_file(infile, "r"))) {
140 BIO_printf(bio_err, "Can't open input file %s\n", infile);
141 goto end;
142 }
143 } else
144 in = BIO_new_fp(stdin, BIO_NOCLOSE);

--- 25 unchanged lines hidden (view full) ---

170
171 if (text)
172 EVP_PKEY_print_params(out, pkey, 0, NULL);
173
174 ret = 0;
175
176 end:
177 EVP_PKEY_free(pkey);
178 release_engine(e);
181 BIO_free_all(out);
182 BIO_free(in);
183
184 return ret;
185}
179 BIO_free_all(out);
180 BIO_free(in);
181
182 return ret;
183}