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
676c6e5a
Commit
676c6e5a
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 encoding OID and directory name alt name entries.
parent
9194d600
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
encode.c
dlls/crypt32/encode.c
+19
-3
No files found.
dlls/crypt32/encode.c
View file @
676c6e5a
...
@@ -1942,6 +1942,7 @@ static BOOL CRYPT_AsnEncodeAltNameEntry(const CERT_ALT_NAME_ENTRY *entry,
...
@@ -1942,6 +1942,7 @@ static BOOL CRYPT_AsnEncodeAltNameEntry(const CERT_ALT_NAME_ENTRY *entry,
{
{
BOOL
ret
;
BOOL
ret
;
DWORD
dataLen
;
DWORD
dataLen
;
BYTE
tag
;
ret
=
TRUE
;
ret
=
TRUE
;
switch
(
entry
->
dwAltNameChoice
)
switch
(
entry
->
dwAltNameChoice
)
...
@@ -1949,6 +1950,7 @@ static BOOL CRYPT_AsnEncodeAltNameEntry(const CERT_ALT_NAME_ENTRY *entry,
...
@@ -1949,6 +1950,7 @@ static BOOL CRYPT_AsnEncodeAltNameEntry(const CERT_ALT_NAME_ENTRY *entry,
case
CERT_ALT_NAME_RFC822_NAME
:
case
CERT_ALT_NAME_RFC822_NAME
:
case
CERT_ALT_NAME_DNS_NAME
:
case
CERT_ALT_NAME_DNS_NAME
:
case
CERT_ALT_NAME_URL
:
case
CERT_ALT_NAME_URL
:
tag
=
ASN_CONTEXT
|
(
entry
->
dwAltNameChoice
-
1
);
if
(
entry
->
u
.
pwszURL
)
if
(
entry
->
u
.
pwszURL
)
{
{
DWORD
i
;
DWORD
i
;
...
@@ -1968,13 +1970,24 @@ static BOOL CRYPT_AsnEncodeAltNameEntry(const CERT_ALT_NAME_ENTRY *entry,
...
@@ -1968,13 +1970,24 @@ static BOOL CRYPT_AsnEncodeAltNameEntry(const CERT_ALT_NAME_ENTRY *entry,
else
else
dataLen
=
0
;
dataLen
=
0
;
break
;
break
;
case
CERT_ALT_NAME_DIRECTORY_NAME
:
tag
=
ASN_CONTEXT
|
ASN_CONSTRUCTOR
|
(
entry
->
dwAltNameChoice
-
1
);
dataLen
=
entry
->
u
.
DirectoryName
.
cbData
;
break
;
case
CERT_ALT_NAME_IP_ADDRESS
:
case
CERT_ALT_NAME_IP_ADDRESS
:
tag
=
ASN_CONTEXT
|
(
entry
->
dwAltNameChoice
-
1
);
dataLen
=
entry
->
u
.
IPAddress
.
cbData
;
dataLen
=
entry
->
u
.
IPAddress
.
cbData
;
break
;
break
;
case
CERT_ALT_NAME_REGISTERED_ID
:
case
CERT_ALT_NAME_REGISTERED_ID
:
/* FIXME: encode OID */
{
struct
AsnEncodeTagSwappedItem
swapped
=
{
ASN_CONTEXT
|
(
entry
->
dwAltNameChoice
-
1
),
entry
->
u
.
pszRegisteredID
,
CRYPT_AsnEncodeOid
};
return
CRYPT_AsnEncodeSwapTag
(
0
,
NULL
,
&
swapped
,
0
,
NULL
,
pbEncoded
,
pcbEncoded
);
}
case
CERT_ALT_NAME_OTHER_NAME
:
case
CERT_ALT_NAME_OTHER_NAME
:
case
CERT_ALT_NAME_DIRECTORY_NAME
:
FIXME
(
"name type %d unimplemented
\n
"
,
entry
->
dwAltNameChoice
);
FIXME
(
"name type %d unimplemented
\n
"
,
entry
->
dwAltNameChoice
);
return
FALSE
;
return
FALSE
;
default:
default:
...
@@ -1997,7 +2010,7 @@ static BOOL CRYPT_AsnEncodeAltNameEntry(const CERT_ALT_NAME_ENTRY *entry,
...
@@ -1997,7 +2010,7 @@ static BOOL CRYPT_AsnEncodeAltNameEntry(const CERT_ALT_NAME_ENTRY *entry,
}
}
else
else
{
{
*
pbEncoded
++
=
ASN_CONTEXT
|
(
entry
->
dwAltNameChoice
-
1
)
;
*
pbEncoded
++
=
tag
;
CRYPT_EncodeLen
(
dataLen
,
pbEncoded
,
&
lenBytes
);
CRYPT_EncodeLen
(
dataLen
,
pbEncoded
,
&
lenBytes
);
pbEncoded
+=
lenBytes
;
pbEncoded
+=
lenBytes
;
switch
(
entry
->
dwAltNameChoice
)
switch
(
entry
->
dwAltNameChoice
)
...
@@ -2012,6 +2025,9 @@ static BOOL CRYPT_AsnEncodeAltNameEntry(const CERT_ALT_NAME_ENTRY *entry,
...
@@ -2012,6 +2025,9 @@ static BOOL CRYPT_AsnEncodeAltNameEntry(const CERT_ALT_NAME_ENTRY *entry,
*
pbEncoded
++
=
(
BYTE
)
entry
->
u
.
pwszURL
[
i
];
*
pbEncoded
++
=
(
BYTE
)
entry
->
u
.
pwszURL
[
i
];
break
;
break
;
}
}
case
CERT_ALT_NAME_DIRECTORY_NAME
:
memcpy
(
pbEncoded
,
entry
->
u
.
DirectoryName
.
pbData
,
dataLen
);
break
;
case
CERT_ALT_NAME_IP_ADDRESS
:
case
CERT_ALT_NAME_IP_ADDRESS
:
memcpy
(
pbEncoded
,
entry
->
u
.
IPAddress
.
pbData
,
dataLen
);
memcpy
(
pbEncoded
,
entry
->
u
.
IPAddress
.
pbData
,
dataLen
);
break
;
break
;
...
...
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