urlmon: Added basic CoInternetGetSecurityUrlEx implementation.
This commit is contained in:
parent
312bfb1042
commit
540a56a66e
|
@ -26,6 +26,9 @@
|
||||||
#include "winreg.h"
|
#include "winreg.h"
|
||||||
#include "wininet.h"
|
#include "wininet.h"
|
||||||
|
|
||||||
|
#define NO_SHLWAPI_REG
|
||||||
|
#include "shlwapi.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
|
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
|
||||||
|
@ -1332,11 +1335,37 @@ HRESULT WINAPI CoInternetGetSecurityUrl(LPCWSTR pwzUrl, LPWSTR *ppwzSecUrl, PSUA
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI CoInternetGetSecurityUrlEx(IUri *pUri, IUri **ppSecUri, PSUACTION psuAction, DWORD_PTR dwReserved)
|
HRESULT WINAPI CoInternetGetSecurityUrlEx(IUri *pUri, IUri **ppSecUri, PSUACTION psuAction, DWORD_PTR dwReserved)
|
||||||
{
|
{
|
||||||
|
HRESULT hres;
|
||||||
|
BSTR secure_uri;
|
||||||
|
URL_SCHEME scheme_type;
|
||||||
|
|
||||||
TRACE("(%p,%p,%u,%u)\n", pUri, ppSecUri, psuAction, (DWORD)dwReserved);
|
TRACE("(%p,%p,%u,%u)\n", pUri, ppSecUri, psuAction, (DWORD)dwReserved);
|
||||||
|
|
||||||
if(!pUri || !ppSecUri)
|
if(!pUri || !ppSecUri)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
FIXME("(%p,%p,%u,%u)\n", pUri, ppSecUri, psuAction, (DWORD)dwReserved);
|
hres = IUri_GetScheme(pUri, (DWORD*)&scheme_type);
|
||||||
return E_NOTIMPL;
|
if(FAILED(hres))
|
||||||
|
return hres;
|
||||||
|
|
||||||
|
hres = IUri_GetDisplayUri(pUri, &secure_uri);
|
||||||
|
if(FAILED(hres))
|
||||||
|
return hres;
|
||||||
|
|
||||||
|
/* File URIs have to hierarchical. */
|
||||||
|
if(scheme_type == URL_SCHEME_FILE) {
|
||||||
|
const WCHAR *tmp = secure_uri;
|
||||||
|
|
||||||
|
/* Check and see if a "//" is after the scheme name. */
|
||||||
|
tmp += sizeof(fileW)/sizeof(WCHAR);
|
||||||
|
if(*tmp != '/' || *(tmp+1) != '/') {
|
||||||
|
SysFreeString(secure_uri);
|
||||||
|
return E_INVALIDARG;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hres = CreateUri(secure_uri, Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME, 0, ppSecUri);
|
||||||
|
SysFreeString(secure_uri);
|
||||||
|
|
||||||
|
return hres;
|
||||||
}
|
}
|
||||||
|
|
|
@ -719,16 +719,17 @@ static const struct {
|
||||||
HRESULT default_hres;
|
HRESULT default_hres;
|
||||||
BOOL todo;
|
BOOL todo;
|
||||||
} sec_url_ex_tests[] = {
|
} sec_url_ex_tests[] = {
|
||||||
{"index.htm",Uri_CREATE_ALLOW_RELATIVE,"*:index.html",S_OK,"*:index.htm",S_OK,TRUE},
|
{"index.htm",Uri_CREATE_ALLOW_RELATIVE,"*:index.html",S_OK,"*:index.htm",S_OK},
|
||||||
{"file://c:\\Index.htm",Uri_CREATE_FILE_USE_DOS_PATH,"file:///c:/Index.htm",S_OK,"file:///c:/Index.htm",S_OK,TRUE},
|
{"file://c:\\Index.htm",Uri_CREATE_FILE_USE_DOS_PATH,"file:///c:/Index.htm",S_OK,"file:///c:/Index.htm",S_OK},
|
||||||
{"file:some%20file%2ejpg",0,NULL,E_INVALIDARG,NULL,E_INVALIDARG,TRUE},
|
{"file:some%20file%2ejpg",0,NULL,E_INVALIDARG,NULL,E_INVALIDARG},
|
||||||
{"http://www.zone3.winetest/",0,"http://www.zone3.winetest/",S_OK,"http://www.zone3.winetest/",S_OK,TRUE},
|
{"file:some file.jpg",0,NULL,E_INVALIDARG,NULL,E_INVALIDARG},
|
||||||
{"about:blank",0,"about:blank",S_OK,"about:blank",S_OK,TRUE},
|
{"http://www.zone3.winetest/",0,"http://www.zone3.winetest/",S_OK,"http://www.zone3.winetest/",S_OK},
|
||||||
{"ftp://zone3.winetest/file.test",0,"ftp://zone3.winetest/file.test",S_OK,"ftp://zone3.winetest/file.test",S_OK,TRUE},
|
{"about:blank",0,"about:blank",S_OK,"about:blank",S_OK},
|
||||||
{"test:123abc",0,"test:123abc",S_OK,"test:123abc",S_OK,TRUE},
|
{"ftp://zone3.winetest/file.test",0,"ftp://zone3.winetest/file.test",S_OK,"ftp://zone3.winetest/file.test",S_OK},
|
||||||
{"http:google.com/test.file",0,"http:google.com/test.file",S_OK,"http:google.com/test.file",S_OK,TRUE},
|
{"test:123abc",0,"test:123abc",S_OK,"test:123abc",S_OK},
|
||||||
{"ftp://test@ftp.winehq.org/",0,"ftp://ftp.winehq.org/",S_OK,"ftp://ftp.winehq.org/",S_OK,TRUE},
|
{"http:google.com/test.file",0,"http:google.com/test.file",S_OK,"http:google.com/test.file",S_OK},
|
||||||
{"test://google@ftp.winehq.org/",0,"test://google@ftp.winehq.org/",S_OK,"test://google@ftp.winehq.org/",S_OK,TRUE}
|
{"ftp://test@ftp.winehq.org/",0,"ftp://ftp.winehq.org/",S_OK,"ftp://ftp.winehq.org/",S_OK},
|
||||||
|
{"test://google@ftp.winehq.org/",0,"test://google@ftp.winehq.org/",S_OK,"test://google@ftp.winehq.org/",S_OK}
|
||||||
};
|
};
|
||||||
|
|
||||||
static void test_InternetGetSecurityUrlEx(void)
|
static void test_InternetGetSecurityUrlEx(void)
|
||||||
|
|
Loading…
Reference in New Issue