[linux-cifs-client][PATCH] Enable signing for ntlmv2 within NTLMSSP using kernel crypto APIs

Herbert Xu herbert at gondor.apana.org.au
Tue Aug 3 02:33:30 MDT 2010


On Mon, Aug 02, 2010 at 11:46:07PM -0500, Shirish Pargaonkar wrote:
>
> I have compile issues with crypto_shash interfaces, no such issues
> with crypto_hash_ APIs,
> everything works fine.
> 
> When I have code like this, I have errors and warning and when I cast
> them as (char *),  module
> oopses.
> 
> struct session_key {
>         unsigned int len;
>         union {
>                 char ntlm[CIFS_SESS_KEY_SIZE + 16];
>                 char krb5[CIFS_SESS_KEY_SIZE + 16]; /* BB: length correct? */
>                 struct {
>                         char key[16];
>                         struct ntlmv2_resp resp;
>                 } ntlmv2;
>         } data;
> };
>         if (server->secType == RawNTLMSSP)
>                 crypto_shash_update(&desc, server->session_key.data.ntlmv2.key,
>                                 CIFS_NTLMV2_SESSKEY_SIZE);
>         else
>                 crypto_shash_update(&desc, server->session_key.data,
>           <----
>                                 server->session_key.len);
> 
> 
> And
>         len = cifs_strtoUCS((__le16 *)user, ses->userName, len, nls_cp);
>         UniStrupr(user);
> 
>         crypto_shash_update(&desc, user, 2 * len);
>                          <----
> 
> No such issues and oops with crypto_hash_APIs.

Please post your entire patch with shash and the oops.

Thanks,
-- 
Email: Herbert Xu <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


More information about the samba-technical mailing list