Date: Fri, 7 Nov 2014 21:26:13 GMT From: John-Mark Gurney <jmg@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 1202624 for review Message-ID: <201411072126.sA7LQD4u036357@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@1202624?ac=10 Change 1202624 by jmg@jmg_carbon2 on 2014/11/07 21:25:16 remove some debugging... Affected files ... .. //depot/projects/opencrypto/sys/crypto/aesni/aesni.c#13 edit Differences ... ==== //depot/projects/opencrypto/sys/crypto/aesni/aesni.c#13 (text+ko) ==== @@ -443,17 +443,6 @@ return (error); } -#if 0 -static void -printhexstr(uint8_t *ptr, int len) -{ - int i; - - for (i = 0; i < len; i++) - printf("%02hhx", ptr[i]); -} -#endif - /* * authcrd contains the associated date. */ @@ -517,7 +506,6 @@ /* Setup ses->iv */ bzero(ses->iv, sizeof ses->iv); - /*printf("crd_flags: %#x, ivlen: %d, iv: ", enccrd->crd_flags, ivlen);*/ if (encflag) { if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT) != 0) bcopy(enccrd->crd_iv, ses->iv, ivlen); @@ -533,18 +521,12 @@ crypto_copydata(crp->crp_flags, crp->crp_buf, enccrd->crd_inject, ivlen, ses->iv); } - /*printhexstr(ses->iv, ivlen); - printf("\n");*/ - if (authcrd != NULL && !encflag) { + if (authcrd != NULL && !encflag) crypto_copydata(crp->crp_flags, crp->crp_buf, authcrd->crd_inject, GMAC_DIGEST_LEN, tag); - } else { - /*printf("ptag: "); - printhexstr(tag, sizeof tag); - printf("\n");*/ + else bzero(tag, sizeof tag); - } /* Do work */ switch (ses->algo) { @@ -572,18 +554,6 @@ ses->iv); break; case CRYPTO_AES_NIST_GCM_16: - /*printf("GCM: %d\n", encflag); - printf("buf(%d): ", enccrd->crd_len); - printhexstr(buf, enccrd->crd_len); - printf("\nauthbuf(%d): ", authcrd->crd_len); - printhexstr(authbuf, authcrd->crd_len); - printf("\niv: "); - printhexstr(ses->iv, ivlen); - printf("\ntag: "); - printhexstr(tag, 16); - printf("\nsched: "); - printhexstr(ses->enc_schedule, 16 * (ses->rounds + 1)); - printf("\n");*/ if (encflag) AES_GCM_encrypt(buf, buf, authbuf, ses->iv, tag, enccrd->crd_len, authcrd->crd_len, ivlen, @@ -605,7 +575,6 @@ * OpenBSD doesn't copy this back. This primes the IV for the next * chain. Why do we not do it for decrypt? */ - /*printf("t: %d, %d, %d, %d\n", enccrd->crd_skip, enccrd->crd_len, enccrd->crd_skip + enccrd->crd_len - AES_BLOCK_LEN, AES_BLOCK_LEN);*/ if (encflag && enccrd->crd_alg == CRYPTO_AES_CBC) bcopy(buf + enccrd->crd_len - AES_BLOCK_LEN, ses->iv, AES_BLOCK_LEN);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411072126.sA7LQD4u036357>