| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 // No key data was provided when importing an spki, pkcs8, or jwk formatted | 118 // No key data was provided when importing an spki, pkcs8, or jwk formatted |
| 119 // key. This does not apply to raw format, since it is possible to have empty | 119 // key. This does not apply to raw format, since it is possible to have empty |
| 120 // key data there. | 120 // key data there. |
| 121 static Status ErrorImportEmptyKeyData(); | 121 static Status ErrorImportEmptyKeyData(); |
| 122 | 122 |
| 123 // The key data buffer provided for importKey() is an incorrect length for | 123 // The key data buffer provided for importKey() is an incorrect length for |
| 124 // AES. | 124 // AES. |
| 125 static Status ErrorImportAesKeyLength(); | 125 static Status ErrorImportAesKeyLength(); |
| 126 | 126 |
| 127 // 192-bit AES keys are valid, however unsupported. |
| 128 static Status ErrorAes192BitUnsupported(); |
| 129 |
| 127 // The wrong key was used for the operation. For instance, a public key was | 130 // The wrong key was used for the operation. For instance, a public key was |
| 128 // used to verify a RsaSsaPkcs1v1_5 signature, or tried exporting a private | 131 // used to verify a RsaSsaPkcs1v1_5 signature, or tried exporting a private |
| 129 // key using spki format. | 132 // key using spki format. |
| 130 static Status ErrorUnexpectedKeyType(); | 133 static Status ErrorUnexpectedKeyType(); |
| 131 | 134 |
| 132 // When doing an AES-CBC encryption/decryption, the "iv" parameter was not 16 | 135 // When doing an AES-CBC encryption/decryption, the "iv" parameter was not 16 |
| 133 // bytes. | 136 // bytes. |
| 134 static Status ErrorIncorrectSizeAesCbcIv(); | 137 static Status ErrorIncorrectSizeAesCbcIv(); |
| 135 | 138 |
| 136 // The data provided to an encrypt/decrypt/sign/verify operation was too | 139 // The data provided to an encrypt/decrypt/sign/verify operation was too |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 Type type_; | 202 Type type_; |
| 200 blink::WebCryptoErrorType error_type_; | 203 blink::WebCryptoErrorType error_type_; |
| 201 std::string error_details_; | 204 std::string error_details_; |
| 202 }; | 205 }; |
| 203 | 206 |
| 204 } // namespace webcrypto | 207 } // namespace webcrypto |
| 205 | 208 |
| 206 } // namespace content | 209 } // namespace content |
| 207 | 210 |
| 208 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ | 211 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ |
| OLD | NEW |