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
83f7f9b0
Commit
83f7f9b0
authored
Nov 14, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Nov 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Implement CryptFormatObject for alternate names.
parent
d3cfe743
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
object.c
dlls/crypt32/object.c
+29
-0
No files found.
dlls/crypt32/object.c
View file @
83f7f9b0
...
...
@@ -1002,6 +1002,24 @@ static BOOL CRYPT_FormatAltNameInfo(DWORD dwFormatStrType, DWORD indentLevel,
static
const
WCHAR
colonSep
[]
=
{
':'
,
' '
,
0
};
static
BOOL
WINAPI
CRYPT_FormatAltName
(
DWORD
dwCertEncodingType
,
DWORD
dwFormatType
,
DWORD
dwFormatStrType
,
void
*
pFormatStruct
,
LPCSTR
lpszStructType
,
const
BYTE
*
pbEncoded
,
DWORD
cbEncoded
,
void
*
pbFormat
,
DWORD
*
pcbFormat
)
{
BOOL
ret
;
CERT_ALT_NAME_INFO
*
info
;
DWORD
size
;
if
((
ret
=
CryptDecodeObjectEx
(
dwCertEncodingType
,
X509_ALTERNATE_NAME
,
pbEncoded
,
cbEncoded
,
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
&
info
,
&
size
)))
{
ret
=
CRYPT_FormatAltNameInfo
(
dwFormatStrType
,
0
,
info
,
pbFormat
,
pcbFormat
);
LocalFree
(
info
);
}
return
ret
;
}
static
BOOL
CRYPT_FormatCertIssuer
(
DWORD
dwFormatStrType
,
CERT_ALT_NAME_INFO
*
issuer
,
LPWSTR
str
,
DWORD
*
pcbStr
)
{
...
...
@@ -1956,6 +1974,9 @@ static CryptFormatObjectFunc CRYPT_GetBuiltinFormatFunction(DWORD encodingType,
{
switch
(
LOWORD
(
lpszStructType
))
{
case
LOWORD
(
X509_ALTERNATE_NAME
):
format
=
CRYPT_FormatAltName
;
break
;
case
LOWORD
(
X509_BASIC_CONSTRAINTS2
):
format
=
CRYPT_FormatBasicConstraints2
;
break
;
...
...
@@ -1976,6 +1997,14 @@ static CryptFormatObjectFunc CRYPT_GetBuiltinFormatFunction(DWORD encodingType,
break
;
}
}
else
if
(
!
strcmp
(
lpszStructType
,
szOID_SUBJECT_ALT_NAME
))
format
=
CRYPT_FormatAltName
;
else
if
(
!
strcmp
(
lpszStructType
,
szOID_ISSUER_ALT_NAME
))
format
=
CRYPT_FormatAltName
;
else
if
(
!
strcmp
(
lpszStructType
,
szOID_SUBJECT_ALT_NAME2
))
format
=
CRYPT_FormatAltName
;
else
if
(
!
strcmp
(
lpszStructType
,
szOID_ISSUER_ALT_NAME2
))
format
=
CRYPT_FormatAltName
;
else
if
(
!
strcmp
(
lpszStructType
,
szOID_BASIC_CONSTRAINTS2
))
format
=
CRYPT_FormatBasicConstraints2
;
else
if
(
!
strcmp
(
lpszStructType
,
szOID_AUTHORITY_INFO_ACCESS
))
...
...
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