Changeset 84164 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- May 6, 2020 3:32:25 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137768
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp
r84151 r84164 1930 1930 1931 1931 /** 1932 * Appends the certificate in PEM format to the given VFS file.1933 */1934 static int doWriteCertificate(RTVFSFILE hVfsFileSignature, PCRTCRX509CERTIFICATE pCertificate)1935 {1936 RT_NOREF(hVfsFileSignature, pCertificate);1937 RTPrintf("TODO: doWriteCertificate\n");1938 return VINF_SUCCESS;1939 }1940 1941 1942 /**1943 1932 * Performs the OVA signing, producing an in-memory cert-file. 1944 1933 */ 1945 static int doTheOvaSigning(P CRTCRX509CERTIFICATE pCertificate, RTCRKEY hPrivateKey,1934 static int doTheOvaSigning(PRTCRX509CERTIFICATE pCertificate, RTCRKEY hPrivateKey, 1946 1935 const char *pszManifestName, RTVFSFILE hVfsFileManifest, 1947 1936 bool fPkcs7, unsigned cIntermediateCerts, const char **papszIntermediateCerts, … … 2017 2006 pszDigestType, pszManifestName, cbSignature, pvSignature); 2018 2007 if (RT_SUCCESS(rc)) 2019 rc = doWriteCertificate(hVfsFileSignature, pCertificate); 2008 { 2009 rc = RTCrX509Certificate_WriteToVfsFile(hVfsFileSignature, pCertificate, 2010 RTErrInfoInitStatic(pErrInfo)); 2011 if (RT_SUCCESS(rc)) 2012 { 2013 if (fPkcs7) 2014 rc = doAddPkcs7Signature(pCertificate, hPrivateKey, cIntermediateCerts, 2015 papszIntermediateCerts, hDigest, pErrInfo, hVfsFileSignature); 2016 if (RT_SUCCESS(rc)) 2017 { 2018 /* 2019 * Success. 2020 */ 2021 *phVfsFileSignature = hVfsFileSignature; 2022 hVfsFileSignature = NIL_RTVFSFILE; 2023 } 2024 } 2025 else 2026 RTMsgError("Failed to write certificate to signature file: %Rrc%#RTeim", rc, &pErrInfo->Core); 2027 } 2020 2028 else 2021 2029 RTMsgError("Failed to produce signature file: %Rrc", rc); 2022 if (RT_SUCCESS(rc) && fPkcs7) 2023 rc = doAddPkcs7Signature(pCertificate, hPrivateKey, cIntermediateCerts, papszIntermediateCerts, 2024 hDigest, pErrInfo, hVfsFileSignature); 2025 if (RT_SUCCESS(rc)) 2026 { 2027 /* 2028 * Success. 2029 */ 2030 *phVfsFileSignature = hVfsFileSignature; 2031 } 2032 else 2033 RTVfsFileRelease(hVfsFileSignature); 2030 RTVfsFileRelease(hVfsFileSignature); 2034 2031 } 2035 2032 else
Note:
See TracChangeset
for help on using the changeset viewer.