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

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

Issue 751883002: Revert of Check that usage isn't empty when generateKey() is called (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « content/child/webcrypto/openssl/sym_key_openssl.cc ('k') | content/child/webcrypto/status.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
220 // An EC key imported using SPKI/PKCS8 format had the wrong curve specified in 217 // An EC key imported using SPKI/PKCS8 format had the wrong curve specified in
221 // the key. 218 // the key.
222 static Status ErrorImportedEcKeyIncorrectCurve(); 219 static Status ErrorImportedEcKeyIncorrectCurve();
223 220
224 // The "crv" member for a JWK did not match the expectations from importKey() 221 // The "crv" member for a JWK did not match the expectations from importKey()
225 static Status ErrorJwkIncorrectCrv(); 222 static Status ErrorJwkIncorrectCrv();
226 223
227 // The EC key failed validation (coordinates don't lie on curve, out of range, 224 // The EC key failed validation (coordinates don't lie on curve, out of range,
228 // etc.) 225 // etc.)
229 static Status ErrorEcKeyInvalid(); 226 static Status ErrorEcKeyInvalid();
(...skipping 17 matching lines...) Expand all
247 Type type_; 244 Type type_;
248 blink::WebCryptoErrorType error_type_; 245 blink::WebCryptoErrorType error_type_;
249 std::string error_details_; 246 std::string error_details_;
250 }; 247 };
251 248
252 } // namespace webcrypto 249 } // namespace webcrypto
253 250
254 } // namespace content 251 } // namespace content
255 252
256 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ 253 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_
OLDNEW
« no previous file with comments | « content/child/webcrypto/openssl/sym_key_openssl.cc ('k') | content/child/webcrypto/status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698