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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 static Status ErrorJwkIncorrectKeyLength(); | 104 static Status ErrorJwkIncorrectKeyLength(); |
105 | 105 |
106 // The JWK property |property| is supposed to represent a big-endian unsigned | 106 // The JWK property |property| is supposed to represent a big-endian unsigned |
107 // integer, however was the empty string. | 107 // integer, however was the empty string. |
108 static Status ErrorJwkEmptyBigInteger(const std::string& property); | 108 static Status ErrorJwkEmptyBigInteger(const std::string& property); |
109 | 109 |
110 // The big-endian unsigned integer |property| contained leading zeros. This | 110 // The big-endian unsigned integer |property| contained leading zeros. This |
111 // violates the JWA requirement that such octet strings be minimal. | 111 // violates the JWA requirement that such octet strings be minimal. |
112 static Status ErrorJwkBigIntegerHasLeadingZero(const std::string& property); | 112 static Status ErrorJwkBigIntegerHasLeadingZero(const std::string& property); |
113 | 113 |
| 114 // The key_ops lists a usage more than once. |
| 115 static Status ErrorJwkDuplicateKeyOps(); |
| 116 |
114 // ------------------------------------ | 117 // ------------------------------------ |
115 // Other errors | 118 // Other errors |
116 // ------------------------------------ | 119 // ------------------------------------ |
117 | 120 |
118 // No key data was provided when importing an spki, pkcs8, or jwk formatted | 121 // 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 | 122 // key. This does not apply to raw format, since it is possible to have empty |
120 // key data there. | 123 // key data there. |
121 static Status ErrorImportEmptyKeyData(); | 124 static Status ErrorImportEmptyKeyData(); |
122 | 125 |
123 // Tried importing a key using an unsupported format for the key type (for | 126 // Tried importing a key using an unsupported format for the key type (for |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 Type type_; | 226 Type type_; |
224 blink::WebCryptoErrorType error_type_; | 227 blink::WebCryptoErrorType error_type_; |
225 std::string error_details_; | 228 std::string error_details_; |
226 }; | 229 }; |
227 | 230 |
228 } // namespace webcrypto | 231 } // namespace webcrypto |
229 | 232 |
230 } // namespace content | 233 } // namespace content |
231 | 234 |
232 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ | 235 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ |
OLD | NEW |