VirtualBox

Ignore:
Timestamp:
Nov 2, 2022 7:40:16 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154372
Message:

libs: Switch to openssl-3.0.7, bugref:10317

Location:
trunk/src/libs/openssl-3.0.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/openssl-3.0.7

    • Property svn:mergeinfo
      •  

        old new  
        1515/vendor/openssl/3.0.2:150728-150729
        1616/vendor/openssl/3.0.3:151497-151729
        17 /vendor/openssl/current:147554-151496
         17/vendor/openssl/3.0.7:154371
         18/vendor/openssl/current:147554-154370
  • trunk/src/libs/openssl-3.0.7/apps/lib/apps.c

    r95219 r97372  
    11871187    else if (OPENSSL_strcasecmp(arg, "iso_8601") == 0)
    11881188        *dateopt = ASN1_DTFLGS_ISO8601;
    1189     return 0;
     1189    else
     1190        return 0;
     1191    return 1;
    11901192}
    11911193
     
    13701372            goto end;
    13711373        if (CAfile != NULL) {
    1372             if (!X509_LOOKUP_load_file_ex(lookup, CAfile, X509_FILETYPE_PEM,
    1373                                           libctx, propq)) {
     1374            if (X509_LOOKUP_load_file_ex(lookup, CAfile, X509_FILETYPE_PEM,
     1375                                          libctx, propq) <= 0) {
    13741376                BIO_printf(bio_err, "Error loading file %s\n", CAfile);
    13751377                goto end;
     
    13861388            goto end;
    13871389        if (CApath != NULL) {
    1388             if (!X509_LOOKUP_add_dir(lookup, CApath, X509_FILETYPE_PEM)) {
     1390            if (X509_LOOKUP_add_dir(lookup, CApath, X509_FILETYPE_PEM) <= 0) {
    13891391                BIO_printf(bio_err, "Error loading directory %s\n", CApath);
    13901392                goto end;
     
    14551457#undef BSIZE
    14561458#define BSIZE 256
    1457 BIGNUM *load_serial(const char *serialfile, int create, ASN1_INTEGER **retai)
     1459BIGNUM *load_serial(const char *serialfile, int *exists, int create,
     1460                    ASN1_INTEGER **retai)
    14581461{
    14591462    BIO *in = NULL;
     
    14671470
    14681471    in = BIO_new_file(serialfile, "r");
     1472    if (exists != NULL)
     1473        *exists = in != NULL;
    14691474    if (in == NULL) {
    14701475        if (!create) {
     
    14741479        ERR_clear_error();
    14751480        ret = BN_new();
    1476         if (ret == NULL || !rand_serial(ret, ai))
     1481        if (ret == NULL) {
    14771482            BIO_printf(bio_err, "Out of memory\n");
     1483        } else if (!rand_serial(ret, ai)) {
     1484            BIO_printf(bio_err, "Error creating random number to store in %s\n",
     1485                       serialfile);
     1486            BN_free(ret);
     1487            ret = NULL;
     1488        }
    14781489    } else {
    14791490        if (!a2i_ASN1_INTEGER(in, ai, buf, 1024)) {
     
    14891500    }
    14901501
    1491     if (ret && retai) {
     1502    if (ret != NULL && retai != NULL) {
    14921503        *retai = ai;
    14931504        ai = NULL;
    14941505    }
    14951506 err:
    1496     ERR_print_errors(bio_err);
     1507    if (ret == NULL)
     1508        ERR_print_errors(bio_err);
    14971509    BIO_free(in);
    14981510    ASN1_INTEGER_free(ai);
     
    24572469    SSL_CTX *ssl_ctx = info->ssl_ctx;
    24582470
    2459     if (connect && detail) { /* connecting with TLS */
     2471    if (ssl_ctx == NULL) /* not using TLS */
     2472        return bio;
     2473    if (connect) {
    24602474        SSL *ssl;
    24612475        BIO *sbio = NULL;
     
    25352549        ERR_raise_data(ERR_LIB_HTTP, ERR_R_PASSED_NULL_PARAMETER,
    25362550                       "missing SSL_CTX");
     2551        goto end;
     2552    }
     2553    if (!use_ssl && ssl_ctx != NULL) {
     2554        ERR_raise_data(ERR_LIB_HTTP, ERR_R_PASSED_INVALID_ARGUMENT,
     2555                       "SSL_CTX given but use_ssl == 0");
    25372556        goto end;
    25382557    }
     
    29182937    void *prefix = NULL;
    29192938
     2939    if (b == NULL)
     2940        return NULL;
     2941
    29202942#ifdef OPENSSL_SYS_VMS
    29212943    if (FMT_istext(format))
     
    29372959                        BIO_NOCLOSE | (FMT_istext(format) ? BIO_FP_TEXT : 0));
    29382960#ifdef OPENSSL_SYS_VMS
    2939     if (FMT_istext(format))
     2961    if (b != NULL && FMT_istext(format))
    29402962        b = BIO_push(BIO_new(BIO_f_linebuffer()), b);
    29412963#endif
Note: See TracChangeset for help on using the changeset viewer.

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