Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
540a56a6
Commit
540a56a6
authored
Jan 16, 2011
by
Thomas Mullaly
Committed by
Alexandre Julliard
Jan 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added basic CoInternetGetSecurityUrlEx implementation.
parent
312bfb10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
12 deletions
+42
-12
sec_mgr.c
dlls/urlmon/sec_mgr.c
+31
-2
sec_mgr.c
dlls/urlmon/tests/sec_mgr.c
+11
-10
No files found.
dlls/urlmon/sec_mgr.c
View file @
540a56a6
...
@@ -26,6 +26,9 @@
...
@@ -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
...
@@ -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
;
}
}
dlls/urlmon/tests/sec_mgr.c
View file @
540a56a6
...
@@ -719,16 +719,17 @@ static const struct {
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment