Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jul 2012 17:43:25 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r238114 - head/sys/geom/eli
Message-ID:  <201207041743.q64HhP7P023888@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Wed Jul  4 17:43:25 2012
New Revision: 238114
URL: http://svn.freebsd.org/changeset/base/238114

Log:
  Correct a comment and correct style of a flag check.
  
  MFC after:	3 days

Modified:
  head/sys/geom/eli/g_eli_key.c

Modified: head/sys/geom/eli/g_eli_key.c
==============================================================================
--- head/sys/geom/eli/g_eli_key.c	Wed Jul  4 17:39:29 2012	(r238113)
+++ head/sys/geom/eli/g_eli_key.c	Wed Jul  4 17:43:25 2012	(r238114)
@@ -197,7 +197,7 @@ g_eli_mkey_propagate(struct g_eli_softc 
 	mkey += sizeof(sc->sc_ivkey);
 
 	/*
-	 * The authentication key is: akey = HMAC_SHA512(Master-Key, 0x11)
+	 * The authentication key is: akey = HMAC_SHA512(Data-Key, 0x11)
 	 */
 	if ((sc->sc_flags & G_ELI_FLAG_AUTH) != 0) {
 		g_eli_crypto_hmac(mkey, G_ELI_MAXKEYLEN, "\x11", 1,
@@ -209,7 +209,7 @@ g_eli_mkey_propagate(struct g_eli_softc 
 	/* Initialize encryption keys. */
 	g_eli_key_init(sc);
 
-	if (sc->sc_flags & G_ELI_FLAG_AUTH) {
+	if ((sc->sc_flags & G_ELI_FLAG_AUTH) != 0) {
 		/*
 		 * Precalculate SHA256 for HMAC key generation.
 		 * This is expensive operation and we can do it only once now or



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207041743.q64HhP7P023888>