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