linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Here's a nugget...
@ 2013-10-16 18:59 Myklebust, Trond
  2013-10-16 19:02 ` J. Bruce Fields
  0 siblings, 1 reply; 3+ messages in thread
From: Myklebust, Trond @ 2013-10-16 18:59 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Linux NFS mailing list

In gss_krb5_add_padding():

	memset(p, padding, padding);

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Here's a nugget...
  2013-10-16 18:59 Here's a nugget Myklebust, Trond
@ 2013-10-16 19:02 ` J. Bruce Fields
  2013-10-16 19:10   ` Myklebust, Trond
  0 siblings, 1 reply; 3+ messages in thread
From: J. Bruce Fields @ 2013-10-16 19:02 UTC (permalink / raw)
  To: Myklebust, Trond; +Cc: Linux NFS mailing list

On Wed, Oct 16, 2013 at 06:59:04PM +0000, Myklebust, Trond wrote:
> In gss_krb5_add_padding():
> 
> 	memset(p, padding, padding);

RFC 1964 1.2.2.3:

	"Data padding: Before encryption and/or signature calculation,
	plaintext data is padded to the next highest multiple of 8
	bytes, by appending between 1 and 8 bytes, the value of each
	such byte being the total number of pad bytes."

You could add a comment referencing that if you think the memset is
confusing.

--b.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Here's a nugget...
  2013-10-16 19:02 ` J. Bruce Fields
@ 2013-10-16 19:10   ` Myklebust, Trond
  0 siblings, 0 replies; 3+ messages in thread
From: Myklebust, Trond @ 2013-10-16 19:10 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Linux NFS mailing list

On Wed, 2013-10-16 at 15:02 -0400, J. Bruce Fields wrote:
> On Wed, Oct 16, 2013 at 06:59:04PM +0000, Myklebust, Trond wrote:
> > In gss_krb5_add_padding():
> > 
> > 	memset(p, padding, padding);
> 
> RFC 1964 1.2.2.3:
> 
> 	"Data padding: Before encryption and/or signature calculation,
> 	plaintext data is padded to the next highest multiple of 8
> 	bytes, by appending between 1 and 8 bytes, the value of each
> 	such byte being the total number of pad bytes."
> 
> You could add a comment referencing that if you think the memset is
> confusing.

Wow... In which bar did they hold that IETF meeting?

Definitely needs a comment.

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-16 19:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-16 18:59 Here's a nugget Myklebust, Trond
2013-10-16 19:02 ` J. Bruce Fields
2013-10-16 19:10   ` Myklebust, Trond

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).