• Bug#1103469: bookworm-pu: package openssl/openssl_3.0.16-1~deb12u1 (4/1

    From Sebastian Andrzej Siewior@21:1/5 to All on Fri Apr 18 00:10:01 2025
    [continued from previous message]

    - port = use_ssl ? OSSL_HTTPS_PORT : OSSL_HTTP_PORT;
    + port = explict_or_default_port(host, port, use_ssl);

    cbio = BIO_new_connect(host /* optionally includes ":port" */);
    if (cbio == NULL)
    @@ -958,8 +971,6 @@
    }
    if (port != NULL && *port == '\0')
    port = NULL;
    - if (port == NULL && strchr(server, ':') == NULL)
    - port = use_ssl ? OSSL_HTTPS_PORT : OSSL_HTTP_PORT;
    proxy = OSSL_HTTP_adapt_proxy(proxy, no_proxy, server, use_ssl);
    if (proxy != NULL
    && !OSSL_HTTP_parse_url(proxy, NULL /* use_ssl */, NULL /* user */,
    diff -Nru openssl-3.0.15/crypto/http/http_lib.c openssl-3.0.16/crypto/http/http_lib.c
    --- openssl-3.0.15/crypto/http/http_lib.c 2024-09-03 15:30:13.000000000 +0200
    +++ openssl-3.0.16/crypto/http/http_lib.c 2025-02-11 15:47:41.000000000 +0100
    @@ -1,5 +1,5 @@
    /*
    - * Copyright 2001-2023 The OpenSSL Project Authors. All Rights Reserved.
    + * Copyright 2001-2025 The OpenSSL Project Authors. All Rights Reserved.
    *
    * Licensed under the Apache License 2.0 (the "License"). You may not use
    * this file except in compliance with the License. You can obtain a copy
    @@ -9,11 +9,18 @@

    #include <stdio.h> /* for sscanf() */
    #include <string.h>
    +#ifndef OPENSSL_NO_SOCK
    +# include "../bio/bio_local.h" /* for NI_MAXHOST */
    +#endif
    #include <openssl/http.h>
    #include <openssl/httperr.h>
    #include <openssl/bio.h> /* for BIO_snprintf() */
    #include <openssl/err.h>
    #include "internal/cryptlib.h" /* for ossl_assert() */
    +#ifndef NI_MAXHOST
    +# define NI_MAXHOST 255
    +#endif
    +#include "crypto/ctype.h" /* for ossl_isspace() */

    static void init_pstring(char **pstr)
    {
    @@ -2