Add -clrext option to 'x509'
[openssl.git] / apps / ciphers.c
index 146527790ef49cdc31584d386c44b9641b179f77..f8e9e7be2e6d5053f55edc49b990b2638a11e2c0 100644 (file)
@@ -63,8 +63,8 @@
 #define APPS_WIN16
 #endif
 #include "apps.h"
-#include "err.h"
-#include "ssl.h"
+#include <openssl/err.h>
+#include <openssl/ssl.h>
 
 #undef PROG
 #define PROG   ciphers_main
@@ -77,9 +77,9 @@ 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;
@@ -143,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;