Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
038b53c3
Commit
038b53c3
authored
Aug 10, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Aug 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Ex encode/decode functions should call non-Ex versions if no Ex version is available.
parent
6aead911
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
0 deletions
+60
-0
decode.c
dlls/crypt32/decode.c
+30
-0
encode.c
dlls/crypt32/encode.c
+30
-0
No files found.
dlls/crypt32/decode.c
View file @
038b53c3
...
@@ -4168,7 +4168,37 @@ BOOL WINAPI CryptDecodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType,
...
@@ -4168,7 +4168,37 @@ BOOL WINAPI CryptDecodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType,
ret
=
decodeFunc
(
dwCertEncodingType
,
lpszStructType
,
pbEncoded
,
ret
=
decodeFunc
(
dwCertEncodingType
,
lpszStructType
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pDecodePara
,
pvStructInfo
,
pcbStructInfo
);
cbEncoded
,
dwFlags
,
pDecodePara
,
pvStructInfo
,
pcbStructInfo
);
else
else
{
static
HCRYPTOIDFUNCSET
decodeObjectSet
=
NULL
;
CryptDecodeObjectFunc
pCryptDecodeObject
;
/* Try CryptDecodeObject function. Don't call CryptDecodeObject
* directly, as that could cause an infinite loop.
*/
if
(
!
decodeObjectSet
)
decodeObjectSet
=
CryptInitOIDFunctionSet
(
CRYPT_OID_DECODE_OBJECT_FUNC
,
0
);
CryptGetOIDFunctionAddress
(
decodeObjectSet
,
dwCertEncodingType
,
lpszStructType
,
0
,
(
void
**
)
&
pCryptDecodeObject
,
&
hFunc
);
if
(
pCryptDecodeObject
)
{
if
(
dwFlags
&
CRYPT_DECODE_ALLOC_FLAG
)
{
ret
=
pCryptDecodeObject
(
dwCertEncodingType
,
lpszStructType
,
pbEncoded
,
cbEncoded
,
dwFlags
,
NULL
,
pcbStructInfo
);
if
(
ret
&&
(
ret
=
CRYPT_DecodeEnsureSpace
(
dwFlags
,
pDecodePara
,
pvStructInfo
,
pcbStructInfo
,
*
pcbStructInfo
)))
ret
=
pCryptDecodeObject
(
dwCertEncodingType
,
lpszStructType
,
pbEncoded
,
cbEncoded
,
dwFlags
,
*
(
BYTE
**
)
pvStructInfo
,
pcbStructInfo
);
}
else
ret
=
pCryptDecodeObject
(
dwCertEncodingType
,
lpszStructType
,
pbEncoded
,
cbEncoded
,
dwFlags
,
pvStructInfo
,
pcbStructInfo
);
}
else
SetLastError
(
ERROR_FILE_NOT_FOUND
);
SetLastError
(
ERROR_FILE_NOT_FOUND
);
}
if
(
hFunc
)
if
(
hFunc
)
CryptFreeOIDFunctionAddress
(
hFunc
,
0
);
CryptFreeOIDFunctionAddress
(
hFunc
,
0
);
return
ret
;
return
ret
;
...
...
dlls/crypt32/encode.c
View file @
038b53c3
...
@@ -3513,7 +3513,37 @@ BOOL WINAPI CryptEncodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType,
...
@@ -3513,7 +3513,37 @@ BOOL WINAPI CryptEncodeObjectEx(DWORD dwCertEncodingType, LPCSTR lpszStructType,
ret
=
encodeFunc
(
dwCertEncodingType
,
lpszStructType
,
pvStructInfo
,
ret
=
encodeFunc
(
dwCertEncodingType
,
lpszStructType
,
pvStructInfo
,
dwFlags
,
pEncodePara
,
pvEncoded
,
pcbEncoded
);
dwFlags
,
pEncodePara
,
pvEncoded
,
pcbEncoded
);
else
else
{
static
HCRYPTOIDFUNCSET
encodeObjectSet
=
NULL
;
CryptEncodeObjectFunc
pCryptEncodeObject
;
/* Try CryptEncodeObject function. Don't call CryptEncodeObject
* directly, as that could cause an infinite loop.
*/
if
(
!
encodeObjectSet
)
encodeObjectSet
=
CryptInitOIDFunctionSet
(
CRYPT_OID_ENCODE_OBJECT_FUNC
,
0
);
CryptGetOIDFunctionAddress
(
encodeObjectSet
,
dwCertEncodingType
,
lpszStructType
,
0
,
(
void
**
)
&
pCryptEncodeObject
,
&
hFunc
);
if
(
pCryptEncodeObject
)
{
if
(
dwFlags
&
CRYPT_ENCODE_ALLOC_FLAG
)
{
ret
=
pCryptEncodeObject
(
dwCertEncodingType
,
lpszStructType
,
pvStructInfo
,
NULL
,
pcbEncoded
);
if
(
ret
&&
(
ret
=
CRYPT_EncodeEnsureSpace
(
dwFlags
,
pEncodePara
,
pvEncoded
,
pcbEncoded
,
*
pcbEncoded
)))
ret
=
pCryptEncodeObject
(
dwCertEncodingType
,
lpszStructType
,
pvStructInfo
,
*
(
BYTE
**
)
pvEncoded
,
pcbEncoded
);
}
else
ret
=
pCryptEncodeObject
(
dwCertEncodingType
,
lpszStructType
,
pvStructInfo
,
pvEncoded
,
pcbEncoded
);
}
else
SetLastError
(
ERROR_FILE_NOT_FOUND
);
SetLastError
(
ERROR_FILE_NOT_FOUND
);
}
if
(
hFunc
)
if
(
hFunc
)
CryptFreeOIDFunctionAddress
(
hFunc
,
0
);
CryptFreeOIDFunctionAddress
(
hFunc
,
0
);
return
ret
;
return
ret
;
...
...
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