ec.c (1.1.1.3) | ec.c (1.1.1.4) |
---|---|
1/* apps/ec.c */ 2/* 3 * Written by Nils Larsch for the OpenSSL project. 4 */ 5/* ==================================================================== 6 * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 81 unchanged lines hidden (view full) --- 90 EC_KEY *eckey = NULL; 91 const EC_GROUP *group; 92 int i, badops = 0; 93 const EVP_CIPHER *enc = NULL; 94 BIO *in = NULL, *out = NULL; 95 int informat, outformat, text = 0, noout = 0; 96 int pubin = 0, pubout = 0, param_out = 0; 97 char *infile, *outfile, *prog, *engine; | 1/* apps/ec.c */ 2/* 3 * Written by Nils Larsch for the OpenSSL project. 4 */ 5/* ==================================================================== 6 * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 81 unchanged lines hidden (view full) --- 90 EC_KEY *eckey = NULL; 91 const EC_GROUP *group; 92 int i, badops = 0; 93 const EVP_CIPHER *enc = NULL; 94 BIO *in = NULL, *out = NULL; 95 int informat, outformat, text = 0, noout = 0; 96 int pubin = 0, pubout = 0, param_out = 0; 97 char *infile, *outfile, *prog, *engine; |
98 ENGINE *e = NULL; |
|
98 char *passargin = NULL, *passargout = NULL; 99 char *passin = NULL, *passout = NULL; 100 point_conversion_form_t form = POINT_CONVERSION_UNCOMPRESSED; 101 int new_form = 0; 102 int asn1_flag = OPENSSL_EC_NAMED_CURVE; 103 int new_asn1_flag = 0; 104 105 apps_startup(); --- 124 unchanged lines hidden (view full) --- 230 " named_curve (default)\n"); 231 BIO_printf(bio_err, " " 232 "explicit\n"); 233 goto end; 234 } 235 236 ERR_load_crypto_strings(); 237 | 99 char *passargin = NULL, *passargout = NULL; 100 char *passin = NULL, *passout = NULL; 101 point_conversion_form_t form = POINT_CONVERSION_UNCOMPRESSED; 102 int new_form = 0; 103 int asn1_flag = OPENSSL_EC_NAMED_CURVE; 104 int new_asn1_flag = 0; 105 106 apps_startup(); --- 124 unchanged lines hidden (view full) --- 231 " named_curve (default)\n"); 232 BIO_printf(bio_err, " " 233 "explicit\n"); 234 goto end; 235 } 236 237 ERR_load_crypto_strings(); 238 |
238# ifndef OPENSSL_NO_ENGINE 239 setup_engine(bio_err, engine, 0); 240# endif | 239 e = setup_engine(bio_err, engine, 0); |
241 242 if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) { 243 BIO_printf(bio_err, "Error getting passwords\n"); 244 goto end; 245 } 246 247 in = BIO_new(BIO_s_file()); 248 out = BIO_new(BIO_s_file()); --- 95 unchanged lines hidden (view full) --- 344 ret = 0; 345 end: 346 if (in) 347 BIO_free(in); 348 if (out) 349 BIO_free_all(out); 350 if (eckey) 351 EC_KEY_free(eckey); | 240 241 if (!app_passwd(bio_err, passargin, passargout, &passin, &passout)) { 242 BIO_printf(bio_err, "Error getting passwords\n"); 243 goto end; 244 } 245 246 in = BIO_new(BIO_s_file()); 247 out = BIO_new(BIO_s_file()); --- 95 unchanged lines hidden (view full) --- 343 ret = 0; 344 end: 345 if (in) 346 BIO_free(in); 347 if (out) 348 BIO_free_all(out); 349 if (eckey) 350 EC_KEY_free(eckey); |
351 release_engine(e); |
|
352 if (passin) 353 OPENSSL_free(passin); 354 if (passout) 355 OPENSSL_free(passout); 356 apps_shutdown(); 357 OPENSSL_EXIT(ret); 358} 359#else /* !OPENSSL_NO_EC */ 360 361# if PEDANTIC 362static void *dummy = &dummy; 363# endif 364 365#endif | 352 if (passin) 353 OPENSSL_free(passin); 354 if (passout) 355 OPENSSL_free(passout); 356 apps_shutdown(); 357 OPENSSL_EXIT(ret); 358} 359#else /* !OPENSSL_NO_EC */ 360 361# if PEDANTIC 362static void *dummy = &dummy; 363# endif 364 365#endif |