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

Unified Diff: net/third_party/nss/patches/chacha20poly1305.patch

Issue 48913004: Update chacha20poly1305.patch for the changes made in r230713 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/third_party/nss/patches/chacha20poly1305.patch
===================================================================
--- net/third_party/nss/patches/chacha20poly1305.patch (revision 231346)
+++ net/third_party/nss/patches/chacha20poly1305.patch (working copy)
@@ -9,15 +9,15 @@
+/* This is a bodge to allow this code to be compiled against older NSS
+ * headers. */
+#ifndef CKM_NSS_CHACHA20_POLY1305
-+#define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 25)
++#define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 26)
+
-+typedef struct CK_AEAD_PARAMS {
-+ CK_BYTE_PTR pIv; /* This is the nonce. */
-+ CK_ULONG ulIvLen;
-+ CK_BYTE_PTR pAAD;
-+ CK_ULONG ulAADLen;
-+ CK_ULONG ulTagBits;
-+} CK_AEAD_PARAMS;
++typedef struct CK_NSS_AEAD_PARAMS {
++ CK_BYTE_PTR pIv; /* This is the nonce. */
++ CK_ULONG ulIvLen;
++ CK_BYTE_PTR pAAD;
++ CK_ULONG ulAADLen;
++ CK_ULONG ulTagLen;
++} CK_NSS_AEAD_PARAMS;
+
+#endif
+
@@ -77,18 +77,18 @@
+ SECItem param;
+ SECStatus rv = SECFailure;
+ unsigned int uOutLen;
-+ CK_AEAD_PARAMS aeadParams;
++ CK_NSS_AEAD_PARAMS aeadParams;
+ static const int tagSize = 16;
+
+ param.type = siBuffer;
+ param.len = sizeof(aeadParams);
+ param.data = (unsigned char *) &aeadParams;
-+ memset(&aeadParams, 0, sizeof(CK_AEAD_PARAMS));
++ memset(&aeadParams, 0, sizeof(aeadParams));
+ aeadParams.pIv = (unsigned char *) additionalData;
+ aeadParams.ulIvLen = 8;
+ aeadParams.pAAD = (unsigned char *) additionalData;
+ aeadParams.ulAADLen = additionalDataLen;
-+ aeadParams.ulTagBits = tagSize * 8;
++ aeadParams.ulTagLen = tagSize;
+
+ if (doDecrypt) {
+ rv = pk11_decrypt(keys->write_key, CKM_NSS_CHACHA20_POLY1305, &param,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698