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
c97e442a
Commit
c97e442a
authored
Oct 20, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Oct 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Add a helper function to encode a cert's public key.
parent
43182842
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
encode.c
dlls/crypt32/encode.c
+20
-1
No files found.
dlls/crypt32/encode.c
View file @
c97e442a
...
...
@@ -464,6 +464,25 @@ static BOOL WINAPI CRYPT_AsnEncodeCert(DWORD dwCertEncodingType,
return
ret
;
}
static
BOOL
WINAPI
CRYPT_AsnEncodePubKeyInfoNoNull
(
DWORD
dwCertEncodingType
,
LPCSTR
lpszStructType
,
const
void
*
pvStructInfo
,
DWORD
dwFlags
,
PCRYPT_ENCODE_PARA
pEncodePara
,
BYTE
*
pbEncoded
,
DWORD
*
pcbEncoded
)
{
BOOL
ret
;
const
CERT_PUBLIC_KEY_INFO
*
info
=
pvStructInfo
;
struct
AsnEncodeSequenceItem
items
[]
=
{
{
&
info
->
Algorithm
,
CRYPT_AsnEncodeAlgorithmId
,
0
},
{
&
info
->
PublicKey
,
CRYPT_AsnEncodeBits
,
0
},
};
TRACE
(
"Encoding public key with OID %s
\n
"
,
debugstr_a
(
info
->
Algorithm
.
pszObjId
));
ret
=
CRYPT_AsnEncodeSequence
(
dwCertEncodingType
,
items
,
sizeof
(
items
)
/
sizeof
(
items
[
0
]),
dwFlags
,
pEncodePara
,
pbEncoded
,
pcbEncoded
);
return
ret
;
}
/* Like in Windows, this blithely ignores the validity of the passed-in
* CERT_INFO, and just encodes it as-is. The resulting encoded data may not
* decode properly, see CRYPT_AsnDecodeCertInfo.
...
...
@@ -484,7 +503,7 @@ static BOOL WINAPI CRYPT_AsnEncodeCertInfo(DWORD dwCertEncodingType,
{
&
info
->
Issuer
,
CRYPT_CopyEncodedBlob
,
0
},
{
&
info
->
NotBefore
,
CRYPT_AsnEncodeValidity
,
0
},
{
&
info
->
Subject
,
CRYPT_CopyEncodedBlob
,
0
},
{
&
info
->
SubjectPublicKeyInfo
,
CRYPT_AsnEncodePubKeyInfo
,
0
},
{
&
info
->
SubjectPublicKeyInfo
,
CRYPT_AsnEncodePubKeyInfo
NoNull
,
0
},
{
0
}
};
struct
AsnConstructedItem
constructed
[
3
]
=
{
{
0
}
};
...
...
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