+#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;
+ }
+ }
+#endif