Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Unified Diff: nss/lib/freebl/rijndael.c

Issue 214183004: Implement AES in different modes of operation, using AES-NI and (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@master
Patch Set: Add a patch file and document it in README.chromium. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: nss/lib/freebl/rijndael.c
diff --git a/nss/lib/freebl/rijndael.c b/nss/lib/freebl/rijndael.c
index 8bb8905130f30095cd114cb41185e263b28c0d75..88f231e2c41a52e8d6050c170391cefb3d75fa2f 100644
--- a/nss/lib/freebl/rijndael.c
+++ b/nss/lib/freebl/rijndael.c
@@ -1171,7 +1171,12 @@ AES_InitContext(AESContext *cx, const unsigned char *key, unsigned int keysize,
break;
case NSS_AES_CTR:
cx->worker_cx = CTR_CreateContext(cx, cx->worker, iv, blocksize);
- cx->worker = (freeblCipherFunc) CTR_Update ;
+#if defined(USE_HW_AES) && defined(_MSC_VER)
+ if (use_hw_aes)
+ cx->worker = (freeblCipherFunc) CTR_Update_HW_AES;
+ else
+#endif
+ cx->worker = (freeblCipherFunc) CTR_Update;
Ryan Sleevi 2014/04/23 19:53:34 Seems better to use explicit braces in this condit
wtc 2014/04/24 01:04:10 Done.
cx->destroy = (freeblDestroyFunc) CTR_DestroyContext;
cx->isBlock = PR_FALSE;
break;

Powered by Google App Engine
This is Rietveld 408576698