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
44948c3b
Commit
44948c3b
authored
Aug 02, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Aug 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Implement decoding OID and directory name alt name entries.
parent
005b50e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
decode.c
dlls/crypt32/decode.c
+21
-2
encode.c
dlls/crypt32/tests/encode.c
+0
-2
No files found.
dlls/crypt32/decode.c
View file @
44948c3b
...
...
@@ -2143,13 +2143,22 @@ static BOOL WINAPI CRYPT_AsnDecodeAltNameEntry(DWORD dwCertEncodingType,
case
6
:
/* uniformResourceIdentifier */
bytesNeeded
+=
(
dataLen
+
1
)
*
sizeof
(
WCHAR
);
break
;
case
4
:
/* directoryName */
case
7
:
/* iPAddress */
bytesNeeded
+=
dataLen
;
break
;
case
8
:
/* registeredID */
/* FIXME: decode as OID */
ret
=
CRYPT_AsnDecodeOidIgnoreTag
(
dwCertEncodingType
,
NULL
,
pbEncoded
,
cbEncoded
,
0
,
NULL
,
NULL
,
&
dataLen
);
if
(
ret
)
{
/* FIXME: ugly, shouldn't need to know internals of OID decode
* function to use it.
*/
bytesNeeded
+=
dataLen
-
sizeof
(
LPSTR
);
}
break
;
case
0
:
/* otherName */
case
4
:
/* directoryName */
FIXME
(
"%d: stub
\n
"
,
pbEncoded
[
0
]
&
ASN_TYPE_MASK
);
SetLastError
(
CRYPT_E_ASN1_BADTAG
);
ret
=
FALSE
;
...
...
@@ -2196,6 +2205,11 @@ static BOOL WINAPI CRYPT_AsnDecodeAltNameEntry(DWORD dwCertEncodingType,
debugstr_w
(
entry
->
u
.
pwszURL
));
break
;
}
case
4
:
/* directoryName */
entry
->
dwAltNameChoice
=
CERT_ALT_NAME_DIRECTORY_NAME
;
/* The data are memory-equivalent with the IPAddress case,
* fall-through
*/
case
7
:
/* iPAddress */
/* The next data pointer is in the pwszURL spot, that is,
* the first 4 bytes. Need to move it to the next spot.
...
...
@@ -2205,6 +2219,11 @@ static BOOL WINAPI CRYPT_AsnDecodeAltNameEntry(DWORD dwCertEncodingType,
memcpy
(
entry
->
u
.
IPAddress
.
pbData
,
pbEncoded
+
1
+
lenBytes
,
dataLen
);
break
;
case
8
:
/* registeredID */
ret
=
CRYPT_AsnDecodeOidIgnoreTag
(
dwCertEncodingType
,
NULL
,
pbEncoded
,
cbEncoded
,
0
,
NULL
,
&
entry
->
u
.
pszRegisteredID
,
&
dataLen
);
break
;
}
}
}
...
...
dlls/crypt32/tests/encode.c
View file @
44948c3b
...
...
@@ -1522,7 +1522,6 @@ static void test_decodeAltName(DWORD dwEncoding)
ret
=
CryptDecodeObjectEx
(
dwEncoding
,
X509_ALTERNATE_NAME
,
encodedOidName
,
sizeof
(
encodedOidName
),
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
bufSize
);
todo_wine
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
buf
)
{
...
...
@@ -1540,7 +1539,6 @@ static void test_decodeAltName(DWORD dwEncoding)
ret
=
CryptDecodeObjectEx
(
dwEncoding
,
X509_ALTERNATE_NAME
,
encodedDirectoryName
,
sizeof
(
encodedDirectoryName
),
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
BYTE
*
)
&
buf
,
&
bufSize
);
todo_wine
ok
(
ret
,
"CryptDecodeObjectEx failed: %08x
\n
"
,
GetLastError
());
if
(
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