VirtualBox

Ignore:
Timestamp:
Apr 9, 2019 4:02:32 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
129919
Message:

IPRT,GUI: Workaround for certificate downloads getting redirected to https.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp

    r76606 r78066  
    777777    NOREF(pStaticErrInfo);
    778778    int rc;
     779
     780    /*
     781     * Must disable SSL certification verification here as we cannot use the
     782     * SSL certificates before we've downloaded them.   We must also enable
     783     * redirections in case the certificates moves around.
     784     */
     785    bool const     fSavedVerifyPeer   = RTHttpGetVerifyPeer(hHttp);
     786    uint32_t const cSavedMaxRedirects = RTHttpGetFollowRedirects(hHttp);
     787    RTHttpSetVerifyPeer(hHttp, false);
     788    RTHttpSetFollowRedirects(hHttp, 8);
    779789
    780790    /*
     
    810820                                {
    811821                                    RTHttpFreeResponse(pvRootsZip);
     822                                    RTHttpSetVerifyPeer(hHttp, fSavedVerifyPeer);
     823                                    RTHttpSetFollowRedirects(hHttp, cSavedMaxRedirects);
    812824                                    return;
    813825                                }
     
    845857                }
    846858        }
     859
     860    RTHttpSetVerifyPeer(hHttp, fSavedVerifyPeer);
     861    RTHttpSetFollowRedirects(hHttp, cSavedMaxRedirects);
    847862}
    848863
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette