VirtualBox

Ignore:
Timestamp:
Sep 4, 2024 12:53:14 PM (6 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
164683
Message:

openssl-3.1.7: Applied and adjusted our OpenSSL changes to 3.1.7. bugref:10757

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/openssl-3.1.7/crypto/evp/names.c

    r105945 r105949  
    11/*
    2  * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    44 * Licensed under the Apache License 2.0 (the "License").  You may not use
     
    7979    OSSL_NAMEMAP *namemap;
    8080    int id;
    81     int do_retry = 1;
    8281
    8382    if (!OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS, NULL))
     
    9695
    9796    namemap = ossl_namemap_stored(libctx);
    98  retry:
    9997    id = ossl_namemap_name2num(namemap, name);
    100     if (id == 0) {
    101         EVP_CIPHER *fetched_cipher;
    102 
    103         /* Try to fetch it because the name might not be known yet. */
    104         if (!do_retry)
    105             return NULL;
    106         do_retry = 0;
    107         ERR_set_mark();
    108         fetched_cipher = EVP_CIPHER_fetch(libctx, name, NULL);
    109         EVP_CIPHER_free(fetched_cipher);
    110         ERR_pop_to_mark();
    111         goto retry;
    112     }
     98    if (id == 0)
     99        return NULL;
    113100
    114101    if (!ossl_namemap_doall_names(namemap, id, cipher_from_name, &cp))
     
    138125    OSSL_NAMEMAP *namemap;
    139126    int id;
    140     int do_retry = 1;
    141127
    142128    if (!OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_DIGESTS, NULL))
     
    155141
    156142    namemap = ossl_namemap_stored(libctx);
    157  retry:
    158143    id = ossl_namemap_name2num(namemap, name);
    159     if (id == 0) {
    160         EVP_MD *fetched_md;
    161 
    162         /* Try to fetch it because the name might not be known yet. */
    163         if (!do_retry)
    164             return NULL;
    165         do_retry = 0;
    166         ERR_set_mark();
    167         fetched_md = EVP_MD_fetch(libctx, name, NULL);
    168         EVP_MD_free(fetched_md);
    169         ERR_pop_to_mark();
    170         goto retry;
    171     }
     144    if (id == 0)
     145        return NULL;
    172146
    173147    if (!ossl_namemap_doall_names(namemap, id, digest_from_name, &dp))
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette