Lines Matching refs:serverssl
100 SSL *clientssl = NULL, *serverssl = NULL; in test_rpk() local
255 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_rpk()
259 if (!TEST_int_gt(SSL_dane_enable(serverssl, NULL), 0)) in test_rpk()
265 if (!TEST_int_eq(SSL_use_PrivateKey_file(serverssl, privkey_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
273 if (!TEST_int_eq(SSL_use_certificate_file(serverssl, cert_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
275 if (!TEST_int_eq(SSL_check_private_key(serverssl), 1)) in test_rpk()
295 if (!TEST_true(SSL_add_expected_rpk(serverssl, pkey))) in test_rpk()
304 …SSL_set_verify(serverssl, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, rpk_verify_server_cb); in test_rpk()
351 if (!TEST_true(SSL_add_expected_rpk(serverssl, pkey))) in test_rpk()
360 …SSL_set_verify(serverssl, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT | SSL_VERIFY_POST_HAND… in test_rpk()
367 if (!TEST_true(SSL_add_expected_rpk(serverssl, pkey))) in test_rpk()
375 …SSL_set_verify(serverssl, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, rpk_verify_server_cb); in test_rpk()
394 SSL_set_options(serverssl, SSL_OP_NO_TICKET); in test_rpk()
409 if (!TEST_true(SSL_add_expected_rpk(serverssl, pkey))) in test_rpk()
418 …SSL_set_verify(serverssl, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, rpk_verify_server_cb); in test_rpk()
433 if (!TEST_true(SSL_add_expected_rpk(serverssl, pkey))) in test_rpk()
442 …SSL_set_verify(serverssl, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, rpk_verify_server_cb); in test_rpk()
443 SSL_set_options(serverssl, SSL_OP_NO_TICKET); in test_rpk()
454 ret = create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE); in test_rpk()
465 if (!TEST_int_eq(SSL_get_negotiated_server_cert_type(serverssl), TLSEXT_cert_type_rpk)) in test_rpk()
472 if (!TEST_int_eq(SSL_get_negotiated_server_cert_type(serverssl), TLSEXT_cert_type_x509)) in test_rpk()
481 if (!TEST_true(SSL_verify_client_post_handshake(serverssl))) in test_rpk()
483 if (!TEST_true(SSL_do_handshake(serverssl))) in test_rpk()
487 if (!TEST_int_le(SSL_read(serverssl, NULL, 0), 0)) in test_rpk()
494 if (!TEST_long_eq(SSL_get_verify_result(serverssl), server_verify_result)) in test_rpk()
496 if (!TEST_ptr(SSL_get0_peer_rpk(serverssl))) in test_rpk()
498 if (!TEST_int_eq(SSL_get_negotiated_client_cert_type(serverssl), TLSEXT_cert_type_rpk)) in test_rpk()
504 if (expected == 1 && !TEST_ptr(SSL_get0_peer_certificate(serverssl))) in test_rpk()
506 if (!TEST_int_eq(SSL_get_negotiated_client_cert_type(serverssl), TLSEXT_cert_type_x509)) in test_rpk()
521 if (!TEST_ptr((server_sess = SSL_get1_session(serverssl))) in test_rpk()
526 SSL_shutdown(serverssl); in test_rpk()
528 SSL_free(serverssl); in test_rpk()
529 serverssl = clientssl = NULL; in test_rpk()
531 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_rpk()
537 if (!TEST_int_eq(SSL_use_PrivateKey_file(serverssl, privkey_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
539 if (!TEST_int_eq(SSL_use_certificate_file(serverssl, cert_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
541 if (!TEST_int_eq(SSL_check_private_key(serverssl), 1)) in test_rpk()
543 if (!TEST_int_gt(SSL_dane_enable(serverssl, "example.com"), 0)) in test_rpk()
559 SSL_set_options(serverssl, SSL_OP_NO_TICKET); in test_rpk()
564 if (!TEST_true(SSL_add_expected_rpk(serverssl, server_pkey))) in test_rpk()
573 …SSL_set_verify(serverssl, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, rpk_verify_server_cb); in test_rpk()
578 if (!TEST_true(SSL_add_expected_rpk(serverssl, server_pkey))) in test_rpk()
587 …SSL_set_verify(serverssl, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, rpk_verify_server_cb); in test_rpk()
588 SSL_set_options(serverssl, SSL_OP_NO_TICKET); in test_rpk()
593 ret = create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE); in test_rpk()
604 if (!TEST_int_eq(SSL_get_negotiated_server_cert_type(serverssl), TLSEXT_cert_type_rpk)) in test_rpk()
610 if (!TEST_ptr(SSL_get0_peer_rpk(serverssl))) in test_rpk()
612 if (!TEST_int_eq(SSL_get_negotiated_client_cert_type(serverssl), TLSEXT_cert_type_rpk)) in test_rpk()
626 SSL_free(serverssl); in test_rpk()