mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-14 20:15:39 +00:00
wininet: Implement ShowX509EncodedCertificate.
This commit is contained in:
parent
8c1f33086e
commit
044f645477
|
@ -2,7 +2,7 @@ EXTRADEFS = -D_WINX32_
|
|||
MODULE = wininet.dll
|
||||
IMPORTLIB = wininet
|
||||
IMPORTS = mpr shlwapi shell32 user32 advapi32
|
||||
DELAYIMPORTS = secur32 crypt32
|
||||
DELAYIMPORTS = secur32 crypt32 cryptui
|
||||
EXTRALIBS = @SOCKETLIBS@ @ZLIB@
|
||||
|
||||
C_SRCS = \
|
||||
|
|
|
@ -65,6 +65,8 @@
|
|||
#include "shlwapi.h"
|
||||
#include "sspi.h"
|
||||
#include "wincrypt.h"
|
||||
#include "winuser.h"
|
||||
#include "cryptuiapi.h"
|
||||
|
||||
#include "internet.h"
|
||||
#include "wine/debug.h"
|
||||
|
@ -6077,6 +6079,24 @@ BOOL WINAPI InternetShowSecurityInfoByURLW(LPCWSTR url, HWND window)
|
|||
*/
|
||||
DWORD WINAPI ShowX509EncodedCertificate(HWND parent, LPBYTE cert, DWORD len)
|
||||
{
|
||||
FIXME("stub: %p %p %u\n", parent, cert, len);
|
||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
||||
PCCERT_CONTEXT certContext = CertCreateCertificateContext(X509_ASN_ENCODING,
|
||||
cert, len);
|
||||
DWORD ret;
|
||||
|
||||
if (certContext)
|
||||
{
|
||||
CRYPTUI_VIEWCERTIFICATE_STRUCTW view;
|
||||
|
||||
memset(&view, 0, sizeof(view));
|
||||
view.hwndParent = parent;
|
||||
view.pCertContext = certContext;
|
||||
if (CryptUIDlgViewCertificateW(&view, NULL))
|
||||
ret = ERROR_SUCCESS;
|
||||
else
|
||||
ret = GetLastError();
|
||||
CertFreeCertificateContext(certContext);
|
||||
}
|
||||
else
|
||||
ret = GetLastError();
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue