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

Herbert Xu herbert at gondor.apana.org.au
Mon Aug 2 00:55:08 MDT 2010


shirishpargaonkar at gmail.com wrote:
>
> static int cifs_calculate_signature(const struct smb_hdr *cifs_pdu,
> -                                   const struct mac_key *key, char *signature)
> +                       struct TCP_Server_Info *server, char *signature)
> {
> -       struct  MD5Context context;
> +       int rc = 0;
> +       struct scatterlist sgin[2];
> +       struct hash_desc desc;
> 
> -       if ((cifs_pdu == NULL) || (signature == NULL) || (key == NULL))
> +       if (cifs_pdu == NULL || server == NULL || signature == NULL)
>                return -EINVAL;
> 
> -       cifs_MD5_init(&context);
> -       cifs_MD5_update(&context, (char *)&key->data, key->len);
> -       cifs_MD5_update(&context, cifs_pdu->Protocol, cifs_pdu->smb_buf_length);
> +       desc.tfm = server->ntlmssp.tfm_md5;
> +
> +       rc = crypto_hash_init(&desc);

We're phasing out the crypto_hash_* interface.  Please use the
equivalent crypto_shash_* interface (or if you require access
to asynchronous hardware, the crypto_ahash_* interface).

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