Lines Matching refs:clientssl
100 SSL *clientssl = NULL, *serverssl = NULL; in test_rpk() local
255 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_rpk()
261 if (!TEST_int_gt(SSL_dane_enable(clientssl, "example.com"), 0)) in test_rpk()
285 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
289 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
293 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
298 if (!TEST_int_eq(SSL_use_PrivateKey_file(clientssl, privkey_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
300 if (!TEST_int_eq(SSL_use_certificate_file(clientssl, cert_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
302 if (!TEST_int_eq(SSL_check_private_key(clientssl), 1)) in test_rpk()
308 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
310 if (!TEST_true(SSL_add_expected_rpk(clientssl, root_pkey))) in test_rpk()
314 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
316 if (!TEST_true(SSL_add_expected_rpk(clientssl, other_pkey))) in test_rpk()
320 if (!TEST_true(SSL_add_expected_rpk(clientssl, root_pkey))) in test_rpk()
322 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
326 if (!TEST_true(SSL_add_expected_rpk(clientssl, other_pkey))) in test_rpk()
328 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
334 if (!TEST_true(SSL_add_expected_rpk(clientssl, other_pkey))) in test_rpk()
349 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
354 if (!TEST_int_eq(SSL_use_PrivateKey_file(clientssl, privkey_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
356 if (!TEST_int_eq(SSL_use_certificate_file(clientssl, cert_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
358 if (!TEST_int_eq(SSL_check_private_key(clientssl), 1)) in test_rpk()
361 SSL_set_post_handshake_auth(clientssl, 1); in test_rpk()
365 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
370 if (!TEST_int_eq(SSL_use_PrivateKey_file(clientssl, privkey_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
383 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
392 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
395 SSL_set_options(clientssl, SSL_OP_NO_TICKET); in test_rpk()
407 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
412 if (!TEST_int_eq(SSL_use_PrivateKey_file(clientssl, privkey_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
414 if (!TEST_int_eq(SSL_use_certificate_file(clientssl, cert_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
416 if (!TEST_int_eq(SSL_check_private_key(clientssl), 1)) in test_rpk()
431 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
436 if (!TEST_int_eq(SSL_use_PrivateKey_file(clientssl, privkey_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
438 if (!TEST_int_eq(SSL_use_certificate_file(clientssl, cert_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
440 if (!TEST_int_eq(SSL_check_private_key(clientssl), 1)) in test_rpk()
444 SSL_set_options(clientssl, SSL_OP_NO_TICKET); in test_rpk()
449 if (!TEST_true(SSL_add_expected_rpk(clientssl, pkey))) in test_rpk()
454 ret = create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE); in test_rpk()
461 if (!TEST_long_eq(SSL_get_verify_result(clientssl), client_verify_result)) in test_rpk()
463 if (!TEST_ptr(SSL_get0_peer_rpk(clientssl))) in test_rpk()
467 if (!TEST_int_eq(SSL_get_negotiated_server_cert_type(clientssl), TLSEXT_cert_type_rpk)) in test_rpk()
470 if (!TEST_ptr(SSL_get0_peer_certificate(clientssl))) in test_rpk()
474 if (!TEST_int_eq(SSL_get_negotiated_server_cert_type(clientssl), TLSEXT_cert_type_x509)) in test_rpk()
485 if (!TEST_int_le(SSL_read(clientssl, NULL, 0), 0)) in test_rpk()
500 if (!TEST_int_eq(SSL_get_negotiated_client_cert_type(clientssl), TLSEXT_cert_type_rpk)) in test_rpk()
508 if (!TEST_int_eq(SSL_get_negotiated_client_cert_type(clientssl), TLSEXT_cert_type_x509)) in test_rpk()
517 if (!TEST_ptr((client_sess = SSL_get1_session(clientssl))) in test_rpk()
525 SSL_shutdown(clientssl); in test_rpk()
527 SSL_free(clientssl); in test_rpk()
529 serverssl = clientssl = NULL; in test_rpk()
531 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_rpk()
533 || !TEST_true(SSL_set_session(clientssl, client_sess))) in test_rpk()
545 if (!TEST_int_gt(SSL_dane_enable(clientssl, "example.com"), 0)) in test_rpk()
552 if (!TEST_true(SSL_add_expected_rpk(clientssl, client_pkey))) in test_rpk()
556 if (!TEST_true(SSL_add_expected_rpk(clientssl, client_pkey))) in test_rpk()
558 SSL_set_options(clientssl, SSL_OP_NO_TICKET); in test_rpk()
562 if (!TEST_true(SSL_add_expected_rpk(clientssl, client_pkey))) in test_rpk()
567 if (!TEST_int_eq(SSL_use_PrivateKey_file(clientssl, privkey_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
569 if (!TEST_int_eq(SSL_use_certificate_file(clientssl, cert_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
571 if (!TEST_int_eq(SSL_check_private_key(clientssl), 1)) in test_rpk()
576 if (!TEST_true(SSL_add_expected_rpk(clientssl, client_pkey))) in test_rpk()
581 if (!TEST_int_eq(SSL_use_PrivateKey_file(clientssl, privkey_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
583 if (!TEST_int_eq(SSL_use_certificate_file(clientssl, cert_file, SSL_FILETYPE_PEM), 1)) in test_rpk()
585 if (!TEST_int_eq(SSL_check_private_key(clientssl), 1)) in test_rpk()
589 SSL_set_options(clientssl, SSL_OP_NO_TICKET); in test_rpk()
593 ret = create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE); in test_rpk()
596 verify = SSL_get_verify_result(clientssl); in test_rpk()
599 if (!TEST_true(SSL_session_reused(clientssl))) in test_rpk()
602 if (!TEST_ptr(SSL_get0_peer_rpk(clientssl))) in test_rpk()
606 if (!TEST_int_eq(SSL_get_negotiated_server_cert_type(clientssl), TLSEXT_cert_type_rpk)) in test_rpk()
614 if (!TEST_int_eq(SSL_get_negotiated_client_cert_type(clientssl), TLSEXT_cert_type_rpk)) in test_rpk()
627 SSL_free(clientssl); in test_rpk()