Remove unused dh_blob parameter

This was used earlier in the wpa_supplicant configuration, but there was
no real use for that, so remove the now completely unused parameter to
simplify implementation.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2022-04-16 10:45:17 +03:00
parent 4a774cf317
commit 28c1c91d03
4 changed files with 3 additions and 25 deletions

View file

@ -148,8 +148,6 @@ struct tls_config {
* @private_key_passwd: Passphrase for decrypted private key, %NULL if no
* passphrase is used.
* @dh_file: File name for DH/DSA data in PEM format, or %NULL if not used
* @dh_blob: dh_file as inlined data or %NULL if not used
* @dh_blob_len: dh_blob length
* @engine: 1 = use engine (e.g., a smartcard) for private key operations
* (this is OpenSSL specific for now)
* @engine_id: engine id string (this is OpenSSL specific for now)
@ -198,8 +196,6 @@ struct tls_connection_params {
const char *private_key_passwd;
const char *private_key_passwd2;
const char *dh_file;
const u8 *dh_blob;
size_t dh_blob_len;
/* OpenSSL specific variables */
int engine;

View file

@ -335,8 +335,7 @@ int tls_global_set_params(void *tls_ctx,
return -1;
}
if (tlsv1_set_dhparams(cred, params->dh_file, params->dh_blob,
params->dh_blob_len)) {
if (tlsv1_set_dhparams(cred, params->dh_file, NULL, 0)) {
wpa_printf(MSG_INFO, "TLS: Failed to load DH parameters");
return -1;
}

View file

@ -3953,7 +3953,6 @@ static int tls_global_dh(struct tls_data *data, const char *dh_file)
DH *dh;
BIO *bio;
/* TODO: add support for dh_blob */
if (dh_file == NULL)
return 0;
if (ssl_ctx == NULL)

View file

@ -1383,25 +1383,10 @@ static int tls_global_private_key(void *ssl_ctx, const char *private_key,
}
static int tls_global_dh(void *ssl_ctx, const char *dh_file,
const u8 *dh_blob, size_t blob_len)
static int tls_global_dh(void *ssl_ctx, const char *dh_file)
{
WOLFSSL_CTX *ctx = ssl_ctx;
if (!dh_file && !dh_blob)
return 0;
if (dh_blob) {
if (wolfSSL_CTX_SetTmpDH_buffer(ctx, dh_blob, blob_len,
SSL_FILETYPE_ASN1) < 0) {
wpa_printf(MSG_INFO,
"SSL: global use DH DER blob failed");
return -1;
}
wpa_printf(MSG_DEBUG, "SSL: global use DH blob OK");
return 0;
}
if (dh_file) {
if (wolfSSL_CTX_SetTmpDH_file(ctx, dh_file, SSL_FILETYPE_PEM) <
0) {
@ -1488,8 +1473,7 @@ int tls_global_set_params(void *tls_ctx,
return -1;
}
if (tls_global_dh(tls_ctx, params->dh_file, params->dh_blob,
params->dh_blob_len) < 0) {
if (tls_global_dh(tls_ctx, params->dh_file) < 0) {
wpa_printf(MSG_INFO, "SSL: Failed to load DH file '%s'",
params->dh_file);
return -1;