ciphers.c (59191) | ciphers.c (68651) |
---|---|
1/* apps/ciphers.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 * --- 60 unchanged lines hidden (view full) --- 69#undef PROG 70#define PROG ciphers_main 71 72static char *ciphers_usage[]={ 73"usage: ciphers args\n", 74" -v - verbose mode, a textual listing of the ciphers in SSLeay\n", 75" -ssl2 - SSL2 mode\n", 76" -ssl3 - SSL3 mode\n", | 1/* apps/ciphers.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 * --- 60 unchanged lines hidden (view full) --- 69#undef PROG 70#define PROG ciphers_main 71 72static char *ciphers_usage[]={ 73"usage: ciphers args\n", 74" -v - verbose mode, a textual listing of the ciphers in SSLeay\n", 75" -ssl2 - SSL2 mode\n", 76" -ssl3 - SSL3 mode\n", |
77" -tls1 - TLS1 mode\n", |
|
77NULL 78}; 79 80int MAIN(int, char **); 81 82int MAIN(int argc, char **argv) 83 { 84 int ret=1,i; --- 17 unchanged lines hidden (view full) --- 102 meth=SSLv2_server_method(); 103#endif 104 105 apps_startup(); 106 107 if (bio_err == NULL) 108 bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); 109 STDout=BIO_new_fp(stdout,BIO_NOCLOSE); | 78NULL 79}; 80 81int MAIN(int, char **); 82 83int MAIN(int argc, char **argv) 84 { 85 int ret=1,i; --- 17 unchanged lines hidden (view full) --- 103 meth=SSLv2_server_method(); 104#endif 105 106 apps_startup(); 107 108 if (bio_err == NULL) 109 bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); 110 STDout=BIO_new_fp(stdout,BIO_NOCLOSE); |
111#ifdef VMS 112 { 113 BIO *tmpbio = BIO_new(BIO_f_linebuffer()); 114 STDout = BIO_push(tmpbio, STDout); 115 } 116#endif |
|
110 111 argc--; 112 argv++; 113 while (argc >= 1) 114 { 115 if (strcmp(*argv,"-v") == 0) 116 verbose=1; 117#ifndef NO_SSL2 118 else if (strcmp(*argv,"-ssl2") == 0) 119 meth=SSLv2_client_method(); 120#endif 121#ifndef NO_SSL3 122 else if (strcmp(*argv,"-ssl3") == 0) 123 meth=SSLv3_client_method(); 124#endif | 117 118 argc--; 119 argv++; 120 while (argc >= 1) 121 { 122 if (strcmp(*argv,"-v") == 0) 123 verbose=1; 124#ifndef NO_SSL2 125 else if (strcmp(*argv,"-ssl2") == 0) 126 meth=SSLv2_client_method(); 127#endif 128#ifndef NO_SSL3 129 else if (strcmp(*argv,"-ssl3") == 0) 130 meth=SSLv3_client_method(); 131#endif |
132#ifndef NO_TLS1 133 else if (strcmp(*argv,"-tls1") == 0) 134 meth=TLSv1_client_method(); 135#endif |
|
125 else if ((strncmp(*argv,"-h",2) == 0) || 126 (strcmp(*argv,"-?") == 0)) 127 { 128 badops=1; 129 break; 130 } 131 else 132 { --- 52 unchanged lines hidden (view full) --- 185 { 186err: 187 SSL_load_error_strings(); 188 ERR_print_errors(bio_err); 189 } 190end: 191 if (ctx != NULL) SSL_CTX_free(ctx); 192 if (ssl != NULL) SSL_free(ssl); | 136 else if ((strncmp(*argv,"-h",2) == 0) || 137 (strcmp(*argv,"-?") == 0)) 138 { 139 badops=1; 140 break; 141 } 142 else 143 { --- 52 unchanged lines hidden (view full) --- 196 { 197err: 198 SSL_load_error_strings(); 199 ERR_print_errors(bio_err); 200 } 201end: 202 if (ctx != NULL) SSL_CTX_free(ctx); 203 if (ssl != NULL) SSL_free(ssl); |
193 if (STDout != NULL) BIO_free(STDout); | 204 if (STDout != NULL) BIO_free_all(STDout); |
194 EXIT(ret); 195 } 196 | 205 EXIT(ret); 206 } 207 |