winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1174 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Don't use to_object for nullDisp in Object function.
by Alexandre Julliard
01 Oct '10
01 Oct '10
Module: wine Branch: master Commit: 93e6ca87479ed9688c88d67614637be60250842a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=93e6ca87479ed9688c88d6761…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Oct 1 13:54:42 2010 +0200 jscript: Don't use to_object for nullDisp in Object function. --- dlls/jscript/object.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/jscript/object.c b/dlls/jscript/object.c index 05eb509..bbb0372 100644 --- a/dlls/jscript/object.c +++ b/dlls/jscript/object.c @@ -186,7 +186,7 @@ static HRESULT ObjectConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags if(arg_cnt(dp)) { VARIANT *arg = get_arg(dp,0); - if(V_VT(arg) != VT_EMPTY && V_VT(arg) != VT_NULL) { + if(V_VT(arg) != VT_EMPTY && V_VT(arg) != VT_NULL && (V_VT(arg) != VT_DISPATCH || V_DISPATCH(arg))) { IDispatch *disp; hres = to_object(ctx, arg, &disp);
1
0
0
0
Vitaly Perov : shdocvw: Silence more invalid QueryInterface FIXMEs.
by Alexandre Julliard
01 Oct '10
01 Oct '10
Module: wine Branch: master Commit: a15301a0bcbaa6c654f0fa7e23b3ef121e428513 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a15301a0bcbaa6c654f0fa7e2…
Author: Vitaly Perov <vitperov(a)etersoft.ru> Date: Fri Oct 1 13:09:40 2010 +0400 shdocvw: Silence more invalid QueryInterface FIXMEs. --- dlls/shdocvw/tests/webbrowser.c | 10 ++++++++++ dlls/shdocvw/webbrowser.c | 6 ++++++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/dlls/shdocvw/tests/webbrowser.c b/dlls/shdocvw/tests/webbrowser.c index 04a0b8e..babfe11 100644 --- a/dlls/shdocvw/tests/webbrowser.c +++ b/dlls/shdocvw/tests/webbrowser.c @@ -2437,6 +2437,8 @@ static void test_QueryInterface(IUnknown *unk) IObjectWithSite *site = (void*)0xdeadbeef; IViewObjectEx *viewex = (void*)0xdeadbeef; IOleLink *link = (void*)0xdeadbeef; + IMarshal *marshal = (void*)0xdeadbeef; + IStdMarshalInfo *marshalinfo = (void*)0xdeadbeef; HRESULT hres; hres = IUnknown_QueryInterface(unk, &IID_IQuickActivate, (void**)&qa); @@ -2471,6 +2473,14 @@ static void test_QueryInterface(IUnknown *unk) ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); ok(link == NULL, "link=%p, expected NULL\n", link); + hres = IUnknown_QueryInterface(unk, &IID_IMarshal, (void**)&marshal); + ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); + ok(marshal == NULL, "marshal=%p, expected NULL\n", marshal); + + hres = IUnknown_QueryInterface(unk, &IID_IStdMarshalInfo, (void**)&marshalinfo); + ok(hres == E_NOINTERFACE, "QueryInterface returned %08x, expected E_NOINTERFACE\n", hres); + ok(marshalinfo == NULL, "marshalinfo=%p, expected NULL\n", marshalinfo); + } static void test_WebBrowser(BOOL do_download) diff --git a/dlls/shdocvw/webbrowser.c b/dlls/shdocvw/webbrowser.c index 0c1bb12..ef46236 100644 --- a/dlls/shdocvw/webbrowser.c +++ b/dlls/shdocvw/webbrowser.c @@ -130,6 +130,12 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser2 *iface, REFIID riid }else if(IsEqualGUID(&IID_IOleLink, riid)) { TRACE("(%p)->(IID_IOleLink %p) returning NULL\n", This, ppv); return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_IMarshal, riid)) { + TRACE("(%p)->(IID_IMarshal %p) returning NULL\n", This, ppv); + return E_NOINTERFACE; + }else if(IsEqualGUID(&IID_IStdMarshalInfo, riid)) { + TRACE("(%p)->(IID_IStdMarshalInfo %p) returning NULL\n", This, ppv); + return E_NOINTERFACE; }else if(HlinkFrame_QI(&This->hlink_frame, riid, ppv)) { return S_OK; }
1
0
0
0
Detlef Riekenberg : inetcpl: Implement LaunchInternetControlPanel.
by Alexandre Julliard
01 Oct '10
01 Oct '10
Module: wine Branch: master Commit: ca042b2922e4c7dcfcb0235e5b4aea9fe745718c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca042b2922e4c7dcfcb0235e5…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Fri Oct 1 13:16:56 2010 +0200 inetcpl: Implement LaunchInternetControlPanel. --- dlls/inetcpl.cpl/inetcpl.c | 21 +++++++++++++++++++++ dlls/inetcpl.cpl/inetcpl.cpl.spec | 2 +- 2 files changed, 22 insertions(+), 1 deletions(-) diff --git a/dlls/inetcpl.cpl/inetcpl.c b/dlls/inetcpl.cpl/inetcpl.c index 03b6282..49cd892 100644 --- a/dlls/inetcpl.cpl/inetcpl.c +++ b/dlls/inetcpl.cpl/inetcpl.c @@ -162,3 +162,24 @@ LONG CALLBACK CPlApplet(HWND hWnd, UINT command, LPARAM lParam1, LPARAM lParam2) return FALSE; } + +/********************************************************************* + * LaunchInternetControlPanel (inetcpl.@) + * + * Launch the Internet Control Panel dialog + * + * PARAMS + * parent [I] Handle for the parent window + * + * RETURNS + * Success: TRUE + * + * NOTES + * rundll32 callable function: rundll32 inetcpl.cpl,LaunchInternetControlPanel + * + */ +BOOL WINAPI LaunchInternetControlPanel(HWND parent) +{ + display_cpl_sheets(parent); + return TRUE; +} diff --git a/dlls/inetcpl.cpl/inetcpl.cpl.spec b/dlls/inetcpl.cpl/inetcpl.cpl.spec index 21cb34b..eaf5e4d 100644 --- a/dlls/inetcpl.cpl/inetcpl.cpl.spec +++ b/dlls/inetcpl.cpl/inetcpl.cpl.spec @@ -8,7 +8,7 @@ @ stub ImportExportPFX @ stub LaunchAddSitesDialog @ stub LaunchConnectionDialog -@ stub LaunchInternetControlPanel +@ stdcall LaunchInternetControlPanel(long) @ stub LaunchPerSitePrivacyActionDialog @ stub LaunchPopupWindowManagementDialog @ stub LaunchPrivacyDialog
1
0
0
0
Detlef Riekenberg : inetcpl: Update German translation.
by Alexandre Julliard
01 Oct '10
01 Oct '10
Module: wine Branch: master Commit: 6d9e5162d6f1ddf8e6d22fbb02afa6a330649064 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6d9e5162d6f1ddf8e6d22fbb0…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Fri Oct 1 13:16:39 2010 +0200 inetcpl: Update German translation. --- dlls/inetcpl.cpl/cpl_De.rc | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/dlls/inetcpl.cpl/cpl_De.rc b/dlls/inetcpl.cpl/cpl_De.rc index ecc2761..549776f 100644 --- a/dlls/inetcpl.cpl/cpl_De.rc +++ b/dlls/inetcpl.cpl/cpl_De.rc @@ -31,6 +31,24 @@ BEGIN IDS_CPL_INFO "Wine Internet Browser und zugehörige Einstellungen anpassen." END +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "Allgemein" +BEGIN + + GROUPBOX " Startseite ", IDC_STATIC, 4, 4, 312, 52 + LTEXT "Sie können eine Addresse wählen, die als Startseite verwendet wird.", + IDC_STATIC, 58, 10, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "A&ktuelle Seite", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "&Standardseite", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "&Leere Seite", IDC_HOME_BLANK, 230, 36, 80, 14 + +END + + /* "Content" propsheet */ IDD_CONTENT DIALOG 0, 0, 320, 220 STYLE WS_CAPTION | WS_CHILD | WS_DISABLED
1
0
0
0
Detlef Riekenberg : inetcpl: Add general propsheet and allow to set the homepage.
by Alexandre Julliard
01 Oct '10
01 Oct '10
Module: wine Branch: master Commit: e859230ee40c60b45cade3934757cbc0363a3416 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e859230ee40c60b45cade3934…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Fri Oct 1 13:19:03 2010 +0200 inetcpl: Add general propsheet and allow to set the homepage. --- dlls/inetcpl.cpl/Makefile.in | 3 +- dlls/inetcpl.cpl/cpl_En.rc | 17 ++++ dlls/inetcpl.cpl/general.c | 212 ++++++++++++++++++++++++++++++++++++++++++ dlls/inetcpl.cpl/inetcpl.c | 7 +- dlls/inetcpl.cpl/inetcpl.h | 12 +++ 5 files changed, 249 insertions(+), 2 deletions(-) diff --git a/dlls/inetcpl.cpl/Makefile.in b/dlls/inetcpl.cpl/Makefile.in index 12eb694..565e54e 100644 --- a/dlls/inetcpl.cpl/Makefile.in +++ b/dlls/inetcpl.cpl/Makefile.in @@ -1,9 +1,10 @@ MODULE = inetcpl.cpl -IMPORTS = comctl32 user32 +IMPORTS = comctl32 shlwapi user32 advapi32 DELAYIMPORTS = cryptui C_SRCS = \ content.c \ + general.c \ inetcpl.c RC_SRCS = \ diff --git a/dlls/inetcpl.cpl/cpl_En.rc b/dlls/inetcpl.cpl/cpl_En.rc index f463df7..769ec60 100644 --- a/dlls/inetcpl.cpl/cpl_En.rc +++ b/dlls/inetcpl.cpl/cpl_En.rc @@ -29,6 +29,23 @@ BEGIN IDS_CPL_INFO "Configure Wine Internet Browser and related settings" END +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "General" +BEGIN + + GROUPBOX " Home page ", IDC_STATIC, 4, 4, 312, 52 + LTEXT "You can choose the address that will be used as your home page.", + IDC_STATIC, 58, 10, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "&Current page", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "&Default page", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "&Blank page", IDC_HOME_BLANK, 230, 36, 80, 14 + +END + /* "Content" propsheet */ IDD_CONTENT DIALOG 0, 0, 320, 220 STYLE WS_CAPTION | WS_CHILD | WS_DISABLED diff --git a/dlls/inetcpl.cpl/general.c b/dlls/inetcpl.cpl/general.c new file mode 100644 index 0000000..0825897 --- /dev/null +++ b/dlls/inetcpl.cpl/general.c @@ -0,0 +1,212 @@ +/* + * Internet control panel applet: general propsheet + * + * Copyright 2010 Detlef Riekenberg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#define NONAMELESSUNION + +#include <stdarg.h> +#include <windef.h> +#include <winbase.h> +#include <winuser.h> +#include <wininet.h> +#include <winreg.h> +#include <shlwapi.h> +#include <prsht.h> + +#include "inetcpl.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(inetcpl); + +static const WCHAR about_blank[] = {'a','b','o','u','t',':','b','l','a','n','k',0}; +static const WCHAR start_page[] = {'S','t','a','r','t',' ','P','a','g','e',0}; +static const WCHAR reg_ie_main[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','\\', + 'M','a','i','n',0}; + +/* list of unimplemented buttons */ +static DWORD disable_me[] = {IDC_HOME_CURRENT, + IDC_HOME_DEFAULT, 0}; + +/********************************************************************* + * parse_url_from_outside [internal] + * + * Filter an URL, add a usable scheme, when needed + * + */ +static DWORD parse_url_from_outside(LPCWSTR url, LPWSTR out, DWORD maxlen) +{ + HMODULE hdll; + DWORD (WINAPI *pParseURLFromOutsideSourceW)(LPCWSTR, LPWSTR, LPDWORD, LPDWORD); + DWORD res; + + hdll = LoadLibraryA("shdocvw.dll"); + pParseURLFromOutsideSourceW = (void *) GetProcAddress(hdll, (LPSTR) 170); + + if (pParseURLFromOutsideSourceW) + { + res = pParseURLFromOutsideSourceW(url, out, &maxlen, NULL); + FreeLibrary(hdll); + return res; + } + + ERR("failed to get ordinal 170: %d\n", GetLastError()); + FreeLibrary(hdll); + return 0; +} + +/********************************************************************* + * general_on_command [internal] + * + * handle WM_COMMAND + * + */ +static INT_PTR general_on_command(HWND hwnd, WPARAM wparam) +{ + + switch (wparam) + { + case MAKEWPARAM(IDC_HOME_EDIT, EN_CHANGE): + /* enable apply button */ + SendMessageW(GetParent(hwnd), PSM_CHANGED, (WPARAM)hwnd, 0); + break; + + case MAKEWPARAM(IDC_HOME_BLANK, BN_CLICKED): + SetDlgItemTextW(hwnd, IDC_HOME_EDIT, about_blank); + break; + + default: + TRACE("not implemented for command: %d/%d\n", HIWORD(wparam), LOWORD(wparam)); + return FALSE; + } + return TRUE; +} + +/********************************************************************* + * general_on_initdialog [internal] + * + * handle WM_INITDIALOG + * + */ +static VOID general_on_initdialog(HWND hwnd) +{ + WCHAR buffer[INTERNET_MAX_URL_LENGTH]; + DWORD len; + DWORD type; + LONG res; + DWORD *ptr = disable_me; + + /* disable unimplemented buttons */ + while (*ptr) + { + EnableWindow(GetDlgItem(hwnd, *ptr), FALSE); + ptr++; + } + + /* read current homepage from the registry. Try HCU first, then HKLM */ + *buffer = 0; + len = sizeof(buffer); + type = REG_SZ; + res = SHRegGetUSValueW(reg_ie_main, start_page, &type, buffer, &len, FALSE, (LPBYTE) about_blank, sizeof(about_blank)); + + if (!res && (type == REG_SZ)) + { + SetDlgItemTextW(hwnd, IDC_HOME_EDIT, buffer); + } +} + +/********************************************************************* + * general_on_notify [internal] + * + * handle WM_NOTIFY + * + */ +static INT_PTR general_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam) +{ + PSHNOTIFY *psn; + WCHAR buffer[INTERNET_MAX_URL_LENGTH]; + WCHAR parsed[INTERNET_MAX_URL_LENGTH]; + LONG res; + + psn = (PSHNOTIFY *) lparam; + TRACE("WM_NOTIFY (%p, 0x%lx, 0x%lx) from %p with code: %d\n", hwnd, wparam, lparam, + psn->hdr.hwndFrom, psn->hdr.code); + + if (psn->hdr.code == PSN_APPLY) + { + *buffer = 0; + GetDlgItemTextW(hwnd, IDC_HOME_EDIT, buffer, sizeof(buffer)/sizeof(WCHAR)); + TRACE("EDITTEXT has %s\n", debugstr_w(buffer)); + + res = parse_url_from_outside(buffer, parsed, sizeof(parsed)/sizeof(WCHAR)); + TRACE("got %d with %s\n", res, debugstr_w(parsed)); + + if (res) + { + HKEY hkey; + + /* update the dialog, when needed */ + if (lstrcmpW(buffer, parsed)) + SetDlgItemTextW(hwnd, IDC_HOME_EDIT, parsed); + + /* update the registry */ + res = RegOpenKeyW(HKEY_CURRENT_USER, reg_ie_main, &hkey); + if (!res) + { + res = RegSetValueExW(hkey, start_page, 0, REG_SZ, (const BYTE *)parsed, + (lstrlenW(parsed) + 1) * sizeof(WCHAR)); + RegCloseKey(hkey); + return !res; + } + } + } + return FALSE; +} + +/********************************************************************* + * general_dlgproc [internal] + * + */ +INT_PTR CALLBACK general_dlgproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) +{ + + switch (msg) + { + case WM_INITDIALOG: + general_on_initdialog(hwnd); + return TRUE; + + case WM_COMMAND: + return general_on_command(hwnd, wparam); + + case WM_NOTIFY: + return general_on_notify(hwnd, wparam, lparam); + + default: + /* do not flood the log */ + if ((msg == WM_SETCURSOR) || (msg == WM_NCHITTEST) || (msg == WM_MOUSEMOVE)) + return FALSE; + + TRACE("(%p, 0x%08x/%d, 0x%lx, 0x%lx)\n", hwnd, msg, msg, wparam, lparam); + + } + return FALSE; +} diff --git a/dlls/inetcpl.cpl/inetcpl.c b/dlls/inetcpl.cpl/inetcpl.c index 80decfb..03b6282 100644 --- a/dlls/inetcpl.cpl/inetcpl.c +++ b/dlls/inetcpl.cpl/inetcpl.c @@ -27,7 +27,6 @@ #include <wingdi.h> #include <winuser.h> #include <commctrl.h> -#include <commdlg.h> #include <cpl.h> #include "wine/debug.h" @@ -93,6 +92,12 @@ static void display_cpl_sheets(HWND parent) /* Fill out all PROPSHEETPAGE */ psp[id].dwSize = sizeof (PROPSHEETPAGEW); psp[id].hInstance = hcpl; + psp[id].u.pszTemplate = MAKEINTRESOURCEW(IDD_GENERAL); + psp[id].pfnDlgProc = general_dlgproc; + id++; + + psp[id].dwSize = sizeof (PROPSHEETPAGEW); + psp[id].hInstance = hcpl; psp[id].u.pszTemplate = MAKEINTRESOURCEW(IDD_CONTENT); psp[id].pfnDlgProc = content_dlgproc; id++; diff --git a/dlls/inetcpl.cpl/inetcpl.h b/dlls/inetcpl.cpl/inetcpl.h index e1477ff..cee9d4f 100644 --- a/dlls/inetcpl.cpl/inetcpl.h +++ b/dlls/inetcpl.cpl/inetcpl.h @@ -19,12 +19,16 @@ * */ +#ifndef __WINE_INETCPL__ +#define __WINE_INETCPL__ + #include <windef.h> #include <winuser.h> extern HMODULE hcpl; INT_PTR CALLBACK content_dlgproc(HWND, UINT, WPARAM, LPARAM) DECLSPEC_HIDDEN; +INT_PTR CALLBACK general_dlgproc(HWND, UINT, WPARAM, LPARAM) DECLSPEC_HIDDEN; #define NUM_PROPERTY_PAGES 8 @@ -38,6 +42,14 @@ INT_PTR CALLBACK content_dlgproc(HWND, UINT, WPARAM, LPARAM) DECLSPEC_HIDDEN; /* dialogs */ #define IDC_STATIC -1 +#define IDD_GENERAL 1000 +#define IDC_HOME_EDIT 1000 +#define IDC_HOME_CURRENT 1001 +#define IDC_HOME_DEFAULT 1002 +#define IDC_HOME_BLANK 1003 + #define IDD_CONTENT 4000 #define IDC_CERT 4100 #define IDC_CERT_PUBLISHER 4101 + +#endif
1
0
0
0
Juan Lang : wininet: Secure flag is set in the request, not in the session.
by Alexandre Julliard
01 Oct '10
01 Oct '10
Module: wine Branch: master Commit: 80545ef966a39b4164d61d72ced4b962dd797d53 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=80545ef966a39b4164d61d72c…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Sep 30 17:11:56 2010 -0700 wininet: Secure flag is set in the request, not in the session. --- dlls/wininet/http.c | 3 +-- dlls/wininet/tests/http.c | 2 -- 2 files changed, 1 insertions(+), 4 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 98765d9..76cf41c 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1690,7 +1690,6 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe case INTERNET_OPTION_SECURITY_FLAGS: { - http_session_t *lpwhs = req->lpHttpSession; DWORD flags; int bits; @@ -1699,7 +1698,7 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe *size = sizeof(DWORD); flags = 0; - if (lpwhs->hdr.dwFlags & INTERNET_FLAG_SECURE) + if (req->hdr.dwFlags & INTERNET_FLAG_SECURE) flags |= SECURITY_FLAG_SECURE; flags |= req->netConnection.security_flags; bits = NETCON_GetCipherStrength(&req->netConnection); diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 1236d30..d942ca4 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -2598,7 +2598,6 @@ static void test_secure_connection(void) size = sizeof(flags); ret = InternetQueryOption(req, INTERNET_OPTION_SECURITY_FLAGS, &flags, &size); ok(ret, "InternetQueryOption failed: %d\n", GetLastError()); - todo_wine ok(flags & SECURITY_FLAG_SECURE, "expected secure flag to be set\n"); ret = InternetQueryOptionA(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT, @@ -2679,7 +2678,6 @@ static void test_secure_connection(void) size = sizeof(flags); ret = InternetQueryOption(req, INTERNET_OPTION_SECURITY_FLAGS, &flags, &size); ok(ret, "InternetQueryOption failed: %d\n", GetLastError()); - todo_wine ok(flags & SECURITY_FLAG_SECURE, "expected secure flag to be set\n"); ret = InternetQueryOptionA(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT,
1
0
0
0
Juan Lang : wininet: Set cipher strength bits when querying INTERNET_OPTION_SECURITY_FLAGS.
by Alexandre Julliard
01 Oct '10
01 Oct '10
Module: wine Branch: master Commit: 948173b7f4604a831a44fe2e8c760e98c4b1595c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=948173b7f4604a831a44fe2e8…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Sep 30 13:33:47 2010 -0700 wininet: Set cipher strength bits when querying INTERNET_OPTION_SECURITY_FLAGS. --- dlls/wininet/http.c | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index a15977a..98765d9 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1690,19 +1690,26 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe case INTERNET_OPTION_SECURITY_FLAGS: { - http_session_t *lpwhs; - lpwhs = req->lpHttpSession; + http_session_t *lpwhs = req->lpHttpSession; + DWORD flags; + int bits; if (*size < sizeof(ULONG)) return ERROR_INSUFFICIENT_BUFFER; *size = sizeof(DWORD); + flags = 0; if (lpwhs->hdr.dwFlags & INTERNET_FLAG_SECURE) - *(DWORD*)buffer = SECURITY_FLAG_SECURE; + flags |= SECURITY_FLAG_SECURE; + flags |= req->netConnection.security_flags; + bits = NETCON_GetCipherStrength(&req->netConnection); + if (bits >= 128) + flags |= SECURITY_FLAG_STRENGTH_STRONG; + else if (bits >= 56) + flags |= SECURITY_FLAG_STRENGTH_MEDIUM; else - *(DWORD*)buffer = 0; - *(DWORD *)buffer |= req->netConnection.security_flags; - /* FIXME: set connection cipher strength (SECURITY_FLAG_STRENGTH_*) */ + flags |= SECURITY_FLAG_STRENGTH_WEAK; + *(DWORD *)buffer = flags; return ERROR_SUCCESS; }
1
0
0
0
Juan Lang : wininet: Support querying the cipher strength of an SSL connection.
by Alexandre Julliard
01 Oct '10
01 Oct '10
Module: wine Branch: master Commit: 887aeb6a097b73165658e00313eeec8728022d8e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=887aeb6a097b73165658e0031…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Sep 30 13:18:07 2010 -0700 wininet: Support querying the cipher strength of an SSL connection. --- dlls/wininet/http.c | 1 + dlls/wininet/internet.h | 1 + dlls/wininet/netconnection.c | 22 ++++++++++++++++++++++ dlls/wininet/tests/http.c | 4 ---- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 992a827..a15977a 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1847,6 +1847,7 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe CertNameToStrA(context->dwCertEncodingType, &context->pCertInfo->Issuer, CERT_SIMPLE_NAME_STR, info->lpszIssuerInfo, len); + info->dwKeySize = NETCON_GetCipherStrength(&req->netConnection); CertFreeCertificateContext(context); return ERROR_SUCCESS; } diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index 109179f..86b16bd 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -460,6 +460,7 @@ DWORD NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int int *recvd /* out */); BOOL NETCON_query_data_available(WININET_NETCONNECTION *connection, DWORD *available); LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection); +int NETCON_GetCipherStrength(WININET_NETCONNECTION *connection); DWORD NETCON_set_timeout(WININET_NETCONNECTION *connection, BOOL send, int value); int sock_get_error(int); diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index 004b213..a1c3090 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -150,6 +150,8 @@ MAKE_FUNCPTR(SSL_CTX_get_timeout); MAKE_FUNCPTR(SSL_CTX_set_timeout); MAKE_FUNCPTR(SSL_CTX_set_default_verify_paths); MAKE_FUNCPTR(SSL_CTX_set_verify); +MAKE_FUNCPTR(SSL_get_current_cipher); +MAKE_FUNCPTR(SSL_CIPHER_get_bits); MAKE_FUNCPTR(X509_STORE_CTX_get_ex_data); /* OpenSSL's libcrypto functions that we use */ @@ -427,6 +429,8 @@ DWORD NETCON_init(WININET_NETCONNECTION *connection, BOOL useSSL) DYNSSL(SSL_CTX_set_timeout); DYNSSL(SSL_CTX_set_default_verify_paths); DYNSSL(SSL_CTX_set_verify); + DYNSSL(SSL_get_current_cipher); + DYNSSL(SSL_CIPHER_get_bits); DYNSSL(X509_STORE_CTX_get_ex_data); #undef DYNSSL @@ -868,6 +872,24 @@ LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection) #endif } +int NETCON_GetCipherStrength(WININET_NETCONNECTION *connection) +{ +#ifdef SONAME_LIBSSL + SSL_CIPHER *cipher; + int bits = 0; + + if (!connection->useSSL) + return 0; + cipher = pSSL_get_current_cipher(connection->ssl_s); + if (!cipher) + return 0; + pSSL_CIPHER_get_bits(cipher, &bits); + return bits; +#else + return 0; +#endif +} + DWORD NETCON_set_timeout(WININET_NETCONNECTION *connection, BOOL send, int value) { int result; diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index d06cdf2..1236d30 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -2622,7 +2622,6 @@ static void test_secure_connection(void) "unexpected encryption algorithm name\n"); ok(!certificate_structA->lpszProtocolName, "unexpected protocol name\n"); - todo_wine ok(certificate_structA->dwKeySize, "expected a non-zero key size\n"); } HeapFree(GetProcessHeap(), 0, certificate_structA); @@ -2653,7 +2652,6 @@ static void test_secure_connection(void) "unexpected encryption algorithm name\n"); ok(!certificate_structA->lpszProtocolName, "unexpected protocol name\n"); - todo_wine ok(certificate_structA->dwKeySize, "expected a non-zero key size\n"); } HeapFree(GetProcessHeap(), 0, certificate_structW); @@ -2705,7 +2703,6 @@ static void test_secure_connection(void) "unexpected encryption algorithm name\n"); ok(!certificate_structA->lpszProtocolName, "unexpected protocol name\n"); - todo_wine ok(certificate_structA->dwKeySize, "expected a non-zero key size\n"); } HeapFree(GetProcessHeap(), 0, certificate_structA); @@ -2736,7 +2733,6 @@ static void test_secure_connection(void) "unexpected encryption algorithm name\n"); ok(!certificate_structA->lpszProtocolName, "unexpected protocol name\n"); - todo_wine ok(certificate_structA->dwKeySize, "expected a non-zero key size\n"); } HeapFree(GetProcessHeap(), 0, certificate_structW);
1
0
0
0
Juan Lang : wininet: Returned certificate strings are always ASCII.
by Alexandre Julliard
01 Oct '10
01 Oct '10
Module: wine Branch: master Commit: 56ebc04ab6fcda86b60697e6a8bc2119d804536c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=56ebc04ab6fcda86b60697e6a…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Sep 30 13:09:04 2010 -0700 wininet: Returned certificate strings are always ASCII. --- dlls/wininet/http.c | 61 ++++++++++++-------------------------------- dlls/wininet/tests/http.c | 4 --- 2 files changed, 17 insertions(+), 48 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 2266fcd..992a827 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1820,60 +1820,33 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe case INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT: { PCCERT_CONTEXT context; - if(*size < sizeof(INTERNET_CERTIFICATE_INFOW)) { - *size = sizeof(INTERNET_CERTIFICATE_INFOW); + if(*size < sizeof(INTERNET_CERTIFICATE_INFOA)) { + *size = sizeof(INTERNET_CERTIFICATE_INFOA); return ERROR_INSUFFICIENT_BUFFER; } context = (PCCERT_CONTEXT)NETCON_GetCert(&(req->netConnection)); if(context) { - INTERNET_CERTIFICATE_INFOW *info = (INTERNET_CERTIFICATE_INFOW*)buffer; + INTERNET_CERTIFICATE_INFOA *info = (INTERNET_CERTIFICATE_INFOA*)buffer; DWORD len; memset(info, 0, sizeof(INTERNET_CERTIFICATE_INFOW)); info->ftExpiry = context->pCertInfo->NotAfter; info->ftStart = context->pCertInfo->NotBefore; - if(unicode) { - len = CertNameToStrW(context->dwCertEncodingType, - &context->pCertInfo->Subject, CERT_SIMPLE_NAME_STR, NULL, 0); - info->lpszSubjectInfo = LocalAlloc(0, len*sizeof(WCHAR)); - if(info->lpszSubjectInfo) - CertNameToStrW(context->dwCertEncodingType, - &context->pCertInfo->Subject, CERT_SIMPLE_NAME_STR, - info->lpszSubjectInfo, len); - len = CertNameToStrW(context->dwCertEncodingType, - &context->pCertInfo->Issuer, CERT_SIMPLE_NAME_STR, NULL, 0); - info->lpszIssuerInfo = LocalAlloc(0, len*sizeof(WCHAR)); - if (info->lpszIssuerInfo) - CertNameToStrW(context->dwCertEncodingType, - &context->pCertInfo->Issuer, CERT_SIMPLE_NAME_STR, - info->lpszIssuerInfo, len); - }else { - INTERNET_CERTIFICATE_INFOA *infoA = (INTERNET_CERTIFICATE_INFOA*)info; - - len = CertNameToStrA(context->dwCertEncodingType, - &context->pCertInfo->Subject, CERT_SIMPLE_NAME_STR, NULL, 0); - infoA->lpszSubjectInfo = LocalAlloc(0, len); - if(infoA->lpszSubjectInfo) - CertNameToStrA(context->dwCertEncodingType, - &context->pCertInfo->Subject, CERT_SIMPLE_NAME_STR, - infoA->lpszSubjectInfo, len); - len = CertNameToStrA(context->dwCertEncodingType, - &context->pCertInfo->Issuer, CERT_SIMPLE_NAME_STR, NULL, 0); - infoA->lpszIssuerInfo = LocalAlloc(0, len); - if(infoA->lpszIssuerInfo) - CertNameToStrA(context->dwCertEncodingType, - &context->pCertInfo->Issuer, CERT_SIMPLE_NAME_STR, - infoA->lpszIssuerInfo, len); - } - - /* - * Contrary to MSDN, these do not appear to be set. - * lpszProtocolName - * lpszSignatureAlgName - * lpszEncryptionAlgName - * dwKeySize - */ + len = CertNameToStrA(context->dwCertEncodingType, + &context->pCertInfo->Subject, CERT_SIMPLE_NAME_STR, NULL, 0); + info->lpszSubjectInfo = LocalAlloc(0, len); + if(info->lpszSubjectInfo) + CertNameToStrA(context->dwCertEncodingType, + &context->pCertInfo->Subject, CERT_SIMPLE_NAME_STR, + info->lpszSubjectInfo, len); + len = CertNameToStrA(context->dwCertEncodingType, + &context->pCertInfo->Issuer, CERT_SIMPLE_NAME_STR, NULL, 0); + info->lpszIssuerInfo = LocalAlloc(0, len); + if(info->lpszIssuerInfo) + CertNameToStrA(context->dwCertEncodingType, + &context->pCertInfo->Issuer, CERT_SIMPLE_NAME_STR, + info->lpszIssuerInfo, len); CertFreeCertificateContext(context); return ERROR_SUCCESS; } diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 0637057..d06cdf2 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -2693,11 +2693,9 @@ static void test_secure_connection(void) ok(ret, "InternetQueryOption failed: %d\n", GetLastError()); if (ret) { - todo_wine ok(certificate_structA->lpszSubjectInfo && strlen(certificate_structA->lpszSubjectInfo) > 1, "expected a non-empty subject name\n"); - todo_wine ok(certificate_structA->lpszIssuerInfo && strlen(certificate_structA->lpszIssuerInfo) > 1, "expected a non-empty issuer name\n"); @@ -2726,11 +2724,9 @@ static void test_secure_connection(void) ok(ret, "InternetQueryOption failed: %d\n", GetLastError()); if (ret) { - todo_wine ok(certificate_structA->lpszSubjectInfo && strlen(certificate_structA->lpszSubjectInfo) > 1, "expected a non-empty subject name\n"); - todo_wine ok(certificate_structA->lpszIssuerInfo && strlen(certificate_structA->lpszIssuerInfo) > 1, "expected a non-empty issuer name\n");
1
0
0
0
Juan Lang : wininet: Add some secure connection tests.
by Alexandre Julliard
01 Oct '10
01 Oct '10
Module: wine Branch: master Commit: 86732e04d808d439629bbe8b04f3fa2c3ae1abff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=86732e04d808d439629bbe8b0…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Sep 30 09:53:47 2010 -0700 wininet: Add some secure connection tests. --- dlls/wininet/tests/http.c | 183 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 183 insertions(+), 0 deletions(-) diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 93b3877..0637057 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -2568,6 +2568,188 @@ static void test_http_connection(void) CloseHandle(hThread); } +static void test_secure_connection(void) +{ + static const WCHAR gizmo5[] = {'G','i','z','m','o','5',0}; + static const WCHAR testbot[] = {'t','e','s','t','b','o','t','.','w','i','n','e','h','q','.','o','r','g',0}; + static const WCHAR get[] = {'G','E','T',0}; + static const WCHAR slash[] = {'/',0}; + HINTERNET ses, con, req; + DWORD size, flags; + INTERNET_CERTIFICATE_INFOA *certificate_structA = NULL; + INTERNET_CERTIFICATE_INFOW *certificate_structW = NULL; + BOOL ret; + + ses = InternetOpen("Gizmo5", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); + ok(ses != NULL, "InternetOpen failed\n"); + + con = InternetConnect(ses, "
testbot.winehq.org
", + INTERNET_DEFAULT_HTTPS_PORT, NULL, NULL, + INTERNET_SERVICE_HTTP, 0, 0); + ok(con != NULL, "InternetConnect failed\n"); + + req = HttpOpenRequest(con, "GET", "/", NULL, NULL, NULL, + INTERNET_FLAG_SECURE, 0); + ok(req != NULL, "HttpOpenRequest failed\n"); + + ret = HttpSendRequest(req, NULL, 0, NULL, 0); + ok(ret, "HttpSendRequest failed: %d\n", GetLastError()); + + size = sizeof(flags); + ret = InternetQueryOption(req, INTERNET_OPTION_SECURITY_FLAGS, &flags, &size); + ok(ret, "InternetQueryOption failed: %d\n", GetLastError()); + todo_wine + ok(flags & SECURITY_FLAG_SECURE, "expected secure flag to be set\n"); + + ret = InternetQueryOptionA(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT, + NULL, &size); + ok(ret || GetLastError() == ERROR_INSUFFICIENT_BUFFER, "InternetQueryOption failed: %d\n", GetLastError()); + certificate_structA = HeapAlloc(GetProcessHeap(), 0, size); + ret = InternetQueryOption(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT, + certificate_structA, &size); + ok(ret, "InternetQueryOption failed: %d\n", GetLastError()); + if (ret) + { + ok(certificate_structA->lpszSubjectInfo && + strlen(certificate_structA->lpszSubjectInfo) > 1, + "expected a non-empty subject name\n"); + ok(certificate_structA->lpszIssuerInfo && + strlen(certificate_structA->lpszIssuerInfo) > 1, + "expected a non-empty issuer name\n"); + ok(!certificate_structA->lpszSignatureAlgName, + "unexpected signature algorithm name\n"); + ok(!certificate_structA->lpszEncryptionAlgName, + "unexpected encryption algorithm name\n"); + ok(!certificate_structA->lpszProtocolName, + "unexpected protocol name\n"); + todo_wine + ok(certificate_structA->dwKeySize, "expected a non-zero key size\n"); + } + HeapFree(GetProcessHeap(), 0, certificate_structA); + + /* Querying the same option through InternetQueryOptionW still results in + * ASCII strings being returned. + */ + size = 0; + ret = InternetQueryOptionW(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT, + NULL, &size); + ok(ret || GetLastError() == ERROR_INSUFFICIENT_BUFFER, "InternetQueryOption failed: %d\n", GetLastError()); + certificate_structW = HeapAlloc(GetProcessHeap(), 0, size); + ret = InternetQueryOption(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT, + certificate_structW, &size); + certificate_structA = (INTERNET_CERTIFICATE_INFOA *)certificate_structW; + ok(ret, "InternetQueryOption failed: %d\n", GetLastError()); + if (ret) + { + ok(certificate_structA->lpszSubjectInfo && + strlen(certificate_structA->lpszSubjectInfo) > 1, + "expected a non-empty subject name\n"); + ok(certificate_structA->lpszIssuerInfo && + strlen(certificate_structA->lpszIssuerInfo) > 1, + "expected a non-empty issuer name\n"); + ok(!certificate_structA->lpszSignatureAlgName, + "unexpected signature algorithm name\n"); + ok(!certificate_structA->lpszEncryptionAlgName, + "unexpected encryption algorithm name\n"); + ok(!certificate_structA->lpszProtocolName, + "unexpected protocol name\n"); + todo_wine + ok(certificate_structA->dwKeySize, "expected a non-zero key size\n"); + } + HeapFree(GetProcessHeap(), 0, certificate_structW); + + InternetCloseHandle(req); + InternetCloseHandle(con); + InternetCloseHandle(ses); + + /* Repeating the tests with the W functions has the same result: */ + ses = InternetOpenW(gizmo5, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); + ok(ses != NULL, "InternetOpen failed\n"); + + con = InternetConnectW(ses, testbot, + INTERNET_DEFAULT_HTTPS_PORT, NULL, NULL, + INTERNET_SERVICE_HTTP, 0, 0); + ok(con != NULL, "InternetConnect failed\n"); + + req = HttpOpenRequestW(con, get, slash, NULL, NULL, NULL, + INTERNET_FLAG_SECURE, 0); + ok(req != NULL, "HttpOpenRequest failed\n"); + + ret = HttpSendRequest(req, NULL, 0, NULL, 0); + ok(ret, "HttpSendRequest failed: %d\n", GetLastError()); + + size = sizeof(flags); + ret = InternetQueryOption(req, INTERNET_OPTION_SECURITY_FLAGS, &flags, &size); + ok(ret, "InternetQueryOption failed: %d\n", GetLastError()); + todo_wine + ok(flags & SECURITY_FLAG_SECURE, "expected secure flag to be set\n"); + + ret = InternetQueryOptionA(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT, + NULL, &size); + ok(ret || GetLastError() == ERROR_INSUFFICIENT_BUFFER, "InternetQueryOption failed: %d\n", GetLastError()); + certificate_structA = HeapAlloc(GetProcessHeap(), 0, size); + ret = InternetQueryOptionW(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT, + certificate_structA, &size); + ok(ret, "InternetQueryOption failed: %d\n", GetLastError()); + if (ret) + { + todo_wine + ok(certificate_structA->lpszSubjectInfo && + strlen(certificate_structA->lpszSubjectInfo) > 1, + "expected a non-empty subject name\n"); + todo_wine + ok(certificate_structA->lpszIssuerInfo && + strlen(certificate_structA->lpszIssuerInfo) > 1, + "expected a non-empty issuer name\n"); + ok(!certificate_structA->lpszSignatureAlgName, + "unexpected signature algorithm name\n"); + ok(!certificate_structA->lpszEncryptionAlgName, + "unexpected encryption algorithm name\n"); + ok(!certificate_structA->lpszProtocolName, + "unexpected protocol name\n"); + todo_wine + ok(certificate_structA->dwKeySize, "expected a non-zero key size\n"); + } + HeapFree(GetProcessHeap(), 0, certificate_structA); + + /* Again, querying the same option through InternetQueryOptionW still + * results in ASCII strings being returned. + */ + size = 0; + ret = InternetQueryOptionW(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT, + NULL, &size); + ok(ret || GetLastError() == ERROR_INSUFFICIENT_BUFFER, "InternetQueryOption failed: %d\n", GetLastError()); + certificate_structW = HeapAlloc(GetProcessHeap(), 0, size); + ret = InternetQueryOptionW(req, INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT, + certificate_structW, &size); + certificate_structA = (INTERNET_CERTIFICATE_INFOA *)certificate_structW; + ok(ret, "InternetQueryOption failed: %d\n", GetLastError()); + if (ret) + { + todo_wine + ok(certificate_structA->lpszSubjectInfo && + strlen(certificate_structA->lpszSubjectInfo) > 1, + "expected a non-empty subject name\n"); + todo_wine + ok(certificate_structA->lpszIssuerInfo && + strlen(certificate_structA->lpszIssuerInfo) > 1, + "expected a non-empty issuer name\n"); + ok(!certificate_structA->lpszSignatureAlgName, + "unexpected signature algorithm name\n"); + ok(!certificate_structA->lpszEncryptionAlgName, + "unexpected encryption algorithm name\n"); + ok(!certificate_structA->lpszProtocolName, + "unexpected protocol name\n"); + todo_wine + ok(certificate_structA->dwKeySize, "expected a non-zero key size\n"); + } + HeapFree(GetProcessHeap(), 0, certificate_structW); + + InternetCloseHandle(req); + InternetCloseHandle(con); + InternetCloseHandle(ses); +} + static void test_user_agent_header(void) { HINTERNET ses, con, req; @@ -3000,6 +3182,7 @@ START_TEST(http) InternetOpenUrlA_test(); HttpHeaders_test(); test_http_connection(); + test_secure_connection(); test_user_agent_header(); test_bogus_accept_types_array(); InternetReadFile_chunked_test();
1
0
0
0
← Newer
1
...
110
111
112
113
114
115
116
117
118
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Results per page:
10
25
50
100
200