|
Packit |
aea12f |
/*
|
|
Packit |
aea12f |
* Copyright (C) 2015-2018 Red Hat, Inc.
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* Author: Nikos Mavrogiannopoulos
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* This file is part of GnuTLS.
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* GnuTLS is free software; you can redistribute it and/or modify it
|
|
Packit |
aea12f |
* under the terms of the GNU General Public License as published by
|
|
Packit |
aea12f |
* the Free Software Foundation; either version 3 of the License, or
|
|
Packit |
aea12f |
* (at your option) any later version.
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* GnuTLS is distributed in the hope that it will be useful, but
|
|
Packit |
aea12f |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
aea12f |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
aea12f |
* General Public License for more details.
|
|
Packit |
aea12f |
*
|
|
Packit |
aea12f |
* You should have received a copy of the GNU Lesser General Public License
|
|
Packit |
aea12f |
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
|
Packit |
aea12f |
*/
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#ifdef HAVE_CONFIG_H
|
|
Packit |
aea12f |
#include <config.h>
|
|
Packit |
aea12f |
#endif
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* This program tests support for early start in TLS1.3 handshake */
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#include <stdio.h>
|
|
Packit |
aea12f |
#include <stdlib.h>
|
|
Packit |
aea12f |
#include <string.h>
|
|
Packit |
aea12f |
#include <errno.h>
|
|
Packit |
aea12f |
#include <gnutls/gnutls.h>
|
|
Packit |
aea12f |
#include "utils.h"
|
|
Packit |
aea12f |
#include "eagain-common.h"
|
|
Packit |
aea12f |
#include <assert.h>
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#define USE_CERT 1
|
|
Packit |
aea12f |
#define ASK_CERT 2
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
const char *side;
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
static void tls_log_func(int level, const char *str)
|
|
Packit |
aea12f |
{
|
|
Packit |
aea12f |
fprintf(stderr, "%s|<%d>| %s", side, level, str);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#define try_ok(name, client_prio) \
|
|
Packit |
aea12f |
try_with_key(name, client_prio, \
|
|
Packit |
aea12f |
&server_ca3_localhost_cert, &server_ca3_key, NULL, NULL, 0)
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#define MSG "hello there ppl"
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
static
|
|
Packit |
aea12f |
void try_with_key_fail(const char *name, const char *client_prio,
|
|
Packit |
aea12f |
const gnutls_datum_t *serv_cert,
|
|
Packit |
aea12f |
const gnutls_datum_t *serv_key,
|
|
Packit |
aea12f |
const gnutls_datum_t *cli_cert,
|
|
Packit |
aea12f |
const gnutls_datum_t *cli_key,
|
|
Packit |
aea12f |
unsigned init_flags)
|
|
Packit |
aea12f |
{
|
|
Packit |
aea12f |
int ret;
|
|
Packit |
aea12f |
char buffer[256];
|
|
Packit |
aea12f |
gnutls_certificate_credentials_t serverx509cred;
|
|
Packit |
aea12f |
gnutls_session_t server;
|
|
Packit |
aea12f |
int sret = GNUTLS_E_AGAIN;
|
|
Packit |
aea12f |
/* Client stuff. */
|
|
Packit |
aea12f |
gnutls_certificate_credentials_t clientx509cred;
|
|
Packit |
aea12f |
gnutls_session_t client;
|
|
Packit |
aea12f |
int cret = GNUTLS_E_AGAIN, version;
|
|
Packit |
aea12f |
const char *err;
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
gnutls_global_set_log_function(tls_log_func);
|
|
Packit |
aea12f |
if (debug)
|
|
Packit |
aea12f |
gnutls_global_set_log_level(6);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
reset_buffers();
|
|
Packit |
aea12f |
/* Init server */
|
|
Packit |
aea12f |
gnutls_certificate_allocate_credentials(&serverx509cred);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
ret = gnutls_certificate_set_x509_key_mem(serverx509cred,
|
|
Packit |
aea12f |
serv_cert, serv_key,
|
|
Packit |
aea12f |
GNUTLS_X509_FMT_PEM);
|
|
Packit |
aea12f |
if (ret < 0)
|
|
Packit |
aea12f |
fail("Could not set key/cert: %s\n", gnutls_strerror(ret));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
assert(gnutls_init(&server, GNUTLS_SERVER|init_flags)>=0);
|
|
Packit |
aea12f |
gnutls_credentials_set(server, GNUTLS_CRD_CERTIFICATE,
|
|
Packit |
aea12f |
serverx509cred);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
assert(gnutls_priority_set_direct(server, client_prio, NULL) >= 0);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
gnutls_transport_set_push_function(server, server_push);
|
|
Packit |
aea12f |
gnutls_transport_set_pull_function(server, server_pull);
|
|
Packit |
aea12f |
gnutls_transport_set_ptr(server, server);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* Init client */
|
|
Packit |
aea12f |
ret = gnutls_certificate_allocate_credentials(&clientx509cred);
|
|
Packit |
aea12f |
if (ret < 0)
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
if (cli_cert) {
|
|
Packit |
aea12f |
gnutls_certificate_set_x509_key_mem(clientx509cred,
|
|
Packit |
aea12f |
cli_cert, cli_key,
|
|
Packit |
aea12f |
GNUTLS_X509_FMT_PEM);
|
|
Packit |
aea12f |
gnutls_certificate_server_set_request(server, GNUTLS_CERT_REQUIRE);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
ret = gnutls_init(&client, GNUTLS_CLIENT);
|
|
Packit |
aea12f |
if (ret < 0)
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
ret = gnutls_credentials_set(client, GNUTLS_CRD_CERTIFICATE,
|
|
Packit |
aea12f |
clientx509cred);
|
|
Packit |
aea12f |
if (ret < 0)
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
gnutls_transport_set_push_function(client, client_push);
|
|
Packit |
aea12f |
gnutls_transport_set_pull_function(client, client_pull);
|
|
Packit |
aea12f |
gnutls_transport_set_ptr(client, client);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
ret = gnutls_priority_set_direct(client, client_prio, &err;;
|
|
Packit |
aea12f |
if (ret < 0) {
|
|
Packit |
aea12f |
if (ret == GNUTLS_E_INVALID_REQUEST)
|
|
Packit |
aea12f |
fprintf(stderr, "Error in %s\n", err);
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
success("negotiating %s\n", name);
|
|
Packit |
aea12f |
HANDSHAKE(client, server);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
assert(!(gnutls_session_get_flags(server) & GNUTLS_SFLAGS_EARLY_START));
|
|
Packit |
aea12f |
assert(!(gnutls_session_get_flags(client) & GNUTLS_SFLAGS_EARLY_START));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
version = gnutls_protocol_get_version(client);
|
|
Packit |
aea12f |
assert(version == GNUTLS_TLS1_3);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
memset(buffer, 0, sizeof(buffer));
|
|
Packit |
aea12f |
assert(gnutls_record_send(server, MSG, strlen(MSG))>=0);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
ret = gnutls_record_recv(client, buffer, sizeof(buffer));
|
|
Packit |
aea12f |
if (ret == 0) {
|
|
Packit |
aea12f |
fail("client: Peer has closed the TLS connection\n");
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
} else if (ret < 0) {
|
|
Packit |
aea12f |
fail("client: Error: %s\n", gnutls_strerror(ret));
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
if (ret != strlen(MSG) || memcmp(MSG, buffer, ret) != 0) {
|
|
Packit |
aea12f |
fail("client: Error in data received. Expected %d, got %d\n", (int)strlen(MSG), ret);
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
memset(buffer, 0, sizeof(buffer));
|
|
Packit |
aea12f |
assert(gnutls_record_send(client, MSG, strlen(MSG))>=0);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
ret = gnutls_record_recv(server, buffer, sizeof(buffer));
|
|
Packit |
aea12f |
if (ret == 0) {
|
|
Packit |
aea12f |
fail("server: Peer has closed the TLS connection\n");
|
|
Packit |
aea12f |
} else if (ret < 0) {
|
|
Packit |
aea12f |
fail("server: Error: %s\n", gnutls_strerror(ret));
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
if (ret != strlen(MSG) || memcmp(MSG, buffer, ret) != 0) {
|
|
Packit |
aea12f |
fail("client: Error in data received. Expected %d, got %d\n", (int)strlen(MSG), ret);
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
gnutls_deinit(client);
|
|
Packit |
aea12f |
gnutls_deinit(server);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
gnutls_certificate_free_credentials(serverx509cred);
|
|
Packit |
aea12f |
gnutls_certificate_free_credentials(clientx509cred);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
static
|
|
Packit |
aea12f |
void try_with_key_ks(const char *name, const char *client_prio,
|
|
Packit |
aea12f |
const gnutls_datum_t *serv_cert,
|
|
Packit |
aea12f |
const gnutls_datum_t *serv_key,
|
|
Packit |
aea12f |
const gnutls_datum_t *client_cert,
|
|
Packit |
aea12f |
const gnutls_datum_t *client_key,
|
|
Packit |
aea12f |
unsigned cert_flags,
|
|
Packit |
aea12f |
unsigned init_flags)
|
|
Packit |
aea12f |
{
|
|
Packit |
aea12f |
int ret;
|
|
Packit |
aea12f |
char buffer[256];
|
|
Packit |
aea12f |
/* Server stuff. */
|
|
Packit |
aea12f |
gnutls_certificate_credentials_t serverx509cred;
|
|
Packit |
aea12f |
gnutls_session_t server;
|
|
Packit |
aea12f |
int sret = GNUTLS_E_AGAIN;
|
|
Packit |
aea12f |
/* Client stuff. */
|
|
Packit |
aea12f |
gnutls_certificate_credentials_t clientx509cred;
|
|
Packit |
aea12f |
gnutls_session_t client;
|
|
Packit |
aea12f |
int cret = GNUTLS_E_AGAIN, version;
|
|
Packit |
aea12f |
const char *err;
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* General init. */
|
|
Packit |
aea12f |
gnutls_global_set_log_function(tls_log_func);
|
|
Packit |
aea12f |
if (debug)
|
|
Packit |
aea12f |
gnutls_global_set_log_level(6);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
reset_buffers();
|
|
Packit |
aea12f |
/* Init server */
|
|
Packit |
aea12f |
gnutls_certificate_allocate_credentials(&serverx509cred);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
ret = gnutls_certificate_set_x509_key_mem(serverx509cred,
|
|
Packit |
aea12f |
serv_cert, serv_key,
|
|
Packit |
aea12f |
GNUTLS_X509_FMT_PEM);
|
|
Packit |
aea12f |
if (ret < 0) {
|
|
Packit |
aea12f |
fail("Could not set key/cert: %s\n", gnutls_strerror(ret));
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
assert(gnutls_init(&server, GNUTLS_SERVER|init_flags)>=0);
|
|
Packit |
aea12f |
gnutls_credentials_set(server, GNUTLS_CRD_CERTIFICATE,
|
|
Packit |
aea12f |
serverx509cred);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
assert(gnutls_priority_set_direct(server,
|
|
Packit |
aea12f |
"NORMAL:-VERS-ALL:+VERS-TLS1.3",
|
|
Packit |
aea12f |
NULL)>=0);
|
|
Packit |
aea12f |
gnutls_transport_set_push_function(server, server_push);
|
|
Packit |
aea12f |
gnutls_transport_set_pull_function(server, server_pull);
|
|
Packit |
aea12f |
gnutls_transport_set_ptr(server, server);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* Init client */
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
ret = gnutls_certificate_allocate_credentials(&clientx509cred);
|
|
Packit |
aea12f |
if (ret < 0)
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
if (cert_flags == USE_CERT) {
|
|
Packit |
aea12f |
gnutls_certificate_set_x509_key_mem(clientx509cred,
|
|
Packit |
aea12f |
client_cert, client_key,
|
|
Packit |
aea12f |
GNUTLS_X509_FMT_PEM);
|
|
Packit |
aea12f |
gnutls_certificate_server_set_request(server, GNUTLS_CERT_REQUIRE);
|
|
Packit |
aea12f |
} else if (cert_flags == ASK_CERT) {
|
|
Packit |
aea12f |
gnutls_certificate_server_set_request(server, GNUTLS_CERT_REQUEST);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
ret = gnutls_init(&client, GNUTLS_CLIENT);
|
|
Packit |
aea12f |
if (ret < 0)
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
ret = gnutls_credentials_set(client, GNUTLS_CRD_CERTIFICATE,
|
|
Packit |
aea12f |
clientx509cred);
|
|
Packit |
aea12f |
if (ret < 0)
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
gnutls_transport_set_push_function(client, client_push);
|
|
Packit |
aea12f |
gnutls_transport_set_pull_function(client, client_pull);
|
|
Packit |
aea12f |
gnutls_transport_set_ptr(client, client);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
ret = gnutls_priority_set_direct(client, client_prio, &err;;
|
|
Packit |
aea12f |
if (ret < 0) {
|
|
Packit |
aea12f |
if (ret == GNUTLS_E_INVALID_REQUEST)
|
|
Packit |
aea12f |
fprintf(stderr, "Error in %s\n", err);
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
success("negotiating %s\n", name);
|
|
Packit |
aea12f |
HANDSHAKE(client, server);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
assert(gnutls_session_get_flags(server) & GNUTLS_SFLAGS_EARLY_START);
|
|
Packit |
aea12f |
assert(!(gnutls_session_get_flags(client) & GNUTLS_SFLAGS_EARLY_START));
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
version = gnutls_protocol_get_version(client);
|
|
Packit |
aea12f |
assert(version == GNUTLS_TLS1_3);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
memset(buffer, 0, sizeof(buffer));
|
|
Packit |
aea12f |
assert(gnutls_record_send(server, MSG, strlen(MSG))>=0);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
ret = gnutls_record_recv(client, buffer, sizeof(buffer));
|
|
Packit |
aea12f |
if (ret == 0) {
|
|
Packit |
aea12f |
fail("client: Peer has closed the TLS connection\n");
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
} else if (ret < 0) {
|
|
Packit |
aea12f |
fail("client: Error: %s\n", gnutls_strerror(ret));
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
if (ret != strlen(MSG) || memcmp(MSG, buffer, ret) != 0) {
|
|
Packit |
aea12f |
fail("client: Error in data received. Expected %d, got %d\n", (int)strlen(MSG), ret);
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
memset(buffer, 0, sizeof(buffer));
|
|
Packit |
aea12f |
assert(gnutls_record_send(client, MSG, strlen(MSG))>=0);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
ret = gnutls_record_recv(server, buffer, sizeof(buffer));
|
|
Packit |
aea12f |
if (ret == 0) {
|
|
Packit |
aea12f |
fail("server: Peer has closed the TLS connection\n");
|
|
Packit |
aea12f |
} else if (ret < 0) {
|
|
Packit |
aea12f |
fail("server: Error: %s\n", gnutls_strerror(ret));
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
if (ret != strlen(MSG) || memcmp(MSG, buffer, ret) != 0) {
|
|
Packit |
aea12f |
fail("client: Error in data received. Expected %d, got %d\n", (int)strlen(MSG), ret);
|
|
Packit |
aea12f |
exit(1);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
gnutls_bye(client, GNUTLS_SHUT_RDWR);
|
|
Packit |
aea12f |
gnutls_bye(server, GNUTLS_SHUT_RDWR);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
gnutls_deinit(client);
|
|
Packit |
aea12f |
gnutls_deinit(server);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
gnutls_certificate_free_credentials(serverx509cred);
|
|
Packit |
aea12f |
gnutls_certificate_free_credentials(clientx509cred);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
static
|
|
Packit |
aea12f |
void try_with_key(const char *name, const char *client_prio,
|
|
Packit |
aea12f |
const gnutls_datum_t *serv_cert,
|
|
Packit |
aea12f |
const gnutls_datum_t *serv_key,
|
|
Packit |
aea12f |
const gnutls_datum_t *cli_cert,
|
|
Packit |
aea12f |
const gnutls_datum_t *cli_key,
|
|
Packit |
aea12f |
unsigned cert_flags)
|
|
Packit |
aea12f |
{
|
|
Packit |
aea12f |
return try_with_key_ks(name, client_prio,
|
|
Packit |
aea12f |
serv_cert, serv_key, cli_cert, cli_key, cert_flags, GNUTLS_ENABLE_EARLY_START);
|
|
Packit |
aea12f |
}
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
#include "cert-common.h"
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
void doit(void)
|
|
Packit |
aea12f |
{
|
|
Packit |
aea12f |
/* TLS 1.3 no client cert: early start expected */
|
|
Packit |
aea12f |
try_ok("TLS 1.3 with ffdhe2048 rsa no-cli-cert", "NORMAL:-VERS-ALL:+VERS-TLS1.3:-GROUP-ALL:+GROUP-FFDHE2048");
|
|
Packit |
aea12f |
try_ok("TLS 1.3 with secp256r1 rsa no-cli-cert", "NORMAL:-VERS-ALL:+VERS-TLS1.3:-GROUP-ALL:+GROUP-SECP256R1");
|
|
Packit |
aea12f |
try_ok("TLS 1.3 with x25519 rsa no-cli-cert", "NORMAL:-VERS-ALL:+VERS-TLS1.3:-GROUP-ALL:+GROUP-X25519");
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
try_with_key_ks("TLS 1.3 with secp256r1 ecdsa no-cli-cert", "NORMAL:-VERS-ALL:+VERS-TLS1.3:-GROUP-ALL:+GROUP-SECP256R1",
|
|
Packit |
aea12f |
&server_ca3_localhost_ecc_cert, &server_ca3_ecc_key, NULL, NULL, 0, GNUTLS_ENABLE_EARLY_START);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* client authentication: no early start possible */
|
|
Packit |
aea12f |
try_with_key_fail("TLS 1.3 with rsa-pss cli-cert", "NORMAL:-VERS-ALL:+VERS-TLS1.3:-KX-ALL:+ECDHE-RSA",
|
|
Packit |
aea12f |
&server_ca3_localhost_ecc_cert, &server_ca3_ecc_key, &cli_ca3_rsa_pss_cert, &cli_ca3_rsa_pss_key, GNUTLS_ENABLE_EARLY_START);
|
|
Packit |
aea12f |
try_with_key_fail("TLS 1.3 with rsa cli-cert", "NORMAL:-VERS-ALL:+VERS-TLS1.3:-KX-ALL:+ECDHE-RSA",
|
|
Packit |
aea12f |
&server_ca3_localhost_ecc_cert, &server_ca3_ecc_key, &cli_ca3_cert, &cli_ca3_key, GNUTLS_ENABLE_EARLY_START);
|
|
Packit |
aea12f |
try_with_key_fail("TLS 1.3 with ecdsa cli-cert", "NORMAL:-VERS-ALL:+VERS-TLS1.3:-KX-ALL:+ECDHE-RSA",
|
|
Packit |
aea12f |
&server_ca3_localhost_ecc_cert, &server_ca3_ecc_key, &server_ca3_localhost_ecc_cert, &server_ca3_ecc_key, GNUTLS_ENABLE_EARLY_START);
|
|
Packit |
aea12f |
|
|
Packit |
aea12f |
/* TLS 1.3 no client cert: no early start flag specified */
|
|
Packit |
aea12f |
try_with_key_fail("TLS 1.3 with rsa-pss cli-cert", "NORMAL:-VERS-ALL:+VERS-TLS1.3:-KX-ALL:+ECDHE-RSA",
|
|
Packit |
aea12f |
&server_ca3_localhost_ecc_cert, &server_ca3_ecc_key, NULL, NULL, 0);
|
|
Packit |
aea12f |
}
|