X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Fciphers.c;h=f8e9e7be2e6d5053f55edc49b990b2638a11e2c0;hb=ce301b6b0b69c98e4c711b09757345a165f25f94;hp=867196e393cd3b6fb7ceab0e77047f91202858b8;hpb=7dfb0b774e6592dcbfe47015168a0ac8b44e2a17;p=oweals%2Fopenssl.git diff --git a/apps/ciphers.c b/apps/ciphers.c index 867196e393..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,19 +77,20 @@ 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; char *ciphers=NULL; SSL_METHOD *meth=NULL; - STACK *sk; + STACK_OF(SSL_CIPHER) *sk; char buf[512]; BIO *STDout=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; @@ -167,10 +172,10 @@ char **argv; { sk=SSL_get_ciphers(ssl); - for (i=0; i