VirtualBox

Changeset 95595 in vbox


Ignore:
Timestamp:
Jul 12, 2022 2:20:48 AM (2 years ago)
Author:
vboxsync
Message:

IPRT/Pkcs7: Added a parameter to RTCrPkcs7SimpleSignSignedData (not yet implemented). bugref:8691

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/crypto/pkcs7.h

    r93115 r95595  
    634634RTDECL(int) RTCrPkcs7SimpleSignSignedData(uint32_t fFlags, PCRTCRX509CERTIFICATE pSigner, RTCRKEY hPrivateKey,
    635635                                          void const *pvData, size_t cbData, RTDIGESTTYPE enmDigestType,
    636                                           RTCRSTORE hAdditionalCerts, void *pvResult, size_t *pcbResult, PRTERRINFO pErrInfo);
     636                                          RTCRSTORE hAdditionalCerts, PCRTCRPKCS7ATTRIBUTES pAdditionalAuthenticatedAttribs,
     637                                          void *pvResult, size_t *pcbResult, PRTERRINFO pErrInfo);
    637638
    638639/** @name RTCRPKCS7SIGN_SD_F_XXX - Flags for RTCrPkcs7SimpleSign.
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp

    r95140 r95595  
    24482448            rc = RTCrPkcs7SimpleSignSignedData(RTCRPKCS7SIGN_SD_F_DEATCHED | RTCRPKCS7SIGN_SD_F_NO_SMIME_CAP,
    24492449                                               pCertificate, hPrivateKey, pvManifest, (size_t)cbManifest, enmDigestType,
    2450                                                hIntermediateCerts, NULL /*pvResult*/, &cbResult, RTErrInfoInitStatic(pErrInfo));
     2450                                               hIntermediateCerts, NULL /*pAdditionalAuthenticatedAttribs*/,
     2451                                               NULL /*pvResult*/, &cbResult, RTErrInfoInitStatic(pErrInfo));
    24512452            if (rc == VERR_BUFFER_OVERFLOW)
    24522453            {
     
    24592460                    rc = RTCrPkcs7SimpleSignSignedData(RTCRPKCS7SIGN_SD_F_DEATCHED | RTCRPKCS7SIGN_SD_F_NO_SMIME_CAP,
    24602461                                                       pCertificate, hPrivateKey, pvManifest, (size_t)cbManifest, enmDigestType,
    2461                                                        hIntermediateCerts, pvResult, &cbResult, RTErrInfoInitStatic(pErrInfo));
     2462                                                       hIntermediateCerts, , NULL /*pAdditionalAuthenticatedAttribs*/,
     2463                                                       pvResult, &cbResult, RTErrInfoInitStatic(pErrInfo));
    24622464                    if (RT_SUCCESS(rc))
    24632465                    {
  • trunk/src/VBox/Runtime/common/crypto/pkcs7-sign.cpp

    r93115 r95595  
    8888RTDECL(int) RTCrPkcs7SimpleSignSignedData(uint32_t fFlags, PCRTCRX509CERTIFICATE pSigner, RTCRKEY hPrivateKey,
    8989                                          void const *pvData, size_t cbData, RTDIGESTTYPE enmDigestType,
    90                                           RTCRSTORE hAdditionalCerts, void *pvResult, size_t *pcbResult, PRTERRINFO pErrInfo)
     90                                          RTCRSTORE hAdditionalCerts, PCRTCRPKCS7ATTRIBUTES pAdditionalAuthenticatedAttribs,
     91                                          void *pvResult, size_t *pcbResult, PRTERRINFO pErrInfo)
    9192{
    9293    size_t const cbResultBuf = *pcbResult;
     
    145146                    if (pCms != NULL)
    146147                    {
     148RT_NOREF(pAdditionalAuthenticatedAttribs); /** @todo */
    147149                        if (CMS_add1_signer(pCms, pOsslSigner, pEvpPrivateKey, pEvpMd, fOsslSign) != NULL)
    148150                        {
     
    203205    return rc;
    204206#else
    205     RT_NOREF(fFlags, pSigner, hPrivateKey, pvData, cbData, enmDigestType, hAdditionalCerts, pvResult, pErrInfo, cbResultBuf);
     207    RT_NOREF(fFlags, pSigner, hPrivateKey, pvData, cbData, enmDigestType, hAdditionalCerts, pAdditionalAuthenticatedAttribs,
     208             pvResult, pErrInfo, cbResultBuf);
    206209    *pcbResult = 0;
    207210    return VERR_NOT_IMPLEMENTED;
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