...
authorVolker Birk <vb@pep-project.org>
Fri, 24 Jun 2016 03:43:42 +0200
changeset 124ce9401d49537
parent 123 6d311985ee41
child 125 21f6d0f5d86a
child 126 8cf20db557f1
...
GateKeeper.cpp
     1.1 --- a/GateKeeper.cpp	Thu Jun 23 21:08:02 2016 +0200
     1.2 +++ b/GateKeeper.cpp	Fri Jun 24 03:43:42 2016 +0200
     1.3 @@ -344,8 +344,15 @@
     1.4      void GateKeeper::update_product(product p, DWORD context)
     1.5      {
     1.6          string delivery = wrapped_delivery_key(delivery_key());
     1.7 -
     1.8 -        HINTERNET hUrl = InternetOpenUrl(internet, p.second.c_str(), NULL, 0,
     1.9 +        tstring url = p.second;
    1.10 +        url += _T("&challenge=");
    1.11 +#ifdef UNICODE
    1.12 +        url += utility::utf16_string(delivery);
    1.13 +#else
    1.14 +        url += delivery;
    1.15 +#endif
    1.16 +        tstring headers;
    1.17 +        HINTERNET hUrl = InternetOpenUrl(internet, url.c_str(), headers.c_str(), headers.length(),
    1.18                  INTERNET_FLAG_EXISTING_CONNECT | INTERNET_FLAG_NO_UI | INTERNET_FLAG_SECURE, context);
    1.19          if (hUrl == NULL)
    1.20              return;
    1.21 @@ -372,9 +379,9 @@
    1.22          if (status)
    1.23              goto closing;
    1.24  
    1.25 -        internet = InternetOpen(_T("pEp"), INTERNET_OPEN_TYPE_PROXY, NULL, NULL, 0);
    1.26 -        //if (!internet)
    1.27 -        //    goto closing;
    1.28 +        internet = InternetOpen(_T("pEp"), INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
    1.29 +        if (!internet)
    1.30 +            goto closing;
    1.31  
    1.32          product_list& products = registered_products();
    1.33          DWORD context = 0;