]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove unused dh_blob parameter
authorJouni Malinen <j@w1.fi>
Sat, 16 Apr 2022 07:45:17 +0000 (10:45 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 16 Apr 2022 07:45:17 +0000 (10:45 +0300)
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>
src/crypto/tls.h
src/crypto/tls_internal.c
src/crypto/tls_openssl.c
src/crypto/tls_wolfssl.c

index 09fb73b1ae2458f6def826f7da2cae56f2715cd3..ccaac94c92672703a9703df31ab252e6721ddaa1 100644 (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;
index d7c4743c2c5fb226903f0bf911a09f7ed98c8b33..ef33b59f829e0c7cafed430a690b2df4a25739fe 100644 (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;
        }
index 553236b63388e56735c19428f3de247bf665854a..170fb869fc89bef6f0d33206de66ce88e13d05ad 100644 (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)
index f5cf85df3a065d0c2d4f40f159ca35d6b017daa2..e483b8027579ef8bd48f9f20742df31411d18213 100644 (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;