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
8f2821ac
Commit
8f2821ac
authored
Oct 19, 2010
by
Juan Lang
Committed by
Alexandre Julliard
Oct 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: The newline character must also be quoted.
parent
7833f307
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
str.c
dlls/crypt32/str.c
+1
-0
str.c
dlls/crypt32/tests/str.c
+10
-0
No files found.
dlls/crypt32/str.c
View file @
8f2821ac
...
...
@@ -41,6 +41,7 @@ static inline BOOL is_quotable_char(char c)
case
'>'
:
case
';'
:
case
'#'
:
case
'\n'
:
return
TRUE
;
default:
return
FALSE
;
...
...
dlls/crypt32/tests/str.c
View file @
8f2821ac
...
...
@@ -363,6 +363,9 @@ static BYTE encodedHashCN[] = {
static
BYTE
encodedSemiCN
[]
=
{
0x30
,
0x0d
,
0x31
,
0x0b
,
0x30
,
0x09
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
0x1e
,
0x02
,
0x00
,
0x3b
};
static
BYTE
encodedNewlineCN
[]
=
{
0x30
,
0x11
,
0x31
,
0x0f
,
0x30
,
0x0d
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
0x1e
,
0x06
,
0x00
,
0x61
,
0x00
,
0x0a
,
0x00
,
0x62
};
static
void
test_CertNameToStrA
(
void
)
{
...
...
@@ -457,6 +460,9 @@ static void test_CertNameToStrA(void)
blob
.
pbData
=
encodedSemiCN
;
blob
.
cbData
=
sizeof
(
encodedSemiCN
);
test_NameToStrConversionA
(
&
blob
,
CERT_X500_NAME_STR
,
"CN=
\"
;
\"
"
,
FALSE
);
blob
.
pbData
=
encodedNewlineCN
;
blob
.
cbData
=
sizeof
(
encodedNewlineCN
);
test_NameToStrConversionA
(
&
blob
,
CERT_X500_NAME_STR
,
"CN=
\"
a
\n
b
\"
"
,
FALSE
);
}
static
void
test_NameToStrConversionW
(
PCERT_NAME_BLOB
pName
,
DWORD
dwStrType
,
...
...
@@ -499,6 +505,7 @@ static const WCHAR lessThanCN_W[] = { 'C','N','=','"','<','"',0 };
static
const
WCHAR
greaterThanCN_W
[]
=
{
'C'
,
'N'
,
'='
,
'"'
,
'>'
,
'"'
,
0
};
static
const
WCHAR
hashCN_W
[]
=
{
'C'
,
'N'
,
'='
,
'"'
,
'#'
,
'"'
,
0
};
static
const
WCHAR
semiCN_W
[]
=
{
'C'
,
'N'
,
'='
,
'"'
,
';'
,
'"'
,
0
};
static
const
WCHAR
newlineCN_W
[]
=
{
'C'
,
'N'
,
'='
,
'"'
,
'a'
,
'\n'
,
'b'
,
'"'
,
0
};
static
void
test_CertNameToStrW
(
void
)
{
...
...
@@ -594,6 +601,9 @@ static void test_CertNameToStrW(void)
blob
.
pbData
=
encodedSemiCN
;
blob
.
cbData
=
sizeof
(
encodedSemiCN
);
test_NameToStrConversionW
(
&
blob
,
CERT_X500_NAME_STR
,
semiCN_W
,
FALSE
);
blob
.
pbData
=
encodedNewlineCN
;
blob
.
cbData
=
sizeof
(
encodedNewlineCN
);
test_NameToStrConversionW
(
&
blob
,
CERT_X500_NAME_STR
,
newlineCN_W
,
FALSE
);
}
struct
StrToNameA
...
...
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