VirtualBox

Ignore:
Timestamp:
Jul 15, 2022 12:57:06 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
152300
Message:

IPRT/iprt-openssl.cpp: Register a bunch of OID we could be needing when initializing OpenSSL. bugref:8691

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/crypto/iprt-openssl.cpp

    r95604 r95655  
    3838# include <iprt/crypto/digest.h>
    3939# include <iprt/crypto/pkcs7.h>
     40# include <iprt/crypto/spc.h>
    4041
    4142# include "internal/iprt-openssl.h"
     
    5455        ERR_load_ERR_strings();
    5556        ERR_load_crypto_strings();
     57
     58        /* Add some OIDs we might possibly want to use. */
     59        static struct { const char *pszOid, *pszDesc; } const s_aOids[] =
     60        {
     61            { RTCRSPC_PE_IMAGE_HASHES_V1_OID,               "Ms-SpcPeImagePageHashesV1" },
     62            { RTCRSPC_PE_IMAGE_HASHES_V2_OID,               "Ms-SpcPeImagePageHashesV2" },
     63            { RTCRSPC_STMT_TYPE_INDIVIDUAL_CODE_SIGNING,    "Ms-SpcIndividualCodeSigning" },
     64            { RTCRSPCPEIMAGEDATA_OID,                       "Ms-SpcPeImageData" },
     65            { RTCRSPCINDIRECTDATACONTENT_OID,               "Ms-SpcIndirectDataContext" },
     66            { RTCR_PKCS9_ID_MS_TIMESTAMP,                   "Ms-CounterSign" },
     67            { RTCR_PKCS9_ID_MS_NESTED_SIGNATURE,            "Ms-SpcNestedSignature" },
     68            { RTCR_PKCS9_ID_MS_STATEMENT_TYPE,              "Ms-SpcStatementType" },
     69            { RTCR_PKCS9_ID_MS_SP_OPUS_INFO,                "Ms-SpcOpusInfo" },
     70            { "1.3.6.1.4.1.311.3.2.1",                      "Ms-SpcTimeStampRequest" },     /** @todo define */
     71            { "1.3.6.1.4.1.311.10.1",                       "Ms-CertTrustList" },           /** @todo define */
     72        };
     73        for (unsigned i = 0; i < RT_ELEMENTS(s_aOids); i++)
     74            OBJ_create(s_aOids[i].pszOid, s_aOids[i].pszDesc, s_aOids[i].pszDesc);
    5675
    5776        s_fOssInitalized = true;
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