VirtualBox

Changeset 62221 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 13, 2016 2:47:50 PM (9 years ago)
Author:
vboxsync
Message:

Appliance::i_readSignatureFile: RTCrX509Certificate_ReadFromBuffer must treat the cert-file as a PEM file, never a binary. Added dedicated message for cert-files missing the signer's certificate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp

    r61012 r62221  
    15871587     */
    15881588    RTERRINFOSTATIC StaticErrInfo;
    1589     vrc = RTCrX509Certificate_ReadFromBuffer(&m->SignerCert, pvSignature, cbSignature, 0 /*fFlags*/,
     1589    vrc = RTCrX509Certificate_ReadFromBuffer(&m->SignerCert, pvSignature, cbSignature,
     1590                                             RTCRX509CERT_READ_F_PEM_ONLY,
    15901591                                             &g_RTAsn1DefaultAllocator, RTErrInfoInitStatic(&StaticErrInfo), pszSubFileNm);
    15911592    HRESULT hrc;
     
    16901691            hrc = E_OUTOFMEMORY;
    16911692    }
     1693    else if (vrc == VERR_NOT_FOUND || vrc == VERR_EOF)
     1694        hrc = setErrorBoth(E_FAIL, vrc, tr("Malformed .cert-file for '%s': Signer's certificate not found (%Rrc)"),
     1695                           pTask->locInfo.strPath.c_str(), vrc);
    16921696    else
    16931697        hrc = setErrorVrc(vrc, tr("Error reading the signer's certificate from '%s' for '%s' (%Rrc): %s"),
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