pkcs7.c (1.1.1.4) | pkcs7.c (1.1.1.5) |
---|---|
1/* apps/pkcs7.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 76 unchanged lines hidden (view full) --- 85{ 86 PKCS7 *p7 = NULL; 87 int i, badops = 0; 88 BIO *in = NULL, *out = NULL; 89 int informat, outformat; 90 char *infile, *outfile, *prog; 91 int print_certs = 0, text = 0, noout = 0, p7_print = 0; 92 int ret = 1; | 1/* apps/pkcs7.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 76 unchanged lines hidden (view full) --- 85{ 86 PKCS7 *p7 = NULL; 87 int i, badops = 0; 88 BIO *in = NULL, *out = NULL; 89 int informat, outformat; 90 char *infile, *outfile, *prog; 91 int print_certs = 0, text = 0, noout = 0, p7_print = 0; 92 int ret = 1; |
93#ifndef OPENSSL_NO_ENGINE | |
94 char *engine = NULL; | 93 char *engine = NULL; |
95#endif | 94 ENGINE *e = NULL; |
96 97 apps_startup(); 98 99 if (bio_err == NULL) 100 if ((bio_err = BIO_new(BIO_s_file())) != NULL) 101 BIO_set_fp(bio_err, stderr, BIO_NOCLOSE | BIO_FP_TEXT); 102 103 if (!load_config(bio_err, NULL)) --- 66 unchanged lines hidden (view full) --- 170 " -engine e use engine e, possibly a hardware device.\n"); 171#endif 172 ret = 1; 173 goto end; 174 } 175 176 ERR_load_crypto_strings(); 177 | 95 96 apps_startup(); 97 98 if (bio_err == NULL) 99 if ((bio_err = BIO_new(BIO_s_file())) != NULL) 100 BIO_set_fp(bio_err, stderr, BIO_NOCLOSE | BIO_FP_TEXT); 101 102 if (!load_config(bio_err, NULL)) --- 66 unchanged lines hidden (view full) --- 169 " -engine e use engine e, possibly a hardware device.\n"); 170#endif 171 ret = 1; 172 goto end; 173 } 174 175 ERR_load_crypto_strings(); 176 |
178#ifndef OPENSSL_NO_ENGINE 179 setup_engine(bio_err, engine, 0); 180#endif | 177 e = setup_engine(bio_err, engine, 0); |
181 182 in = BIO_new(BIO_s_file()); 183 out = BIO_new(BIO_s_file()); 184 if ((in == NULL) || (out == NULL)) { 185 ERR_print_errors(bio_err); 186 goto end; 187 } 188 --- 109 unchanged lines hidden (view full) --- 298 ERR_print_errors(bio_err); 299 goto end; 300 } 301 } 302 ret = 0; 303 end: 304 if (p7 != NULL) 305 PKCS7_free(p7); | 178 179 in = BIO_new(BIO_s_file()); 180 out = BIO_new(BIO_s_file()); 181 if ((in == NULL) || (out == NULL)) { 182 ERR_print_errors(bio_err); 183 goto end; 184 } 185 --- 109 unchanged lines hidden (view full) --- 295 ERR_print_errors(bio_err); 296 goto end; 297 } 298 } 299 ret = 0; 300 end: 301 if (p7 != NULL) 302 PKCS7_free(p7); |
303 release_engine(e); |
|
306 if (in != NULL) 307 BIO_free(in); 308 if (out != NULL) 309 BIO_free_all(out); 310 apps_shutdown(); 311 OPENSSL_EXIT(ret); 312} | 304 if (in != NULL) 305 BIO_free(in); 306 if (out != NULL) 307 BIO_free_all(out); 308 apps_shutdown(); 309 OPENSSL_EXIT(ret); 310} |