Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: [linux-cifs-client][PATCH] Enable signing for ntlmv2 within NTLMSSP using kernel crypto APIs
Date: Wed, 4 Aug 2010 14:58:41 +0800	[thread overview]
Message-ID: <20100804065841.GA370@gondor.apana.org.au> (raw)
In-Reply-To: <AANLkTimE0CgvYtrTSxsL5Z-kg5C9k9Lf3pDmW8gkRg7S@mail.gmail.com>

On Tue, Aug 03, 2010 at 09:48:14PM -0500, Shirish Pargaonkar wrote:
>
> @@ -42,21 +43,38 @@ extern void SMBencrypt(unsigned char *passwd, const unsigned char *c8,
>  		       unsigned char *p24);
>  
>  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 shash_desc desc;

That's your problem.  You need to allocate space for the actual
descriptor:

	struct {
		struct shash_desc shash;
		char ctx[crypto_shash_descsize(tfm)];
	} sdesc;

See crypto/testmgr.c for an actual example.

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

      parent reply	other threads:[~2010-08-04  6:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-31 19:34 [linux-cifs-client][PATCH] Enable signing for ntlmv2 within NTLMSSP using kernel crypto APIs shirishpargaonkar
2010-08-02  6:55 ` Herbert Xu
     [not found]   ` <20100802065508.GA8431-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2010-08-03  4:46     ` Shirish Pargaonkar
2010-08-03  8:33       ` Herbert Xu
     [not found]         ` <AANLkTimE0CgvYtrTSxsL5Z-kg5C9k9Lf3pDmW8gkRg7S@mail.gmail.com>
2010-08-04  6:58           ` Herbert Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100804065841.GA370@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=shirishpargaonkar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox