OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_CHILD_WEBCRYPTO_STATUS_H_ | 5 #ifndef CONTENT_CHILD_WEBCRYPTO_STATUS_H_ |
6 #define CONTENT_CHILD_WEBCRYPTO_STATUS_H_ | 6 #define CONTENT_CHILD_WEBCRYPTO_STATUS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "third_party/WebKit/public/platform/WebCrypto.h" | 10 #include "third_party/WebKit/public/platform/WebCrypto.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 // The wrong key was used for the operation. For instance, a public key was | 138 // The wrong key was used for the operation. For instance, a public key was |
139 // used to verify a RsaSsaPkcs1v1_5 signature, or tried exporting a private | 139 // used to verify a RsaSsaPkcs1v1_5 signature, or tried exporting a private |
140 // key using spki format. | 140 // key using spki format. |
141 static Status ErrorUnexpectedKeyType(); | 141 static Status ErrorUnexpectedKeyType(); |
142 | 142 |
143 // When doing an AES-CBC encryption/decryption, the "iv" parameter was not 16 | 143 // When doing an AES-CBC encryption/decryption, the "iv" parameter was not 16 |
144 // bytes. | 144 // bytes. |
145 static Status ErrorIncorrectSizeAesCbcIv(); | 145 static Status ErrorIncorrectSizeAesCbcIv(); |
146 | 146 |
| 147 // When doing AES-CTR encryption/decryption, the "counter" parameter was not |
| 148 // 16 bytes. |
| 149 static Status ErrorIncorrectSizeAesCtrCounter(); |
| 150 |
| 151 // When doing AES-CTR encryption/decryption, the "length" parameter for the |
| 152 // counter was out of range. |
| 153 static Status ErrorInvalidAesCtrCounterLength(); |
| 154 |
| 155 // The input to encrypt/decrypt was too large. Based on the counter size, it |
| 156 // would cause the counter to wraparound and repeat earlier values. |
| 157 static Status ErrorAesCtrInputTooLongCounterRepeated(); |
| 158 |
147 // The data provided to an encrypt/decrypt/sign/verify operation was too | 159 // The data provided to an encrypt/decrypt/sign/verify operation was too |
148 // large. This can either represent an internal limitation (for instance | 160 // large. This can either represent an internal limitation (for instance |
149 // representing buffer lengths as uints). | 161 // representing buffer lengths as uints). |
150 static Status ErrorDataTooLarge(); | 162 static Status ErrorDataTooLarge(); |
151 | 163 |
152 // The data provided to an encrypt/decrypt/sign/verify operation was too | 164 // The data provided to an encrypt/decrypt/sign/verify operation was too |
153 // small. This usually represents an algorithm restriction (for instance | 165 // small. This usually represents an algorithm restriction (for instance |
154 // AES-KW requires a minimum of 24 bytes input data). | 166 // AES-KW requires a minimum of 24 bytes input data). |
155 static Status ErrorDataTooSmall(); | 167 static Status ErrorDataTooSmall(); |
156 | 168 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 Type type_; | 223 Type type_; |
212 blink::WebCryptoErrorType error_type_; | 224 blink::WebCryptoErrorType error_type_; |
213 std::string error_details_; | 225 std::string error_details_; |
214 }; | 226 }; |
215 | 227 |
216 } // namespace webcrypto | 228 } // namespace webcrypto |
217 | 229 |
218 } // namespace content | 230 } // namespace content |
219 | 231 |
220 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ | 232 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ |
OLD | NEW |