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

Unified Diff: net/third_party/nss/ssl/ssl3con.c

Issue 36073014: Update to the new definitions of CKM_NSS_CHACHA20_POLY1305 and (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/ssl/ssl3con.c
===================================================================
--- net/third_party/nss/ssl/ssl3con.c (revision 229221)
+++ net/third_party/nss/ssl/ssl3con.c (working copy)
@@ -43,15 +43,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
@@ -2064,18 +2064,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