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
dedbd188
Commit
dedbd188
authored
Jun 16, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Use gnutls_cipher_get_block_size to get cupher block size.
parent
3617e2b2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
33 deletions
+3
-33
schannel_gnutls.c
dlls/secur32/schannel_gnutls.c
+3
-33
No files found.
dlls/secur32/schannel_gnutls.c
View file @
dedbd188
...
...
@@ -49,6 +49,7 @@ MAKE_FUNCPTR(gnutls_certificate_allocate_credentials);
MAKE_FUNCPTR
(
gnutls_certificate_free_credentials
);
MAKE_FUNCPTR
(
gnutls_certificate_get_peers
);
MAKE_FUNCPTR
(
gnutls_cipher_get
);
MAKE_FUNCPTR
(
gnutls_cipher_get_block_size
);
MAKE_FUNCPTR
(
gnutls_cipher_get_key_size
);
MAKE_FUNCPTR
(
gnutls_credentials_set
);
MAKE_FUNCPTR
(
gnutls_deinit
);
...
...
@@ -239,37 +240,6 @@ SECURITY_STATUS schan_imp_handshake(schan_imp_session session)
return
SEC_E_OK
;
}
static
unsigned
int
schannel_get_cipher_block_size
(
gnutls_cipher_algorithm_t
cipher
)
{
const
struct
{
gnutls_cipher_algorithm_t
cipher
;
unsigned
int
block_size
;
}
algorithms
[]
=
{
{
GNUTLS_CIPHER_3DES_CBC
,
8
},
{
GNUTLS_CIPHER_AES_128_CBC
,
16
},
{
GNUTLS_CIPHER_AES_256_CBC
,
16
},
{
GNUTLS_CIPHER_ARCFOUR_128
,
1
},
{
GNUTLS_CIPHER_ARCFOUR_40
,
1
},
{
GNUTLS_CIPHER_DES_CBC
,
8
},
{
GNUTLS_CIPHER_NULL
,
1
},
{
GNUTLS_CIPHER_RC2_40_CBC
,
8
},
};
unsigned
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
algorithms
)
/
sizeof
(
*
algorithms
);
++
i
)
{
if
(
algorithms
[
i
].
cipher
==
cipher
)
return
algorithms
[
i
].
block_size
;
}
FIXME
(
"Unknown cipher %#x, returning 1
\n
"
,
cipher
);
return
1
;
}
static
DWORD
schannel_get_protocol
(
gnutls_protocol_t
proto
)
{
/* FIXME: currently schannel only implements client connections, but
...
...
@@ -343,8 +313,7 @@ static ALG_ID schannel_get_kx_algid(gnutls_kx_algorithm_t kx)
unsigned
int
schan_imp_get_session_cipher_block_size
(
schan_imp_session
session
)
{
gnutls_session_t
s
=
(
gnutls_session_t
)
session
;
gnutls_cipher_algorithm_t
cipher
=
pgnutls_cipher_get
(
s
);
return
schannel_get_cipher_block_size
(
cipher
);
return
pgnutls_cipher_get_block_size
(
pgnutls_cipher_get
(
s
));
}
unsigned
int
schan_imp_get_max_message_size
(
schan_imp_session
session
)
...
...
@@ -502,6 +471,7 @@ BOOL schan_imp_init(void)
LOAD_FUNCPTR
(
gnutls_certificate_free_credentials
)
LOAD_FUNCPTR
(
gnutls_certificate_get_peers
)
LOAD_FUNCPTR
(
gnutls_cipher_get
)
LOAD_FUNCPTR
(
gnutls_cipher_get_block_size
)
LOAD_FUNCPTR
(
gnutls_cipher_get_key_size
)
LOAD_FUNCPTR
(
gnutls_credentials_set
)
LOAD_FUNCPTR
(
gnutls_deinit
)
...
...
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