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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 static Status ErrorGetHmacKeyLengthZero(); | 213 static Status ErrorGetHmacKeyLengthZero(); |
214 | 214 |
215 // Attempted to import an HMAC key using a bad optional length. | 215 // Attempted to import an HMAC key using a bad optional length. |
216 static Status ErrorHmacImportBadLength(); | 216 static Status ErrorHmacImportBadLength(); |
217 | 217 |
218 // Attempted to create a key (either by importKey(), generateKey(), or | 218 // Attempted to create a key (either by importKey(), generateKey(), or |
219 // unwrapKey()) however the key usages were not applicable for the key type | 219 // unwrapKey()) however the key usages were not applicable for the key type |
220 // and algorithm. | 220 // and algorithm. |
221 static Status ErrorCreateKeyBadUsages(); | 221 static Status ErrorCreateKeyBadUsages(); |
222 | 222 |
223 // No usages were specified when creating a secret or private key. | 223 // No usages were specified when generating/importing a secret or private key. |
224 static Status ErrorCreateKeyEmptyUsages(); | 224 static Status ErrorCreateKeyEmptyUsages(); |
225 | 225 |
226 // An EC key imported using SPKI/PKCS8 format had the wrong curve specified in | 226 // An EC key imported using SPKI/PKCS8 format had the wrong curve specified in |
227 // the key. | 227 // the key. |
228 static Status ErrorImportedEcKeyIncorrectCurve(); | 228 static Status ErrorImportedEcKeyIncorrectCurve(); |
229 | 229 |
230 // The "crv" member for a JWK did not match the expectations from importKey() | 230 // The "crv" member for a JWK did not match the expectations from importKey() |
231 static Status ErrorJwkIncorrectCrv(); | 231 static Status ErrorJwkIncorrectCrv(); |
232 | 232 |
233 // The EC key failed validation (coordinates don't lie on curve, out of range, | 233 // The EC key failed validation (coordinates don't lie on curve, out of range, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 Type type_; | 266 Type type_; |
267 blink::WebCryptoErrorType error_type_; | 267 blink::WebCryptoErrorType error_type_; |
268 std::string error_details_; | 268 std::string error_details_; |
269 }; | 269 }; |
270 | 270 |
271 } // namespace webcrypto | 271 } // namespace webcrypto |
272 | 272 |
273 } // namespace content | 273 } // namespace content |
274 | 274 |
275 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ | 275 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ |
OLD | NEW |