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
37e483d5
Commit
37e483d5
authored
May 30, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
May 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Use CRLF separator in INTERNET_CERTIFICATE_INFO.
parent
8d9d97be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
4 deletions
+45
-4
http.c
dlls/wininet/http.c
+4
-4
http.c
dlls/wininet/tests/http.c
+41
-0
No files found.
dlls/wininet/http.c
View file @
37e483d5
...
...
@@ -2130,18 +2130,18 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
info
->
ftExpiry
=
context
->
pCertInfo
->
NotAfter
;
info
->
ftStart
=
context
->
pCertInfo
->
NotBefore
;
len
=
CertNameToStrA
(
context
->
dwCertEncodingType
,
&
context
->
pCertInfo
->
Subject
,
CERT_SIMPLE_NAME_STR
,
NULL
,
0
);
&
context
->
pCertInfo
->
Subject
,
CERT_SIMPLE_NAME_STR
|
CERT_NAME_STR_CRLF_FLAG
,
NULL
,
0
);
info
->
lpszSubjectInfo
=
LocalAlloc
(
0
,
len
);
if
(
info
->
lpszSubjectInfo
)
CertNameToStrA
(
context
->
dwCertEncodingType
,
&
context
->
pCertInfo
->
Subject
,
CERT_SIMPLE_NAME_STR
,
&
context
->
pCertInfo
->
Subject
,
CERT_SIMPLE_NAME_STR
|
CERT_NAME_STR_CRLF_FLAG
,
info
->
lpszSubjectInfo
,
len
);
len
=
CertNameToStrA
(
context
->
dwCertEncodingType
,
&
context
->
pCertInfo
->
Issuer
,
CERT_SIMPLE_NAME_STR
,
NULL
,
0
);
&
context
->
pCertInfo
->
Issuer
,
CERT_SIMPLE_NAME_STR
|
CERT_NAME_STR_CRLF_FLAG
,
NULL
,
0
);
info
->
lpszIssuerInfo
=
LocalAlloc
(
0
,
len
);
if
(
info
->
lpszIssuerInfo
)
CertNameToStrA
(
context
->
dwCertEncodingType
,
&
context
->
pCertInfo
->
Issuer
,
CERT_SIMPLE_NAME_STR
,
&
context
->
pCertInfo
->
Issuer
,
CERT_SIMPLE_NAME_STR
|
CERT_NAME_STR_CRLF_FLAG
,
info
->
lpszIssuerInfo
,
len
);
info
->
dwKeySize
=
NETCON_GetCipherStrength
(
req
->
netconn
);
CertFreeCertificateContext
(
context
);
...
...
dlls/wininet/tests/http.c
View file @
37e483d5
...
...
@@ -2878,6 +2878,45 @@ static void release_cert_info(INTERNET_CERTIFICATE_INFOA *info)
LocalFree
(
info
->
lpszEncryptionAlgName
);
}
static
void
test_cert_struct
(
HINTERNET
req
)
{
INTERNET_CERTIFICATE_INFOA
info
;
DWORD
size
;
BOOL
res
;
static
const
char
ex_subject
[]
=
"US
\r\n
"
"Minnesota
\r\n
"
"Saint Paul
\r\n
"
"WineHQ
\r\n
"
"test.winehq.org
\r\n
"
"webmaster@winehq.org"
;
static
const
char
ex_issuer
[]
=
"US
\r\n
"
"Minnesota
\r\n
"
"WineHQ
\r\n
"
"test.winehq.org
\r\n
"
"webmaster@winehq.org"
;
memset
(
&
info
,
0x5
,
sizeof
(
&
info
));
size
=
sizeof
(
info
);
res
=
InternetQueryOption
(
req
,
INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT
,
&
info
,
&
size
);
ok
(
res
,
"InternetQueryOption failed: %u
\n
"
,
GetLastError
());
ok
(
size
==
sizeof
(
info
),
"size = %u
\n
"
,
size
);
ok
(
!
strcmp
(
info
.
lpszSubjectInfo
,
ex_subject
),
"lpszSubjectInfo = %s
\n
"
,
info
.
lpszSubjectInfo
);
ok
(
!
strcmp
(
info
.
lpszIssuerInfo
,
ex_issuer
),
"lpszIssuerInfo = %s
\n
"
,
info
.
lpszIssuerInfo
);
ok
(
!
info
.
lpszSignatureAlgName
,
"lpszSignatureAlgName = %s
\n
"
,
info
.
lpszSignatureAlgName
);
ok
(
!
info
.
lpszEncryptionAlgName
,
"lpszEncryptionAlgName = %s
\n
"
,
info
.
lpszEncryptionAlgName
);
ok
(
!
info
.
lpszProtocolName
,
"lpszProtocolName = %s
\n
"
,
info
.
lpszProtocolName
);
todo_wine
ok
(
info
.
dwKeySize
==
128
,
"dwKeySize = %u
\n
"
,
info
.
dwKeySize
);
release_cert_info
(
&
info
);
}
#define test_secflags_option(a,b) _test_secflags_option(__LINE__,a,b)
static
void
_test_secflags_option
(
unsigned
line
,
HINTERNET
req
,
DWORD
ex_flags
)
{
...
...
@@ -3058,6 +3097,8 @@ static void test_security_flags(void)
test_secflags_option
(
req
,
SECURITY_FLAG_SECURE
|
SECURITY_FLAG_IGNORE_UNKNOWN_CA
|
SECURITY_FLAG_STRENGTH_STRONG
|
0x800000
);
test_cert_struct
(
req
);
res
=
InternetReadFile
(
req
,
buf
,
sizeof
(
buf
),
&
size
);
ok
(
res
,
"InternetReadFile failed: %u
\n
"
,
GetLastError
());
ok
(
size
,
"size = 0
\n
"
);
...
...
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