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
081f5ae2
Commit
081f5ae2
authored
Oct 22, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptnet: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c7c49ab5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
31 deletions
+12
-31
cryptnet_main.c
dlls/cryptnet/cryptnet_main.c
+12
-31
No files found.
dlls/cryptnet/cryptnet_main.c
View file @
081f5ae2
...
...
@@ -38,8 +38,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(cryptnet);
#define IS_INTOID(x) (((ULONG_PTR)(x) >> 16) == 0)
static
const
WCHAR
cryptNet
[]
=
{
'c'
,
'r'
,
'y'
,
'p'
,
't'
,
'n'
,
'e'
,
't'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
/***********************************************************************
* DllRegisterServer (CRYPTNET.@)
...
...
@@ -48,11 +46,11 @@ HRESULT WINAPI DllRegisterServer(void)
{
TRACE
(
"
\n
"
);
CryptRegisterDefaultOIDFunction
(
X509_ASN_ENCODING
,
CRYPT_OID_VERIFY_REVOCATION_FUNC
,
0
,
cryptNet
);
CRYPT_OID_VERIFY_REVOCATION_FUNC
,
0
,
L"cryptnet.dll"
);
CryptRegisterOIDFunction
(
0
,
CRYPT_OID_OPEN_STORE_PROV_FUNC
,
"Ldap"
,
cryptNet
,
"LdapProvOpenStore"
);
L"cryptnet.dll"
,
"LdapProvOpenStore"
);
CryptRegisterOIDFunction
(
0
,
CRYPT_OID_OPEN_STORE_PROV_FUNC
,
CERT_STORE_PROV_LDAP_W
,
cryptNet
,
"LdapProvOpenStore"
);
CERT_STORE_PROV_LDAP_W
,
L"cryptnet.dll"
,
"LdapProvOpenStore"
);
return
S_OK
;
}
...
...
@@ -63,7 +61,7 @@ HRESULT WINAPI DllUnregisterServer(void)
{
TRACE
(
"
\n
"
);
CryptUnregisterDefaultOIDFunction
(
X509_ASN_ENCODING
,
CRYPT_OID_VERIFY_REVOCATION_FUNC
,
cryptNet
);
CRYPT_OID_VERIFY_REVOCATION_FUNC
,
L"cryptnet.dll"
);
CryptUnregisterOIDFunction
(
0
,
CRYPT_OID_OPEN_STORE_PROV_FUNC
,
"Ldap"
);
CryptUnregisterOIDFunction
(
0
,
CRYPT_OID_OPEN_STORE_PROV_FUNC
,
CERT_STORE_PROV_LDAP_W
);
...
...
@@ -851,28 +849,6 @@ static BOOL WINAPI FTP_RetrieveEncodedObjectW(LPCWSTR pszURL,
return
FALSE
;
}
static
const
WCHAR
x509cacert
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'x'
,
'-'
,
'x'
,
'5'
,
'0'
,
'9'
,
'-'
,
'c'
,
'a'
,
'-'
,
'c'
,
'e'
,
'r'
,
't'
,
0
};
static
const
WCHAR
x509emailcert
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'x'
,
'-'
,
'x'
,
'5'
,
'0'
,
'9'
,
'-'
,
'e'
,
'm'
,
'a'
,
'i'
,
'l'
,
'-'
,
'c'
,
'e'
,
'r'
,
't'
,
0
};
static
const
WCHAR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'k'
,
'c'
,
's'
,
'7'
,
'-'
,
's'
,
'i'
,
'g'
,
'n'
,
'a'
,
't'
,
'u'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
pkcs7mime
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'x'
,
'-'
,
'p'
,
'k'
,
'c'
,
's'
,
'7'
,
'-'
,
'm'
,
'i'
,
'm'
,
'e'
,
0
};
static
BOOL
WINAPI
HTTP_RetrieveEncodedObjectW
(
LPCWSTR
pszURL
,
LPCSTR
pszObjectOid
,
DWORD
dwRetrievalFlags
,
DWORD
dwTimeout
,
PCRYPT_BLOB_ARRAY
pObject
,
PFN_FREE_ENCODED_OBJECT_FUNC
*
ppfnFreeObject
,
...
...
@@ -908,9 +884,14 @@ static BOOL WINAPI HTTP_RetrieveEncodedObjectW(LPCWSTR pszURL,
&
hHost
);
if
(
ret
)
{
static
LPCWSTR
types
[]
=
{
x509cacert
,
x509emailcert
,
x509servercert
,
x509usercert
,
pkcs7cert
,
pkixCRL
,
pkcs7CRL
,
pkcs7sig
,
pkcs7mime
,
NULL
};
static
LPCWSTR
types
[]
=
{
L"application/x-x509-ca-cert"
,
L"application/x-x509-email-cert"
,
L"application/x-x509-server-cert"
,
L"application/x-x509-user-cert"
,
L"application/x-pkcs7-certifcates"
,
L"application/pkix-crl"
,
L"application/x-pkcs7-crl"
,
L"application/x-pkcs7-signature"
,
L"application/x-pkcs7-mime"
,
NULL
};
HINTERNET
hHttp
=
HttpOpenRequestW
(
hHost
,
NULL
,
components
.
lpszUrlPath
,
NULL
,
NULL
,
types
,
INTERNET_FLAG_NO_COOKIES
|
INTERNET_FLAG_NO_UI
,
...
...
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