- if (cipher != NULL)
- {
- if(!SSL_CTX_set_cipher_list(ctx,cipher))
- {
- BIO_printf(bio_err,"error setting cipher list\n");
- ERR_print_errors(bio_err);
- goto end;
- }
-#ifndef OPENSSL_NO_TLSEXT
- if (ctx2 && !SSL_CTX_set_cipher_list(ctx2,cipher))
- {
- BIO_printf(bio_err,"error setting cipher list\n");
- ERR_print_errors(bio_err);
- goto end;
- }
-#endif
- }
-#ifndef OPENSSL_NO_TLSEXT
- if (curves)
- {
- if(!SSL_CTX_set1_curves_list(ctx,curves))
- {
- BIO_printf(bio_err,"error setting curves list\n");
- ERR_print_errors(bio_err);
- goto end;
- }
- if(ctx2 && !SSL_CTX_set1_curves_list(ctx2,curves))
- {
- BIO_printf(bio_err,"error setting curves list\n");
- ERR_print_errors(bio_err);
- goto end;
- }
- }
- if (sigalgs)
- {
- if(!SSL_CTX_set1_sigalgs_list(ctx,sigalgs))
- {
- BIO_printf(bio_err,"error setting signature algorithms\n");
- ERR_print_errors(bio_err);
- goto end;
- }
- if(ctx2 && !SSL_CTX_set1_sigalgs_list(ctx2,sigalgs))
- {
- BIO_printf(bio_err,"error setting signature algorithms\n");
- ERR_print_errors(bio_err);
- goto end;
- }
- }
- if (client_sigalgs)
- {
- if(!SSL_CTX_set1_client_sigalgs_list(ctx,client_sigalgs))
- {
- BIO_printf(bio_err,"error setting client signature algorithms\n");
- ERR_print_errors(bio_err);
- goto end;
- }
- if(ctx2 && !SSL_CTX_set1_client_sigalgs_list(ctx2,client_sigalgs))
- {
- BIO_printf(bio_err,"error setting client signature algorithms\n");
- ERR_print_errors(bio_err);
- goto end;
- }
- }
-#endif