File tree Expand file tree Collapse file tree 5 files changed +2
-47
lines changed Expand file tree Collapse file tree 5 files changed +2
-47
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,7 @@ config CIFS
55 select NLS
66 select NLS_UCS2_UTILS
77 select CRYPTO
8- select CRYPTO_MD5
9- select CRYPTO_SHA256
10- select CRYPTO_SHA512
118 select CRYPTO_CMAC
12- select CRYPTO_HMAC
139 select CRYPTO_AEAD2
1410 select CRYPTO_CCM
1511 select CRYPTO_GCM
Original file line number Diff line number Diff line change 693693cifs_crypto_secmech_release (struct TCP_Server_Info * server )
694694{
695695 cifs_free_hash (& server -> secmech .aes_cmac );
696- cifs_free_hash (& server -> secmech .hmacsha256 );
697- cifs_free_hash (& server -> secmech .md5 );
698- cifs_free_hash (& server -> secmech .sha512 );
699696
700697 if (server -> secmech .enc ) {
701698 crypto_free_aead (server -> secmech .enc );
Original file line number Diff line number Diff line change @@ -2139,13 +2139,9 @@ MODULE_DESCRIPTION
21392139 "also older servers complying with the SNIA CIFS Specification)" );
21402140MODULE_VERSION (CIFS_VERSION );
21412141MODULE_SOFTDEP ("ecb" );
2142- MODULE_SOFTDEP ("hmac" );
2143- MODULE_SOFTDEP ("md5" );
21442142MODULE_SOFTDEP ("nls" );
21452143MODULE_SOFTDEP ("aes" );
21462144MODULE_SOFTDEP ("cmac" );
2147- MODULE_SOFTDEP ("sha256" );
2148- MODULE_SOFTDEP ("sha512" );
21492145MODULE_SOFTDEP ("aead2" );
21502146MODULE_SOFTDEP ("ccm" );
21512147MODULE_SOFTDEP ("gcm" );
Original file line number Diff line number Diff line change @@ -222,9 +222,6 @@ struct session_key {
222222
223223/* crypto hashing related structure/fields, not specific to a sec mech */
224224struct cifs_secmech {
225- struct shash_desc * md5 ; /* md5 hash function, for CIFS/SMB1 signatures */
226- struct shash_desc * hmacsha256 ; /* hmac-sha256 hash function, for SMB2 signatures */
227- struct shash_desc * sha512 ; /* sha512 hash function, for SMB3.1.1 preauth hash */
228225 struct shash_desc * aes_cmac ; /* block-cipher based MAC function, for SMB3 signatures */
229226
230227 struct crypto_aead * enc ; /* smb3 encryption AEAD TFM (AES-CCM and AES-GCM) */
Original file line number Diff line number Diff line change @@ -31,49 +31,18 @@ static int
3131smb3_crypto_shash_allocate (struct TCP_Server_Info * server )
3232{
3333 struct cifs_secmech * p = & server -> secmech ;
34- int rc ;
35-
36- rc = cifs_alloc_hash ("hmac(sha256)" , & p -> hmacsha256 );
37- if (rc )
38- goto err ;
39-
40- rc = cifs_alloc_hash ("cmac(aes)" , & p -> aes_cmac );
41- if (rc )
42- goto err ;
4334
44- return 0 ;
45- err :
46- cifs_free_hash (& p -> hmacsha256 );
47- return rc ;
35+ return cifs_alloc_hash ("cmac(aes)" , & p -> aes_cmac );
4836}
4937
5038int
5139smb311_crypto_shash_allocate (struct TCP_Server_Info * server )
5240{
5341 struct cifs_secmech * p = & server -> secmech ;
54- int rc = 0 ;
5542
56- rc = cifs_alloc_hash ("hmac(sha256)" , & p -> hmacsha256 );
57- if (rc )
58- return rc ;
59-
60- rc = cifs_alloc_hash ("cmac(aes)" , & p -> aes_cmac );
61- if (rc )
62- goto err ;
63-
64- rc = cifs_alloc_hash ("sha512" , & p -> sha512 );
65- if (rc )
66- goto err ;
67-
68- return 0 ;
69-
70- err :
71- cifs_free_hash (& p -> aes_cmac );
72- cifs_free_hash (& p -> hmacsha256 );
73- return rc ;
43+ return cifs_alloc_hash ("cmac(aes)" , & p -> aes_cmac );
7444}
7545
76-
7746static
7847int smb3_get_sign_key (__u64 ses_id , struct TCP_Server_Info * server , u8 * key )
7948{
You can’t perform that action at this time.
0 commit comments