AC_CHECK_LIB(ssl, EVP_PKEY_get0_RSA, [
AC_DEFINE(HAVE_EVP_PKEY_get0,, [Build with EVP_PKEY_get0_*() support])
],, $SSL_LIBS)
+ AC_CHECK_LIB(ssl, SSL_CTX_set_ciphersuites, [
+ AC_DEFINE(HAVE_SSL_CTX_SET_CIPHERSUITES,, [Build with SSL_CTX_set_ciphersuites() support])
+ ],, $SSL_LIBS)
AC_CHECK_LIB(ssl, [EVP_PKEY_CTX_new_id], [have_evp_pkey_ctx_new_id="yes"],, $SSL_LIBS)
AC_CHECK_LIB(ssl, [EC_KEY_new], [have_ec_key_new="yes"],, $SSL_LIBS)
if test "$have_evp_pkey_ctx_new_id" = "yes" && test "$have_ec_key_new" = "yes"; then
set->curve_list);
return -1;
}
+#endif
+#ifdef HAVE_SSL_CTX_SET_CIPHERSUITES
+ if (set->ciphersuites != NULL &&
+ SSL_CTX_set_ciphersuites(ctx->ssl_ctx, set->ciphersuites) == 0) {
+ *error_r = t_strdup_printf("Can't set ciphersuites to '%s': %s",
+ set->cipher_list, openssl_iostream_error());
+ return -1;
+ }
#endif
if (set->prefer_server_ciphers) {
SSL_CTX_set_options(ctx->ssl_ctx,
return -1;
}
}
+#endif
+#ifdef HAVE_SSL_CTX_SET_CIPHERSUITES
+ if (set->ciphersuites != NULL &&
+ strcmp(ctx_set->ciphersuites, set->ciphersuites) != 0) {
+ if (SSL_set_ciphersuites(ssl_io->ssl, set->ciphersuites) == 0) {
+ *error_r = t_strdup_printf(
+ "Can't set ciphersuites to '%s': %s",
+ set->ciphersuites, openssl_iostream_error());
+ return -1;
+ }
+ }
#endif
if (set->prefer_server_ciphers)
SSL_set_options(ssl_io->ssl, SSL_OP_CIPHER_SERVER_PREFERENCE);
static const size_t ssl_iostream_settings_string_offsets[] = {
OFFSET(min_protocol),
OFFSET(cipher_list),
+ OFFSET(ciphersuites),
OFFSET(curve_list),
OFFSET(ca),
OFFSET(ca_file),
ssl_iostream_settings_drop_stream_only() */
const char *min_protocol; /* both */
const char *cipher_list; /* both */
+ const char *ciphersuites; /* both, TLSv1.3 only */
const char *curve_list; /* both */
const char *ca, *ca_file, *ca_dir; /* context-only */
/* alternative cert is for providing certificate using
ssl_iostream_test_settings_client(&client_set);
server_set.cipher_list = "ECDSA";
client_set.cipher_list = "RSA";
+ server_set.ciphersuites = "TLS_CHACHA20_POLY1305_SHA256";
+ client_set.ciphersuites = "TLS_AES_128_CCM_SHA256";
client_set.prefer_server_ciphers = TRUE;
client_set.verify_remote_cert = TRUE;
test_expect_error_string("client(127.0.0.1): SSL certificate not received");