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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 207 |
208 // The key length specified when generating a key was invalid. Either it was | 208 // The key length specified when generating a key was invalid. Either it was |
209 // zero, or it was not a multiple of 8 bits. | 209 // zero, or it was not a multiple of 8 bits. |
210 static Status ErrorGenerateKeyLength(); | 210 static Status ErrorGenerateKeyLength(); |
211 | 211 |
212 // Attempted to create a key (either by importKey(), generateKey(), or | 212 // Attempted to create a key (either by importKey(), generateKey(), or |
213 // unwrapKey()) however the key usages were not applicable for the key type | 213 // unwrapKey()) however the key usages were not applicable for the key type |
214 // and algorithm. | 214 // and algorithm. |
215 static Status ErrorCreateKeyBadUsages(); | 215 static Status ErrorCreateKeyBadUsages(); |
216 | 216 |
| 217 // No usages were specified when creating a secret or private key. |
| 218 static Status ErrorCreateKeyEmptyUsages(); |
| 219 |
217 // An EC key imported using SPKI/PKCS8 format had the wrong curve specified in | 220 // An EC key imported using SPKI/PKCS8 format had the wrong curve specified in |
218 // the key. | 221 // the key. |
219 static Status ErrorImportedEcKeyIncorrectCurve(); | 222 static Status ErrorImportedEcKeyIncorrectCurve(); |
220 | 223 |
221 // The "crv" member for a JWK did not match the expectations from importKey() | 224 // The "crv" member for a JWK did not match the expectations from importKey() |
222 static Status ErrorJwkIncorrectCrv(); | 225 static Status ErrorJwkIncorrectCrv(); |
223 | 226 |
224 // The EC key failed validation (coordinates don't lie on curve, out of range, | 227 // The EC key failed validation (coordinates don't lie on curve, out of range, |
225 // etc.) | 228 // etc.) |
226 static Status ErrorEcKeyInvalid(); | 229 static Status ErrorEcKeyInvalid(); |
(...skipping 17 matching lines...) Expand all Loading... |
244 Type type_; | 247 Type type_; |
245 blink::WebCryptoErrorType error_type_; | 248 blink::WebCryptoErrorType error_type_; |
246 std::string error_details_; | 249 std::string error_details_; |
247 }; | 250 }; |
248 | 251 |
249 } // namespace webcrypto | 252 } // namespace webcrypto |
250 | 253 |
251 } // namespace content | 254 } // namespace content |
252 | 255 |
253 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ | 256 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ |
OLD | NEW |