verify.c (1.1.1.7) | verify.c (1.1.1.8) |
---|---|
1/* apps/verify.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 * --- 75 unchanged lines hidden (view full) --- 84 char *CApath = NULL, *CAfile = NULL; 85 char *untfile = NULL, *trustfile = NULL, *crlfile = NULL; 86 STACK_OF(X509) *untrusted = NULL, *trusted = NULL; 87 STACK_OF(X509_CRL) *crls = NULL; 88 X509_STORE *cert_ctx = NULL; 89 X509_LOOKUP *lookup = NULL; 90 X509_VERIFY_PARAM *vpm = NULL; 91 int crl_download = 0; | 1/* apps/verify.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 * --- 75 unchanged lines hidden (view full) --- 84 char *CApath = NULL, *CAfile = NULL; 85 char *untfile = NULL, *trustfile = NULL, *crlfile = NULL; 86 STACK_OF(X509) *untrusted = NULL, *trusted = NULL; 87 STACK_OF(X509_CRL) *crls = NULL; 88 X509_STORE *cert_ctx = NULL; 89 X509_LOOKUP *lookup = NULL; 90 X509_VERIFY_PARAM *vpm = NULL; 91 int crl_download = 0; |
92#ifndef OPENSSL_NO_ENGINE | |
93 char *engine = NULL; | 92 char *engine = NULL; |
94#endif | |
95 96 cert_ctx = X509_STORE_new(); 97 if (cert_ctx == NULL) 98 goto end; 99 X509_STORE_set_verify_cb(cert_ctx, cb); 100 101 ERR_load_crypto_strings(); 102 --- 52 unchanged lines hidden (view full) --- 155 else 156 break; 157 argc--; 158 argv++; 159 } else 160 break; 161 } 162 | 93 94 cert_ctx = X509_STORE_new(); 95 if (cert_ctx == NULL) 96 goto end; 97 X509_STORE_set_verify_cb(cert_ctx, cb); 98 99 ERR_load_crypto_strings(); 100 --- 52 unchanged lines hidden (view full) --- 153 else 154 break; 155 argc--; 156 argv++; 157 } else 158 break; 159 } 160 |
163#ifndef OPENSSL_NO_ENGINE | |
164 e = setup_engine(bio_err, engine, 0); | 161 e = setup_engine(bio_err, engine, 0); |
165#endif | |
166 167 if (vpm) 168 X509_STORE_set1_param(cert_ctx, vpm); 169 170 lookup = X509_STORE_add_lookup(cert_ctx, X509_LOOKUP_file()); 171 if (lookup == NULL) 172 abort(); 173 if (CAfile) { --- 76 unchanged lines hidden (view full) --- 250 end: 251 if (vpm) 252 X509_VERIFY_PARAM_free(vpm); 253 if (cert_ctx != NULL) 254 X509_STORE_free(cert_ctx); 255 sk_X509_pop_free(untrusted, X509_free); 256 sk_X509_pop_free(trusted, X509_free); 257 sk_X509_CRL_pop_free(crls, X509_CRL_free); | 162 163 if (vpm) 164 X509_STORE_set1_param(cert_ctx, vpm); 165 166 lookup = X509_STORE_add_lookup(cert_ctx, X509_LOOKUP_file()); 167 if (lookup == NULL) 168 abort(); 169 if (CAfile) { --- 76 unchanged lines hidden (view full) --- 246 end: 247 if (vpm) 248 X509_VERIFY_PARAM_free(vpm); 249 if (cert_ctx != NULL) 250 X509_STORE_free(cert_ctx); 251 sk_X509_pop_free(untrusted, X509_free); 252 sk_X509_pop_free(trusted, X509_free); 253 sk_X509_CRL_pop_free(crls, X509_CRL_free); |
254 release_engine(e); |
|
258 apps_shutdown(); 259 OPENSSL_EXIT(ret < 0 ? 2 : ret); 260} 261 262static int check(X509_STORE *ctx, char *file, 263 STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, 264 STACK_OF(X509_CRL) *crls, ENGINE *e) 265{ --- 88 unchanged lines hidden --- | 255 apps_shutdown(); 256 OPENSSL_EXIT(ret < 0 ? 2 : ret); 257} 258 259static int check(X509_STORE *ctx, char *file, 260 STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, 261 STACK_OF(X509_CRL) *crls, ENGINE *e) 262{ --- 88 unchanged lines hidden --- |