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
ba8d0d02
Commit
ba8d0d02
authored
Nov 07, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Nov 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Save alg IDs in CryptProtectData output.
parent
0d9a5adb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
protectdata.c
dlls/crypt32/protectdata.c
+28
-28
No files found.
dlls/crypt32/protectdata.c
View file @
ba8d0d02
...
@@ -95,12 +95,12 @@ struct protect_data_t
...
@@ -95,12 +95,12 @@ struct protect_data_t
DATA_BLOB
info1
;
DATA_BLOB
info1
;
DWORD
null0
;
DWORD
null0
;
WCHAR
*
szDataDescr
;
/* serialized differently than the DATA_BLOBs */
WCHAR
*
szDataDescr
;
/* serialized differently than the DATA_BLOBs */
DWORD
unknown0
;
/* perhaps the HASH alg const should go here? */
ALG_ID
cipher_alg
;
DWORD
unknown1
;
DWORD
cipher_key_len
;
DATA_BLOB
data0
;
DATA_BLOB
data0
;
DWORD
null1
;
DWORD
null1
;
DWORD
unknown2
;
/* perhaps the KEY alg const should go here? */
ALG_ID
hash_alg
;
DWORD
unknown3
;
DWORD
hash_len
;
DATA_BLOB
salt
;
DATA_BLOB
salt
;
DATA_BLOB
cipher
;
DATA_BLOB
cipher
;
DATA_BLOB
fingerprint
;
DATA_BLOB
fingerprint
;
...
@@ -288,11 +288,11 @@ BOOL serialize(const struct protect_data_t *pInfo, DATA_BLOB *pSerial)
...
@@ -288,11 +288,11 @@ BOOL serialize(const struct protect_data_t *pInfo, DATA_BLOB *pSerial)
(
dwStrLen
+
1
)
*
sizeof
(
WCHAR
),
sizeof
(
BYTE
),
TRUE
);
(
dwStrLen
+
1
)
*
sizeof
(
WCHAR
),
sizeof
(
BYTE
),
TRUE
);
/*TRACE("used %u\n",ptr-pSerial->pbData);*/
/*TRACE("used %u\n",ptr-pSerial->pbData);*/
/*
unknown0
*/
/*
cipher_alg
*/
serialize_dword
(
pInfo
->
unknown0
,
&
ptr
);
serialize_dword
(
pInfo
->
cipher_alg
,
&
ptr
);
/*TRACE("used %u\n",ptr-pSerial->pbData);*/
/*TRACE("used %u\n",ptr-pSerial->pbData);*/
/*
unknown1
*/
/*
cipher_key_len
*/
serialize_dword
(
pInfo
->
unknown1
,
&
ptr
);
serialize_dword
(
pInfo
->
cipher_key_len
,
&
ptr
);
/*TRACE("used %u\n",ptr-pSerial->pbData);*/
/*TRACE("used %u\n",ptr-pSerial->pbData);*/
/* data0 */
/* data0 */
...
@@ -304,11 +304,11 @@ BOOL serialize(const struct protect_data_t *pInfo, DATA_BLOB *pSerial)
...
@@ -304,11 +304,11 @@ BOOL serialize(const struct protect_data_t *pInfo, DATA_BLOB *pSerial)
serialize_dword
(
pInfo
->
null1
,
&
ptr
);
serialize_dword
(
pInfo
->
null1
,
&
ptr
);
/*TRACE("used %u\n",ptr-pSerial->pbData);*/
/*TRACE("used %u\n",ptr-pSerial->pbData);*/
/*
unknown2
*/
/*
hash_alg
*/
serialize_dword
(
pInfo
->
unknown2
,
&
ptr
);
serialize_dword
(
pInfo
->
hash_alg
,
&
ptr
);
/*TRACE("used %u\n",ptr-pSerial->pbData);*/
/*TRACE("used %u\n",ptr-pSerial->pbData);*/
/*
unknown3
*/
/*
hash_len
*/
serialize_dword
(
pInfo
->
unknown3
,
&
ptr
);
serialize_dword
(
pInfo
->
hash_len
,
&
ptr
);
/*TRACE("used %u\n",ptr-pSerial->pbData);*/
/*TRACE("used %u\n",ptr-pSerial->pbData);*/
/* salt */
/* salt */
...
@@ -401,17 +401,17 @@ BOOL unserialize(const DATA_BLOB *pSerial, struct protect_data_t *pInfo)
...
@@ -401,17 +401,17 @@ BOOL unserialize(const DATA_BLOB *pSerial, struct protect_data_t *pInfo)
return
FALSE
;
return
FALSE
;
}
}
/*
unknown0
*/
/*
cipher_alg
*/
if
(
!
unserialize_dword
(
ptr
,
&
index
,
size
,
&
pInfo
->
unknown0
))
if
(
!
unserialize_dword
(
ptr
,
&
index
,
size
,
&
pInfo
->
cipher_alg
))
{
{
ERR
(
"reading
unknown0
failed!
\n
"
);
ERR
(
"reading
cipher_alg
failed!
\n
"
);
return
FALSE
;
return
FALSE
;
}
}
/*
unknown1
*/
/*
cipher_key_len
*/
if
(
!
unserialize_dword
(
ptr
,
&
index
,
size
,
&
pInfo
->
unknown1
))
if
(
!
unserialize_dword
(
ptr
,
&
index
,
size
,
&
pInfo
->
cipher_key_len
))
{
{
ERR
(
"reading
unknown1
failed!
\n
"
);
ERR
(
"reading
cipher_key_len
failed!
\n
"
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -430,17 +430,17 @@ BOOL unserialize(const DATA_BLOB *pSerial, struct protect_data_t *pInfo)
...
@@ -430,17 +430,17 @@ BOOL unserialize(const DATA_BLOB *pSerial, struct protect_data_t *pInfo)
return
FALSE
;
return
FALSE
;
}
}
/*
unknown2
*/
/*
hash_alg
*/
if
(
!
unserialize_dword
(
ptr
,
&
index
,
size
,
&
pInfo
->
unknown2
))
if
(
!
unserialize_dword
(
ptr
,
&
index
,
size
,
&
pInfo
->
hash_alg
))
{
{
ERR
(
"reading
unknown2
failed!
\n
"
);
ERR
(
"reading
hash_alg
failed!
\n
"
);
return
FALSE
;
return
FALSE
;
}
}
/*
unknown3
*/
/*
hash_len
*/
if
(
!
unserialize_dword
(
ptr
,
&
index
,
size
,
&
pInfo
->
unknown3
))
if
(
!
unserialize_dword
(
ptr
,
&
index
,
size
,
&
pInfo
->
hash_len
))
{
{
ERR
(
"reading
unknown3
failed!
\n
"
);
ERR
(
"reading
hash_len
failed!
\n
"
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -596,14 +596,14 @@ BOOL fill_protect_data(struct protect_data_t * pInfo, LPCWSTR szDataDescr,
...
@@ -596,14 +596,14 @@ BOOL fill_protect_data(struct protect_data_t * pInfo, LPCWSTR szDataDescr,
memcpy
(
pInfo
->
szDataDescr
,
szDataDescr
,(
dwStrLen
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
pInfo
->
szDataDescr
,
szDataDescr
,(
dwStrLen
+
1
)
*
sizeof
(
WCHAR
));
}
}
pInfo
->
unknown0
=
0x0000
;
pInfo
->
cipher_alg
=
CRYPT32_PROTECTDATA_KEY_CALG
;
pInfo
->
unknown1
=
0x0000
;
pInfo
->
cipher_key_len
=
0x0000
;
/* FIXME: get correct value */
convert_str_to_blob
(
crypt_magic_str
,
&
pInfo
->
data0
);
convert_str_to_blob
(
crypt_magic_str
,
&
pInfo
->
data0
);
pInfo
->
null1
=
0x0000
;
pInfo
->
null1
=
0x0000
;
pInfo
->
unknown2
=
0x0000
;
pInfo
->
hash_alg
=
CRYPT32_PROTECTDATA_HASH_CALG
;
pInfo
->
unknown3
=
0x0000
;
pInfo
->
hash_len
=
0x0000
;
/* FIXME: get correct value */
/* allocate memory to hold a salt */
/* allocate memory to hold a salt */
pInfo
->
salt
.
cbData
=
CRYPT32_PROTECTDATA_SALT_LEN
;
pInfo
->
salt
.
cbData
=
CRYPT32_PROTECTDATA_SALT_LEN
;
...
...
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