- Timestamp:
- Apr 5, 2016 12:32:22 PM (9 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ApplianceImpl.h
r60220 r60332 115 115 VirtualBox* const mVirtualBox; 116 116 117 ComObjPtr<Certificate> pCertificateInfo;117 ComObjPtr<Certificate> mptrCertificateInfo; 118 118 struct ImportStack; 119 119 class TaskOVF; -
trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
r60220 r60332 410 410 AssertReturn(m->m_pSecretKeyStore, E_FAIL); 411 411 412 pCertificateInfo.createObject();413 pCertificateInfo->init(this);412 mptrCertificateInfo.createObject(); 413 mptrCertificateInfo->init(this); 414 414 415 415 i_initApplianceIONameMap(); … … 522 522 HRESULT Appliance::getCertificate(ComPtr<ICertificate> &aCertificateInfo) 523 523 { 524 525 524 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 526 525 … … 528 527 return E_ACCESSDENIED; 529 528 530 531 pCertificateInfo.queryInterfaceTo(aCertificateInfo.asOutParam()); 532 533 529 /** @todo r=bird: What about when there is no signature and certificate? */ 530 mptrCertificateInfo.queryInterfaceTo(aCertificateInfo.asOutParam()); 534 531 return S_OK; 535 532 } -
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r60328 r60332 1716 1716 * digest that is encrypted with the certificate in the latter part. 1717 1717 */ 1718 bool lTrusted = false;1719 1720 1718 if (m->pbSignedDigest) 1721 1719 { … … 1810 1808 * is acceptible. But, first make sure it makes internal sense. 1811 1809 */ 1812 m->fCertificateMissingPath = false; 1810 m->fCertificateMissingPath = false; /** @todo need to check if the certificate is trusted by the system! */ 1813 1811 vrc = RTCrX509Certificate_VerifySignatureSelfSigned(&m->SignerCert, RTErrInfoInitStatic(&StaticErrInfo)); 1814 1812 if (RT_SUCCESS(vrc)) … … 1831 1829 if ( !m->SignerCert.TbsCertificate.T3.pBasicConstraints 1832 1830 || !m->SignerCert.TbsCertificate.T3.pBasicConstraints->CA.fValue) 1833 {1834 1831 i_addWarning(tr("Self signed certificate used to sign '%s' is not marked as certificate authority (CA)"), 1835 1832 pTask->locInfo.strPath.c_str()); 1836 }1837 else1838 lTrusted = true;1839 1833 } 1840 1834 else … … 1920 1914 else 1921 1915 hrc2 = setErrorVrc(vrc, "RTCrX509CertPathsSetValidTimeSpec failed: %Rrc", vrc); 1922 1923 if(RT_SUCCESS(vrc))1924 lTrusted = true;1925 1916 } 1926 1917 else if (vrc == VERR_CR_X509_CPV_NO_TRUSTED_PATHS) … … 1959 1950 1960 1951 /** @todo provide details about the signatory, signature, etc. */ 1961 if(m->fSignerCertLoaded) 1962 { 1963 pCertificateInfo->initCertificate(&m->SignerCert, lTrusted); 1964 } 1952 if (m->fSignerCertLoaded) 1953 mptrCertificateInfo->initCertificate(&m->SignerCert, m->fCertificateValid && !m->fCertificateMissingPath); 1965 1954 1966 1955 /*
Note:
See TracChangeset
for help on using the changeset viewer.