| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 // used to verify a RsaSsaPkcs1v1_5 signature, or tried exporting a private | 133 // used to verify a RsaSsaPkcs1v1_5 signature, or tried exporting a private |
| 134 // key using spki format. | 134 // key using spki format. |
| 135 static Status ErrorUnexpectedKeyType(); | 135 static Status ErrorUnexpectedKeyType(); |
| 136 | 136 |
| 137 // When doing an AES-CBC encryption/decryption, the "iv" parameter was not 16 | 137 // When doing an AES-CBC encryption/decryption, the "iv" parameter was not 16 |
| 138 // bytes. | 138 // bytes. |
| 139 static Status ErrorIncorrectSizeAesCbcIv(); | 139 static Status ErrorIncorrectSizeAesCbcIv(); |
| 140 | 140 |
| 141 // The data provided to an encrypt/decrypt/sign/verify operation was too | 141 // The data provided to an encrypt/decrypt/sign/verify operation was too |
| 142 // large. This can either represent an internal limitation (for instance | 142 // large. This can either represent an internal limitation (for instance |
| 143 // representing buffer lengths as uints), or an algorithm restriction (for | 143 // representing buffer lengths as uints). |
| 144 // instance RSAES can operation on messages relative to the length of the | |
| 145 // key's modulus). | |
| 146 static Status ErrorDataTooLarge(); | 144 static Status ErrorDataTooLarge(); |
| 147 | 145 |
| 148 // The data provided to an encrypt/decrypt/sign/verify operation was too | 146 // The data provided to an encrypt/decrypt/sign/verify operation was too |
| 149 // small. This usually represents an algorithm restriction (for instance | 147 // small. This usually represents an algorithm restriction (for instance |
| 150 // AES-KW requires a minimum of 24 bytes input data). | 148 // AES-KW requires a minimum of 24 bytes input data). |
| 151 static Status ErrorDataTooSmall(); | 149 static Status ErrorDataTooSmall(); |
| 152 | 150 |
| 153 // Something was unsupported or unimplemented. This can mean the algorithm in | 151 // Something was unsupported or unimplemented. This can mean the algorithm in |
| 154 // question was unsupported, some parameter combination was unsupported, or | 152 // question was unsupported, some parameter combination was unsupported, or |
| 155 // something has not yet been implemented. | 153 // something has not yet been implemented. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 Type type_; | 200 Type type_; |
| 203 blink::WebCryptoErrorType error_type_; | 201 blink::WebCryptoErrorType error_type_; |
| 204 std::string error_details_; | 202 std::string error_details_; |
| 205 }; | 203 }; |
| 206 | 204 |
| 207 } // namespace webcrypto | 205 } // namespace webcrypto |
| 208 | 206 |
| 209 } // namespace content | 207 } // namespace content |
| 210 | 208 |
| 211 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ | 209 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ |
| OLD | NEW |