| 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 ErrorGenerateHmacKeyLengthPartialByte(); | 213 static Status ErrorGenerateHmacKeyLengthPartialByte(); |
| 214 | 214 |
| 215 // Attempted to generate an HMAC key using a key length of 0. | 215 // Attempted to generate an HMAC key using a key length of 0. |
| 216 static Status ErrorGenerateHmacKeyLengthZero(); | 216 static Status ErrorGenerateHmacKeyLengthZero(); |
| 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 // Attempted to import a key with an empty key usage. |
| 224 static Status ErrorImportEmptyKeyUsage(); |
| 225 |
| 223 // 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 |
| 224 // the key. | 227 // the key. |
| 225 static Status ErrorImportedEcKeyIncorrectCurve(); | 228 static Status ErrorImportedEcKeyIncorrectCurve(); |
| 226 | 229 |
| 227 // 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() |
| 228 static Status ErrorJwkIncorrectCrv(); | 231 static Status ErrorJwkIncorrectCrv(); |
| 229 | 232 |
| 230 // 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, |
| 231 // etc.) | 234 // etc.) |
| 232 static Status ErrorEcKeyInvalid(); | 235 static Status ErrorEcKeyInvalid(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 250 Type type_; | 253 Type type_; |
| 251 blink::WebCryptoErrorType error_type_; | 254 blink::WebCryptoErrorType error_type_; |
| 252 std::string error_details_; | 255 std::string error_details_; |
| 253 }; | 256 }; |
| 254 | 257 |
| 255 } // namespace webcrypto | 258 } // namespace webcrypto |
| 256 | 259 |
| 257 } // namespace content | 260 } // namespace content |
| 258 | 261 |
| 259 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ | 262 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ |
| OLD | NEW |