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
1811acc2
Commit
1811acc2
authored
Jun 19, 2006
by
Juan Lang
Committed by
Alexandre Julliard
Jun 19, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Fix decoding signed certs and CRLs.
parent
14b4e851
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
decode.c
dlls/crypt32/decode.c
+0
-0
encode.c
dlls/crypt32/tests/encode.c
+26
-1
No files found.
dlls/crypt32/decode.c
View file @
1811acc2
This diff is collapsed.
Click to expand it.
dlls/crypt32/tests/encode.c
View file @
1811acc2
...
...
@@ -2354,6 +2354,30 @@ static void test_decodeCert(DWORD dwEncoding)
"Unexpected signature
\n
"
);
LocalFree
(
buf
);
}
/* A signed cert decodes as a CERT_INFO too */
ret
=
CryptDecodeObjectEx
(
dwEncoding
,
X509_CERT_TO_BE_SIGNED
,
signedBigCert
,
sizeof
(
signedBigCert
),
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
size
);
ok
(
ret
,
"CryptDecodeObjectEx failed: %08lx
\n
"
,
GetLastError
());
if
(
buf
)
{
CERT_INFO
*
info
=
(
CERT_INFO
*
)
buf
;
ok
(
size
>=
sizeof
(
CERT_INFO
),
"Wrong size %ld
\n
"
,
size
);
ok
(
info
->
SerialNumber
.
cbData
==
1
,
"Expected serial number size 1, got %ld
\n
"
,
info
->
SerialNumber
.
cbData
);
ok
(
*
info
->
SerialNumber
.
pbData
==
*
serialNum
,
"Expected serial number %d, got %d
\n
"
,
*
serialNum
,
*
info
->
SerialNumber
.
pbData
);
ok
(
info
->
Issuer
.
cbData
==
sizeof
(
encodedCommonName
),
"Wrong size %ld
\n
"
,
info
->
Issuer
.
cbData
);
ok
(
!
memcmp
(
info
->
Issuer
.
pbData
,
encodedCommonName
,
info
->
Issuer
.
cbData
),
"Unexpected issuer
\n
"
);
ok
(
info
->
Subject
.
cbData
==
sizeof
(
encodedCommonName
),
"Wrong size %ld
\n
"
,
info
->
Subject
.
cbData
);
ok
(
!
memcmp
(
info
->
Subject
.
pbData
,
encodedCommonName
,
info
->
Subject
.
cbData
),
"Unexpected subject
\n
"
);
LocalFree
(
buf
);
}
}
static
const
BYTE
emptyDistPoint
[]
=
{
0x30
,
0x02
,
0x30
,
0x00
};
...
...
@@ -2830,7 +2854,7 @@ static void test_decodeCRLToBeSigned(DWORD dwEncoding)
ret
=
CryptDecodeObjectEx
(
dwEncoding
,
X509_CERT_CRL_TO_BE_SIGNED
,
verisignCRL
,
sizeof
(
verisignCRL
),
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
size
);
todo_wine
ok
(
ret
,
"CryptDecodeObjectEx failed: %08lx
\n
"
,
GetLastError
());
ok
(
ret
,
"CryptDecodeObjectEx failed: %08lx
\n
"
,
GetLastError
());
if
(
buf
)
{
CRL_INFO
*
info
=
(
CRL_INFO
*
)
buf
;
...
...
@@ -2875,6 +2899,7 @@ static void test_decodeCRLToBeSigned(DWORD dwEncoding)
ret
=
CryptDecodeObjectEx
(
dwEncoding
,
X509_CERT_CRL_TO_BE_SIGNED
,
v2CRLWithExt
,
sizeof
(
v2CRLWithExt
),
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
size
);
ok
(
ret
,
"CryptDecodeObjectEx failed: %08lx
\n
"
,
GetLastError
());
if
(
buf
)
{
CRL_INFO
*
info
=
(
CRL_INFO
*
)
buf
;
...
...
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