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
7f3c35db
Commit
7f3c35db
authored
Feb 10, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dssenh: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f72d53fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
29 deletions
+28
-29
Makefile.in
dlls/dssenh/Makefile.in
+0
-1
main.c
dlls/dssenh/main.c
+28
-28
No files found.
dlls/dssenh/Makefile.in
View file @
7f3c35db
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
dssenh.dll
IMPORTS
=
bcrypt crypt32 advapi32
...
...
dlls/dssenh/main.c
View file @
7f3c35db
...
...
@@ -131,7 +131,7 @@ static const WCHAR *map_keyspec_to_keypair_name( DWORD keyspec )
name
=
L"SignatureKeyPair"
;
break
;
default:
ERR
(
"invalid key spec %u
\n
"
,
keyspec
);
ERR
(
"invalid key spec %
l
u
\n
"
,
keyspec
);
return
NULL
;
}
return
name
;
...
...
@@ -267,7 +267,7 @@ BOOL WINAPI CPAcquireContext( HCRYPTPROV *ret_prov, LPSTR container, DWORD flags
struct
container
*
ret
;
char
name
[
MAX_PATH
];
TRACE
(
"%p, %s, %08x, %p
\n
"
,
ret_prov
,
debugstr_a
(
container
),
flags
,
vtable
);
TRACE
(
"%p, %s, %08
l
x, %p
\n
"
,
ret_prov
,
debugstr_a
(
container
),
flags
,
vtable
);
if
(
container
&&
*
container
)
{
...
...
@@ -311,7 +311,7 @@ BOOL WINAPI CPAcquireContext( HCRYPTPROV *ret_prov, LPSTR container, DWORD flags
return
TRUE
;
default:
FIXME
(
"unsupported flags %08x
\n
"
,
flags
);
FIXME
(
"unsupported flags %08
l
x
\n
"
,
flags
);
return
FALSE
;
}
...
...
@@ -324,7 +324,7 @@ BOOL WINAPI CPReleaseContext( HCRYPTPROV hprov, DWORD flags )
{
struct
container
*
container
=
(
struct
container
*
)
hprov
;
TRACE
(
"%p, %08x
\n
"
,
(
void
*
)
hprov
,
flags
);
TRACE
(
"%p, %08
l
x
\n
"
,
(
void
*
)
hprov
,
flags
);
if
(
container
->
magic
!=
MAGIC_CONTAINER
)
return
FALSE
;
destroy_container
(
container
);
...
...
@@ -407,13 +407,13 @@ static BOOL generate_key( struct container *container, ALG_ID algid, DWORD bitle
if
((
status
=
BCryptGenerateKeyPair
(
key
->
alg_handle
,
&
key
->
handle
,
bitlen
,
0
)))
{
ERR
(
"failed to generate key %08x
\n
"
,
status
);
ERR
(
"failed to generate key %08
l
x
\n
"
,
status
);
destroy_key
(
key
);
return
FALSE
;
}
if
((
status
=
BCryptFinalizeKeyPair
(
key
->
handle
,
0
)))
{
ERR
(
"failed to finalize key %08x
\n
"
,
status
);
ERR
(
"failed to finalize key %08
l
x
\n
"
,
status
);
destroy_key
(
key
);
return
FALSE
;
}
...
...
@@ -448,7 +448,7 @@ BOOL WINAPI CPGenKey( HCRYPTPROV hprov, ALG_ID algid, DWORD flags, HCRYPTKEY *re
struct
container
*
container
=
(
struct
container
*
)
hprov
;
ULONG
i
,
bitlen
=
HIWORD
(
flags
)
?
HIWORD
(
flags
)
:
1024
;
TRACE
(
"%p, %08x, %08x, %p
\n
"
,
(
void
*
)
hprov
,
algid
,
flags
,
ret_key
);
TRACE
(
"%p, %08x, %08
l
x, %p
\n
"
,
(
void
*
)
hprov
,
algid
,
flags
,
ret_key
);
if
(
container
->
magic
!=
MAGIC_CONTAINER
)
return
FALSE
;
...
...
@@ -512,7 +512,7 @@ static BOOL import_key_dss2( struct container *container, ALG_ID algid, const BY
break
;
default:
FIXME
(
"unsupported key magic %08x
\n
"
,
pubkey
->
magic
);
FIXME
(
"unsupported key magic %08
l
x
\n
"
,
pubkey
->
magic
);
return
FALSE
;
}
...
...
@@ -520,7 +520,7 @@ static BOOL import_key_dss2( struct container *container, ALG_ID algid, const BY
if
((
status
=
BCryptImportKeyPair
(
key
->
alg_handle
,
NULL
,
type
,
&
key
->
handle
,
(
UCHAR
*
)
data
,
len
,
0
)))
{
TRACE
(
"failed to import key %08x
\n
"
,
status
);
TRACE
(
"failed to import key %08
l
x
\n
"
,
status
);
destroy_key
(
key
);
return
FALSE
;
}
...
...
@@ -583,7 +583,7 @@ static BOOL import_key_dss3( struct container *container, ALG_ID algid, const BY
break
;
default:
FIXME
(
"unsupported key magic %08x
\n
"
,
pubkey
->
magic
);
FIXME
(
"unsupported key magic %08
l
x
\n
"
,
pubkey
->
magic
);
return
FALSE
;
}
...
...
@@ -628,7 +628,7 @@ static BOOL import_key_dss3( struct container *container, ALG_ID algid, const BY
if
((
status
=
BCryptImportKeyPair
(
key
->
alg_handle
,
NULL
,
BCRYPT_DSA_PUBLIC_BLOB
,
&
key
->
handle
,
(
UCHAR
*
)
blob
,
size
,
0
)))
{
WARN
(
"failed to import key %08x
\n
"
,
status
);
WARN
(
"failed to import key %08
l
x
\n
"
,
status
);
destroy_key
(
key
);
heap_free
(
blob
);
return
FALSE
;
...
...
@@ -646,7 +646,7 @@ BOOL WINAPI CPImportKey( HCRYPTPROV hprov, const BYTE *data, DWORD len, HCRYPTKE
const
BLOBHEADER
*
hdr
;
BOOL
ret
;
TRACE
(
"%p, %p, %
u, %p, %08
x, %p
\n
"
,
(
void
*
)
hprov
,
data
,
len
,
(
void
*
)
hpubkey
,
flags
,
ret_key
);
TRACE
(
"%p, %p, %
lu, %p, %08l
x, %p
\n
"
,
(
void
*
)
hprov
,
data
,
len
,
(
void
*
)
hpubkey
,
flags
,
ret_key
);
if
(
container
->
magic
!=
MAGIC_CONTAINER
)
return
FALSE
;
if
(
len
<
sizeof
(
*
hdr
))
return
FALSE
;
...
...
@@ -682,7 +682,7 @@ BOOL WINAPI CPExportKey( HCRYPTPROV hprov, HCRYPTKEY hkey, HCRYPTKEY hexpkey, DW
struct
key
*
key
=
(
struct
key
*
)
hkey
;
const
WCHAR
*
type
;
TRACE
(
"%p, %p, %p, %08
x, %08
x, %p, %p
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hkey
,
(
void
*
)
hexpkey
,
blobtype
,
flags
,
TRACE
(
"%p, %p, %p, %08
lx, %08l
x, %p, %p
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hkey
,
(
void
*
)
hexpkey
,
blobtype
,
flags
,
data
,
len
);
if
(
key
->
magic
!=
MAGIC_KEY
)
return
FALSE
;
...
...
@@ -693,7 +693,7 @@ BOOL WINAPI CPExportKey( HCRYPTPROV hprov, HCRYPTKEY hkey, HCRYPTKEY hexpkey, DW
}
if
(
flags
)
{
FIXME
(
"flags %08x not supported
\n
"
,
flags
);
FIXME
(
"flags %08
l
x not supported
\n
"
,
flags
);
return
FALSE
;
}
...
...
@@ -708,7 +708,7 @@ BOOL WINAPI CPExportKey( HCRYPTPROV hprov, HCRYPTKEY hkey, HCRYPTKEY hexpkey, DW
break
;
default:
FIXME
(
"blob type %u not supported
\n
"
,
blobtype
);
FIXME
(
"blob type %
l
u not supported
\n
"
,
blobtype
);
return
FALSE
;
}
...
...
@@ -719,7 +719,7 @@ BOOL WINAPI CPDuplicateKey( HCRYPTPROV hprov, HCRYPTKEY hkey, DWORD *reserved, D
{
struct
key
*
key
=
(
struct
key
*
)
hkey
,
*
ret
;
TRACE
(
"%p, %p, %p, %08x, %p
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hkey
,
reserved
,
flags
,
ret_key
);
TRACE
(
"%p, %p, %p, %08
l
x, %p
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hkey
,
reserved
,
flags
,
ret_key
);
if
(
key
->
magic
!=
MAGIC_KEY
)
return
FALSE
;
...
...
@@ -733,7 +733,7 @@ BOOL WINAPI CPGetUserKey( HCRYPTPROV hprov, DWORD keyspec, HCRYPTKEY *ret_key )
struct
container
*
container
=
(
struct
container
*
)
hprov
;
BOOL
ret
=
FALSE
;
TRACE
(
"%p, %08x, %p
\n
"
,
(
void
*
)
hprov
,
keyspec
,
ret_key
);
TRACE
(
"%p, %08
l
x, %p
\n
"
,
(
void
*
)
hprov
,
keyspec
,
ret_key
);
if
(
container
->
magic
!=
MAGIC_CONTAINER
)
return
FALSE
;
...
...
@@ -761,7 +761,7 @@ BOOL WINAPI CPGenRandom( HCRYPTPROV hprov, DWORD len, BYTE *buffer )
{
struct
container
*
container
=
(
struct
container
*
)
hprov
;
TRACE
(
"%p, %u, %p
\n
"
,
(
void
*
)
hprov
,
len
,
buffer
);
TRACE
(
"%p, %
l
u, %p
\n
"
,
(
void
*
)
hprov
,
len
,
buffer
);
if
(
container
->
magic
!=
MAGIC_CONTAINER
)
return
FALSE
;
...
...
@@ -816,7 +816,7 @@ BOOL WINAPI CPCreateHash( HCRYPTPROV hprov, ALG_ID algid, HCRYPTKEY hkey, DWORD
{
struct
hash
*
hash
;
TRACE
(
"%p, %08x, %p, %08x, %p
\n
"
,
(
void
*
)
hprov
,
algid
,
(
void
*
)
hkey
,
flags
,
ret_hash
);
TRACE
(
"%p, %08x, %p, %08
l
x, %p
\n
"
,
(
void
*
)
hprov
,
algid
,
(
void
*
)
hkey
,
flags
,
ret_hash
);
switch
(
algid
)
{
...
...
@@ -882,7 +882,7 @@ BOOL WINAPI CPDuplicateHash( HCRYPTPROV hprov, HCRYPTHASH hhash, DWORD *reserved
{
struct
hash
*
hash
=
(
struct
hash
*
)
hhash
,
*
ret
;
TRACE
(
"%p, %p, %p, %08x, %p
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hhash
,
reserved
,
flags
,
ret_hash
);
TRACE
(
"%p, %p, %p, %08
l
x, %p
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hhash
,
reserved
,
flags
,
ret_hash
);
if
(
hash
->
magic
!=
MAGIC_HASH
)
return
FALSE
;
...
...
@@ -895,7 +895,7 @@ BOOL WINAPI CPHashData( HCRYPTPROV hprov, HCRYPTHASH hhash, const BYTE *data, DW
{
struct
hash
*
hash
=
(
struct
hash
*
)
hhash
;
TRACE
(
"%p, %p, %p, %
u, %08
x
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hhash
,
data
,
len
,
flags
);
TRACE
(
"%p, %p, %p, %
lu, %08l
x
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hhash
,
data
,
len
,
flags
);
if
(
hash
->
magic
!=
MAGIC_HASH
)
return
FALSE
;
...
...
@@ -911,7 +911,7 @@ BOOL WINAPI CPGetHashParam( HCRYPTPROV hprov, HCRYPTHASH hhash, DWORD param, BYT
{
struct
hash
*
hash
=
(
struct
hash
*
)
hhash
;
TRACE
(
"%p, %p, %08
x, %p, %p, %08
x
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hhash
,
param
,
data
,
len
,
flags
);
TRACE
(
"%p, %p, %08
lx, %p, %p, %08l
x
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hhash
,
param
,
data
,
len
,
flags
);
if
(
hash
->
magic
!=
MAGIC_HASH
)
return
FALSE
;
...
...
@@ -954,7 +954,7 @@ BOOL WINAPI CPSetHashParam( HCRYPTPROV hprov, HCRYPTHASH hhash, DWORD param, con
{
struct
hash
*
hash
=
(
struct
hash
*
)
hhash
;
TRACE
(
"%p, %p, %08
x, %p, %08
x
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hhash
,
param
,
data
,
flags
);
TRACE
(
"%p, %p, %08
lx, %p, %08l
x
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hhash
,
param
,
data
,
flags
);
if
(
hash
->
magic
!=
MAGIC_HASH
)
return
FALSE
;
...
...
@@ -965,7 +965,7 @@ BOOL WINAPI CPSetHashParam( HCRYPTPROV hprov, HCRYPTHASH hhash, DWORD param, con
return
TRUE
;
default:
FIXME
(
"param %u not supported
\n
"
,
param
);
FIXME
(
"param %
l
u not supported
\n
"
,
param
);
SetLastError
(
NTE_BAD_TYPE
);
return
FALSE
;
}
...
...
@@ -983,7 +983,7 @@ static DWORD get_signature_length( DWORD algid )
case
AT_SIGNATURE
:
case
CALG_DSS_SIGN
:
return
40
;
default:
FIXME
(
"unhandled algorithm %u
\n
"
,
algid
);
FIXME
(
"unhandled algorithm %
l
u
\n
"
,
algid
);
return
0
;
}
}
...
...
@@ -996,7 +996,7 @@ BOOL WINAPI CPSignHash( HCRYPTPROV hprov, HCRYPTHASH hhash, DWORD keyspec, const
struct
hash
*
hash
=
(
struct
hash
*
)
hhash
;
ULONG
len
;
TRACE
(
"%p, %p, %
u, %s, %08
x, %p, %p
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hhash
,
keyspec
,
debugstr_w
(
desc
),
flags
,
sig
,
TRACE
(
"%p, %p, %
lu, %s, %08l
x, %p, %p
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hhash
,
keyspec
,
debugstr_w
(
desc
),
flags
,
sig
,
siglen
);
if
(
container
->
magic
!=
MAGIC_CONTAINER
||
!
container
->
sign_key
)
return
FALSE
;
...
...
@@ -1018,13 +1018,13 @@ BOOL WINAPI CPVerifySignature( HCRYPTPROV hprov, HCRYPTHASH hhash, const BYTE *s
struct
hash
*
hash
=
(
struct
hash
*
)
hhash
;
struct
key
*
key
=
(
struct
key
*
)
hpubkey
;
TRACE
(
"%p, %p, %p, %
u %p, %s, %08
x
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hhash
,
sig
,
siglen
,
(
void
*
)
hpubkey
,
TRACE
(
"%p, %p, %p, %
lu %p, %s, %08l
x
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hhash
,
sig
,
siglen
,
(
void
*
)
hpubkey
,
debugstr_w
(
desc
),
flags
);
if
(
hash
->
magic
!=
MAGIC_HASH
||
key
->
magic
!=
MAGIC_KEY
)
return
FALSE
;
if
(
flags
)
{
FIXME
(
"flags %08x not supported
\n
"
,
flags
);
FIXME
(
"flags %08
l
x not supported
\n
"
,
flags
);
return
FALSE
;
}
...
...
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