OLD | NEW |
| (Empty) |
1 Index: mozilla/security/nss/lib/freebl/gcm.c | |
2 =================================================================== | |
3 --- mozilla/security/nss/lib/freebl/gcm.c (revision 190722) | |
4 +++ mozilla/security/nss/lib/freebl/gcm.c (working copy) | |
5 @@ -230,7 +230,7 @@ | |
6 PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); | |
7 return SECFailure; | |
8 } | |
9 - gcm_reverse(T, X, blocksize); | |
10 + gcm_reverse(T, tmp_buf, blocksize); | |
11 return SECSuccess; | |
12 } | |
13 | |
14 @@ -453,7 +453,9 @@ | |
15 * we can hash it */ | |
16 if (ghash->bufLen) { | |
17 unsigned int needed = PR_MIN(len, blocksize - ghash->bufLen); | |
18 - PORT_Memcpy(ghash->buffer+ghash->bufLen, buf, needed); | |
19 + if (needed != 0) { | |
20 + PORT_Memcpy(ghash->buffer+ghash->bufLen, buf, needed); | |
21 + } | |
22 buf += needed; | |
23 len -= needed; | |
24 ghash->bufLen += needed; | |
25 @@ -575,11 +577,11 @@ | |
26 if (rv != SECSuccess) { | |
27 return SECFailure; | |
28 } | |
29 - rv = gcmHash_Sync(ghash, blocksize); | |
30 - if (rv != SECSuccess) { | |
31 - return SECFailure; | |
32 - } | |
33 } | |
34 + rv = gcmHash_Sync(ghash, blocksize); | |
35 + if (rv != SECSuccess) { | |
36 + return SECFailure; | |
37 + } | |
38 return SECSuccess; | |
39 } | |
40 | |
41 @@ -814,7 +816,7 @@ | |
42 | |
43 /* get the authentication block */ | |
44 if (inlen < tagBytes) { | |
45 - PORT_SetError(SEC_ERROR_INVALID_ARGS); | |
46 + PORT_SetError(SEC_ERROR_INPUT_LEN); | |
47 return SECFailure; | |
48 } | |
49 | |
50 Index: mozilla/security/nss/lib/freebl/rijndael.c | |
51 =================================================================== | |
52 --- mozilla/security/nss/lib/freebl/rijndael.c (revision 190722) | |
53 +++ mozilla/security/nss/lib/freebl/rijndael.c (working copy) | |
54 @@ -1221,7 +1221,7 @@ | |
55 { | |
56 int blocksize; | |
57 /* Check args */ | |
58 - if (cx == NULL || output == NULL || input == NULL) { | |
59 + if (cx == NULL || output == NULL || (input == NULL && inputLen != 0)) { | |
60 PORT_SetError(SEC_ERROR_INVALID_ARGS); | |
61 return SECFailure; | |
62 } | |
63 @@ -1252,7 +1252,7 @@ | |
64 { | |
65 int blocksize; | |
66 /* Check args */ | |
67 - if (cx == NULL || output == NULL || input == NULL) { | |
68 + if (cx == NULL || output == NULL || (input == NULL && inputLen != 0)) { | |
69 PORT_SetError(SEC_ERROR_INVALID_ARGS); | |
70 return SECFailure; | |
71 } | |
72 Index: mozilla/security/nss/lib/pk11wrap/pk11mech.c | |
73 =================================================================== | |
74 --- mozilla/security/nss/lib/pk11wrap/pk11mech.c (revision 190722) | |
75 +++ mozilla/security/nss/lib/pk11wrap/pk11mech.c (working copy) | |
76 @@ -221,6 +221,10 @@ | |
77 return CKK_CAMELLIA; | |
78 case CKM_AES_ECB: | |
79 case CKM_AES_CBC: | |
80 + case CKM_AES_CCM: | |
81 + case CKM_AES_CTR: | |
82 + case CKM_AES_CTS: | |
83 + case CKM_AES_GCM: | |
84 case CKM_AES_MAC: | |
85 case CKM_AES_MAC_GENERAL: | |
86 case CKM_AES_CBC_PAD: | |
OLD | NEW |