Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: content/child/webcrypto/status.h

Issue 777403004: [WebCrypto] Throw syntaxError if keyUsage is empty in ImportKey (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per code review comments Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 static Status ErrorGetHmacKeyLengthZero(); 218 static Status ErrorGetHmacKeyLengthZero();
219 219
220 // Attempted to import an HMAC key using a bad optional length. 220 // Attempted to import an HMAC key using a bad optional length.
221 static Status ErrorHmacImportBadLength(); 221 static Status ErrorHmacImportBadLength();
222 222
223 // Attempted to create a key (either by importKey(), generateKey(), or 223 // Attempted to create a key (either by importKey(), generateKey(), or
224 // unwrapKey()) however the key usages were not applicable for the key type 224 // unwrapKey()) however the key usages were not applicable for the key type
225 // and algorithm. 225 // and algorithm.
226 static Status ErrorCreateKeyBadUsages(); 226 static Status ErrorCreateKeyBadUsages();
227 227
228 // No usages were specified when creating a secret or private key. 228 // No usages were specified when creating/importing a secret or private key.
eroman 2014/12/17 01:23:51 creating/importing --> generating/importing
Habib Virji 2014/12/17 15:41:53 Done.
229 static Status ErrorCreateKeyEmptyUsages(); 229 static Status ErrorCreateKeyEmptyUsages();
230 230
231 // An EC key imported using SPKI/PKCS8 format had the wrong curve specified in 231 // An EC key imported using SPKI/PKCS8 format had the wrong curve specified in
232 // the key. 232 // the key.
233 static Status ErrorImportedEcKeyIncorrectCurve(); 233 static Status ErrorImportedEcKeyIncorrectCurve();
234 234
235 // The "crv" member for a JWK did not match the expectations from importKey() 235 // The "crv" member for a JWK did not match the expectations from importKey()
236 static Status ErrorJwkIncorrectCrv(); 236 static Status ErrorJwkIncorrectCrv();
237 237
238 // The EC key failed validation (coordinates don't lie on curve, out of range, 238 // The EC key failed validation (coordinates don't lie on curve, out of range,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 Type type_; 271 Type type_;
272 blink::WebCryptoErrorType error_type_; 272 blink::WebCryptoErrorType error_type_;
273 std::string error_details_; 273 std::string error_details_;
274 }; 274 };
275 275
276 } // namespace webcrypto 276 } // namespace webcrypto
277 277
278 } // namespace content 278 } // namespace content
279 279
280 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ 280 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698