- SSL_set_bio(con, rbio, wbio);
-
- /* set SNI at server side */
- SSL_set_tlsext_host_name(con, host);
-
- if (!TEST_int_le(SSL_accept(con), 0))
- /* This shouldn't succeed because we have nothing to listen on */
- goto end;
- if (!TEST_ptr_null(SSL_get_servername(con, TLSEXT_NAMETYPE_host_name)))
- /* SNI should be cleared by SSL_accpet */
- goto end;
- ret = 1;