X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Fciphers.c;h=f8e9e7be2e6d5053f55edc49b990b2638a11e2c0;hb=ce301b6b0b69c98e4c711b09757345a165f25f94;hp=a62c5b0e8ae199531b1c42857abf1e4c071c7afa;hpb=f73e07cf420ddad22b6148d8cbe28daf84ccae2d;p=oweals%2Fopenssl.git diff --git a/apps/ciphers.c b/apps/ciphers.c index a62c5b0e8a..f8e9e7be2e 100644 --- a/apps/ciphers.c +++ b/apps/ciphers.c @@ -63,8 +63,8 @@ #define APPS_WIN16 #endif #include "apps.h" -#include "err.h" -#include "ssl.h" +#include +#include #undef PROG #define PROG ciphers_main @@ -77,13 +77,14 @@ static char *ciphers_usage[]={ NULL }; -int MAIN(argc, argv) -int argc; -char **argv; +int MAIN(int, char **); + +int MAIN(int argc, char **argv) { int ret=1,i; int verbose=0; - char **pp,*p; + char **pp; + const char *p; int badops=0; SSL_CTX *ctx=NULL; SSL *ssl=NULL; @@ -142,12 +143,16 @@ char **argv; goto end; } - SSLeay_add_ssl_algorithms(); + OpenSSL_add_ssl_algorithms(); ctx=SSL_CTX_new(meth); if (ctx == NULL) goto err; - if (ciphers != NULL) - SSL_CTX_set_cipher_list(ctx,ciphers); + if (ciphers != NULL) { + if(!SSL_CTX_set_cipher_list(ctx,ciphers)) { + BIO_printf(bio_err, "Error in cipher list\n"); + goto err; + } + } ssl=SSL_new(ctx); if (ssl == NULL) goto err;