Changeset 57671 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Sep 9, 2015 3:42:22 PM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r57480 r57671 77 77 # the VirtualBox setup below. 78 78 # 79 # This is a bit messy. We boldly ASSUME that LANGUAGE, IMAGES, FORMS 80 # and TRANSLATIONS are all unused by kBuild and the host toolchain. 81 # 79 82 SAVED_TEMPLATE := $(TEMPLATE) 80 83 include $(PATH_SUB_CURRENT)/VBoxUI.pro 84 TEMPLATE := $(SAVED_TEMPLATE) 85 SAVED_TEMPLATE := 86 LANGUAGE := 87 IMAGES := 88 # FORMS and TRANSLATIONS are reset further down. 81 89 82 90 … … 1002 1010 1003 1011 1012 # 1013 # Unset everything that was loaded from VBoxUI.pro. 1014 # 1015 FORMS := 1016 TRANSLATIONS := 1017 1018 1004 1019 ifeq ($(KBUILD_TARGET),darwin) 1005 1020 # … … 1114 1129 endif 1115 1130 1131 1116 1132 # 1117 1133 # Testcase for the darwin keyboard routines. 1118 1134 # 1119 1135 ifdef VBOX_WITH_TESTCASES 1120 PROGRAMS.darwin += tstDarwinKeyboard 1121 tstDarwinKeyboard_NAME = tstDarwinKeyboard 1122 tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE 1123 tstDarwinKeyboard_DEFS.x86 = USE_HID_FOR_MODIFIERS 1124 tstDarwinKeyboard_INCS = include 1125 tstDarwinKeyboard_SOURCES = \ 1126 src/platform/darwin/tstDarwinKeyboard.cpp \ 1127 src/platform/darwin/DarwinKeyboard.cpp 1128 tstDarwinKeyboard_SOURCES.amd64 = \ 1129 src/platform/darwin/CocoaEventHelper.mm 1130 tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon -framework AppKit 1131 tstDarwinKeyboard_LIBS = \ 1132 $(LIB_RUNTIME) 1133 endif 1134 1135 1136 # Unset everything that was loaded from VBoxUI.pro. 1137 TEMPLATE := $(SAVED_TEMPLATE) 1138 SAVED_TEMPLATE := 1139 LANGUAGE := 1140 FORMS := 1141 TRANSLATIONS := 1142 IMAGES := 1136 PROGRAMS.darwin += tstDarwinKeyboard 1137 tstDarwinKeyboard_TEMPLATE = VBOXR3TSTEXE 1138 tstDarwinKeyboard_DEFS.x86 = USE_HID_FOR_MODIFIERS 1139 tstDarwinKeyboard_INCS = include 1140 tstDarwinKeyboard_SOURCES = \ 1141 src/platform/darwin/tstDarwinKeyboard.cpp \ 1142 src/platform/darwin/DarwinKeyboard.cpp 1143 tstDarwinKeyboard_SOURCES.amd64 = \ 1144 src/platform/darwin/CocoaEventHelper.mm 1145 tstDarwinKeyboard_LDFLAGS = -framework IOKit -framework Carbon -framework AppKit 1146 tstDarwinKeyboard_LIBS = \ 1147 $(LIB_RUNTIME) 1148 endif 1149 1150 1151 # 1152 # Testcase for SSL certificate downloading. 1153 # 1154 if defined(VBOX_WITH_TESTCASES) && defined(VBOX_GUI_WITH_NETWORK_MANAGER) 1155 PROGRAMS += tstSSLCertDownloads 1156 tstSSLCertDownloads_TEMPLATE = VBOXQT4GUIEXE 1157 tstSSLCertDownloads_DEFS = VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS 1158 tstSSLCertDownloads_INCS = \ 1159 $(VBOX_GUI_INC_DIRS) \ 1160 $(VirtualBox_0_OUTDIR)/include 1161 tstSSLCertDownloads_SOURCES = \ 1162 src/net/tstSSLCertDownloads.cpp 1163 tstSSLCertDownloads_QT_MOCSRCS += \ 1164 src/net/UINetworkReply.cpp 1165 tstSSLCertDownloads_QT_MODULES = Core GUI Network 1166 endif 1143 1167 1144 1168 -
trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp
r57666 r57671 25 25 # include <QThread> 26 26 # include <QRegExp> 27 # include <QVector> 27 28 28 29 /* GUI includes: */ 29 30 # include "UINetworkReply.h" 30 31 # include "UINetworkManager.h" 31 # include "VBoxGlobal.h" 32 # include "VBoxUtils.h" 32 # ifndef VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS 33 # include "VBoxGlobal.h" 34 # include "VBoxUtils.h" 35 # else 36 # include <VBox/log.h> 37 # endif 33 38 34 39 /* Other VBox includes; */ … … 116 121 QByteArray m_reply; 117 122 123 static const char * const s_apszRootsZipUrls[]; 124 static const CERTINFO s_CertInfoPcaCls3Gen5; 125 static const RTCRCERTWANTED s_aCerts[]; 118 126 static const QString s_strCertificateFileName; 119 static const RTCRCERTWANTED s_aCerts[3]; 120 static const CERTINFO s_CertInfoPcaCls3Gen5; 127 128 #ifdef VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS 129 friend UINetworkReplyPrivateThreadTestcase; 130 #endif 121 131 }; 122 132 133 134 /** 135 * URLs to root zip files containing certificates we want. 136 */ 137 /*static*/ const char * const UINetworkReplyPrivateThread::s_apszRootsZipUrls[] = 138 { 139 "http://www.symantec.com/content/en/us/enterprise/verisign/roots/roots.zip" 140 }; 141 142 143 /** 144 * Download details for 145 */ 123 146 /*static*/ const UINetworkReplyPrivateThread::CERTINFO UINetworkReplyPrivateThread::s_CertInfoPcaCls3Gen5 = 124 147 { 125 148 /*.pszZipFile =*/ 126 149 "VeriSign Root Certificates/Generation 5 (G5) PCA/VeriSign Class 3 Public Primary Certification Authority - G5.pem", 127 /*.apszUrls[ 3]=*/150 /*.apszUrls[] =*/ 128 151 { 129 152 "http://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-Certification-Authority-G5.pem", 130 153 "http://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class-3-Public-Primary-Certification-Authority-G5.pem", /* (in case they correct above typo) */ 131 154 "http://www.verisign.com/repository/roots/root-certificates/PCA-3G5.pem", /* dead */ 132 "http://update.virtualbox.org/cacerts-symantec-PCA-3G5-pem-has-gone-missing-again" /* attention getter */155 NULL, 133 156 } 134 157 }; … … 139 162 * The pvUser member points to a UINetworkReplyPrivateThread::CERTINFO. 140 163 */ 141 /* static */ const RTCRCERTWANTED UINetworkReplyPrivateThread::s_aCerts[ 3] =164 /* static */ const RTCRCERTWANTED UINetworkReplyPrivateThread::s_aCerts[] = 142 165 { 143 166 /*[0] =*/ … … 193 216 m_strContext = tr("During proxy configuration"); 194 217 218 #ifndef VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS 195 219 /* Get the proxymanager: */ 196 220 UIProxyManager proxyManager(vboxGlobal().settings().proxySettings()); … … 198 222 /* If the specific proxy settings aren't enabled, we'll use the 199 223 system default proxy. Otherwise assume it's configured. */ 200 int rc; 201 if (!proxyManager.proxyEnabled()) 202 rc = RTHttpUseSystemProxySettings(m_hHttp); 203 else 204 rc = RTHttpSetProxy(m_hHttp, 205 proxyManager.proxyHost().toUtf8().constData(), 206 proxyManager.proxyPort().toUInt(), 207 NULL /* pszProxyUser */, NULL /* pszProxyPwd */); 224 if (proxyManager.proxyEnabled()) 225 return RTHttpSetProxy(m_hHttp, 226 proxyManager.proxyHost().toUtf8().constData(), 227 proxyManager.proxyPort().toUInt(), 228 NULL /* pszProxyUser */, NULL /* pszProxyPwd */); 208 229 209 230 /** @todo This should be some kind of tristate: … … 216 237 * that would require no real changes to the visible GUI... Just a thought. 217 238 */ 218 return rc; 239 #endif 240 return RTHttpUseSystemProxySettings(m_hHttp); 219 241 } 220 242 … … 377 399 QString UINetworkReplyPrivateThread::fullCertificateFileName() 378 400 { 401 #ifndef VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS 379 402 const QDir homeDir(QDir::toNativeSeparators(vboxGlobal().homeFolder())); 380 403 return QDir::toNativeSeparators(homeDir.absoluteFilePath(s_strCertificateFileName)); 404 #else 405 return QString("/not/such/agency/non-existing-file.cer"); 406 #endif 381 407 } 382 408 … … 536 562 * Try get the roots.zip from symantec (or virtualbox.org) first. 537 563 */ 538 static const char * const a_apszRootsZipUrls[] = 539 { 540 "http://www.symantec.com/content/en/us/enterprise/verisign/roots/roots.zip", 541 "http://update.virtualbox.org/cacerts-symantec-roots-zip-has-gone-missing-again" /* Just to try grab our attention. */ 542 }; 543 for (uint32_t iUrl = 0; iUrl < RT_ELEMENTS(a_apszRootsZipUrls); iUrl++) 564 for (uint32_t iUrl = 0; iUrl < RT_ELEMENTS(s_apszRootsZipUrls); iUrl++) 544 565 { 545 566 void *pvRootsZip; 546 567 size_t cbRootsZip; 547 rc = RTHttpGetBinary(hHttp, a_apszRootsZipUrls[iUrl], &pvRootsZip, &cbRootsZip);568 rc = RTHttpGetBinary(hHttp, s_apszRootsZipUrls[iUrl], &pvRootsZip, &cbRootsZip); 548 569 if (RT_SUCCESS(rc)) 549 570 { … … 778 799 }; 779 800 801 802 803 /* 804 * 805 * Class UINetworkReply implementation. 806 * Class UINetworkReply implementation. 807 * Class UINetworkReply implementation. 808 * 809 */ 810 811 #ifndef VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS 812 780 813 UINetworkReply::UINetworkReply(const QNetworkRequest &request, UINetworkRequestType requestType) 781 814 : m_replyType(UINetworkReplyType_Qt) … … 892 925 } 893 926 927 #endif /* !VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS */ 928 894 929 #include "UINetworkReply.moc" 895 930
Note:
See TracChangeset
for help on using the changeset viewer.