Apply Lutz Behnke's 56 bit cipher patch with a few
[openssl.git] / apps / ciphers.c
index 08e47be4f787563beaa947d9e922e968d7434f04..f473f4c3dcec26c1af0a8fa689fa4f24bd5b224f 100644 (file)
 #include <openssl/err.h>
 #include <openssl/ssl.h>
 
 #include <openssl/err.h>
 #include <openssl/ssl.h>
 
-#if defined(NO_RSA) && !defined(NO_SSL2)
-#define NO_SSL2
-#endif
-
 #undef PROG
 #define PROG   ciphers_main
 
 #undef PROG
 #define PROG   ciphers_main
 
@@ -149,8 +145,12 @@ int MAIN(int argc, char **argv)
 
        ctx=SSL_CTX_new(meth);
        if (ctx == NULL) goto err;
 
        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;
 
        ssl=SSL_new(ctx);
        if (ssl == NULL) goto err;