Lines Matching refs:secmech

48 	if (server->secmech.sdeschmacsha256 != NULL)  in smb2_crypto_shash_allocate()
51 server->secmech.hmacsha256 = crypto_alloc_shash("hmac(sha256)", 0, 0); in smb2_crypto_shash_allocate()
52 if (IS_ERR(server->secmech.hmacsha256)) { in smb2_crypto_shash_allocate()
54 rc = PTR_ERR(server->secmech.hmacsha256); in smb2_crypto_shash_allocate()
55 server->secmech.hmacsha256 = NULL; in smb2_crypto_shash_allocate()
60 crypto_shash_descsize(server->secmech.hmacsha256); in smb2_crypto_shash_allocate()
61 server->secmech.sdeschmacsha256 = kmalloc(size, GFP_KERNEL); in smb2_crypto_shash_allocate()
62 if (!server->secmech.sdeschmacsha256) { in smb2_crypto_shash_allocate()
63 crypto_free_shash(server->secmech.hmacsha256); in smb2_crypto_shash_allocate()
64 server->secmech.hmacsha256 = NULL; in smb2_crypto_shash_allocate()
67 server->secmech.sdeschmacsha256->shash.tfm = server->secmech.hmacsha256; in smb2_crypto_shash_allocate()
68 server->secmech.sdeschmacsha256->shash.flags = 0x0; in smb2_crypto_shash_allocate()
79 if (server->secmech.sdesccmacaes != NULL) in smb3_crypto_shash_allocate()
86 server->secmech.cmacaes = crypto_alloc_shash("cmac(aes)", 0, 0); in smb3_crypto_shash_allocate()
87 if (IS_ERR(server->secmech.cmacaes)) { in smb3_crypto_shash_allocate()
89 kfree(server->secmech.sdeschmacsha256); in smb3_crypto_shash_allocate()
90 server->secmech.sdeschmacsha256 = NULL; in smb3_crypto_shash_allocate()
91 crypto_free_shash(server->secmech.hmacsha256); in smb3_crypto_shash_allocate()
92 server->secmech.hmacsha256 = NULL; in smb3_crypto_shash_allocate()
93 rc = PTR_ERR(server->secmech.cmacaes); in smb3_crypto_shash_allocate()
94 server->secmech.cmacaes = NULL; in smb3_crypto_shash_allocate()
99 crypto_shash_descsize(server->secmech.cmacaes); in smb3_crypto_shash_allocate()
100 server->secmech.sdesccmacaes = kmalloc(size, GFP_KERNEL); in smb3_crypto_shash_allocate()
101 if (!server->secmech.sdesccmacaes) { in smb3_crypto_shash_allocate()
103 kfree(server->secmech.sdeschmacsha256); in smb3_crypto_shash_allocate()
104 server->secmech.sdeschmacsha256 = NULL; in smb3_crypto_shash_allocate()
105 crypto_free_shash(server->secmech.hmacsha256); in smb3_crypto_shash_allocate()
106 crypto_free_shash(server->secmech.cmacaes); in smb3_crypto_shash_allocate()
107 server->secmech.hmacsha256 = NULL; in smb3_crypto_shash_allocate()
108 server->secmech.cmacaes = NULL; in smb3_crypto_shash_allocate()
111 server->secmech.sdesccmacaes->shash.tfm = server->secmech.cmacaes; in smb3_crypto_shash_allocate()
112 server->secmech.sdesccmacaes->shash.flags = 0x0; in smb3_crypto_shash_allocate()
161 rc = crypto_shash_setkey(server->secmech.hmacsha256, in smb2_calc_signature()
168 rc = crypto_shash_init(&server->secmech.sdeschmacsha256->shash); in smb2_calc_signature()
190 &server->secmech.sdeschmacsha256->shash, in smb2_calc_signature()
195 &server->secmech.sdeschmacsha256->shash, in smb2_calc_signature()
210 crypto_shash_update(&server->secmech.sdeschmacsha256->shash, in smb2_calc_signature()
215 rc = crypto_shash_final(&server->secmech.sdeschmacsha256->shash, in smb2_calc_signature()
244 rc = crypto_shash_setkey(ses->server->secmech.hmacsha256, in generate_smb3signingkey()
251 rc = crypto_shash_init(&ses->server->secmech.sdeschmacsha256->shash); in generate_smb3signingkey()
257 rc = crypto_shash_update(&ses->server->secmech.sdeschmacsha256->shash, in generate_smb3signingkey()
264 rc = crypto_shash_update(&ses->server->secmech.sdeschmacsha256->shash, in generate_smb3signingkey()
271 rc = crypto_shash_update(&ses->server->secmech.sdeschmacsha256->shash, in generate_smb3signingkey()
278 rc = crypto_shash_update(&ses->server->secmech.sdeschmacsha256->shash, in generate_smb3signingkey()
285 rc = crypto_shash_update(&ses->server->secmech.sdeschmacsha256->shash, in generate_smb3signingkey()
292 rc = crypto_shash_final(&ses->server->secmech.sdeschmacsha256->shash, in generate_smb3signingkey()
326 rc = crypto_shash_setkey(server->secmech.cmacaes, in smb3_calc_signature()
339 rc = crypto_shash_init(&server->secmech.sdesccmacaes->shash); in smb3_calc_signature()
361 &server->secmech.sdesccmacaes->shash, in smb3_calc_signature()
366 &server->secmech.sdesccmacaes->shash, in smb3_calc_signature()
381 crypto_shash_update(&server->secmech.sdesccmacaes->shash, in smb3_calc_signature()
386 rc = crypto_shash_final(&server->secmech.sdesccmacaes->shash, in smb3_calc_signature()