History

trust high fidelity root CA cert for OAuth redirect

Stephen Birarda committed 12 years ago

Commit 7d3157b1 parent d9033a84 files · +19 −2Browse files

Showing the changes to interface/src/ui/OAuthWebViewHandler.cpp (1 of 4 files). Show all

Unified · Split

interface/src/ui/OAuthWebViewHandler.cpp+14−0
@@ -26,10 +26,24 @@ OAuthWebViewHandler::OAuthWebViewHandler() : · 25 unmodified lines
26 26
27}27}
28 28
29void OAuthWebViewHandler::addHighFidelityRootCAToSSLConfig() {
30 QSslConfiguration sslConfig = QSslConfiguration::defaultConfiguration();
31
32 // add the High Fidelity root CA to the list of trusted CA certificates
33 QByteArray highFidelityCACertificate(reinterpret_cast<char*>(DTLSSession::highFidelityCADatum()->data),
34 DTLSSession::highFidelityCADatum()->size);
35 sslConfig.setCaCertificates(sslConfig.caCertificates() + QSslCertificate::fromData(highFidelityCACertificate));
36
37 // set the modified configuration
38 QSslConfiguration::setDefaultConfiguration(sslConfig);
39}
40
29void OAuthWebViewHandler::displayWebviewForAuthorizationURL(const QUrl& authorizationURL) {41void OAuthWebViewHandler::displayWebviewForAuthorizationURL(const QUrl& authorizationURL) {
30 if (!_activeWebView) {42 if (!_activeWebView) {
31 _activeWebView = new QWebView();43 _activeWebView = new QWebView();
32 _activeWebView->setWindowFlags(Qt::WindowStaysOnTopHint);44 _activeWebView->setWindowFlags(Qt::WindowStaysOnTopHint);
45
46 qDebug() << "Displaying QWebView for OAuth authorization at" << authorizationURL.toString();
33 _activeWebView->load(authorizationURL);47 _activeWebView->load(authorizationURL);
34 _activeWebView->show();48 _activeWebView->show();
35 49

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t