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

Side by Side Diff: content/child/webcrypto/platform_crypto_openssl.cc

Issue 282133002: [webcryto] Validate key usages during key creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on master Created 6 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « content/child/webcrypto/platform_crypto_nss.cc ('k') | content/child/webcrypto/shared_crypto.h » ('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 #include "content/child/webcrypto/platform_crypto.h" 5 #include "content/child/webcrypto/platform_crypto.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include <openssl/aes.h> 8 #include <openssl/aes.h>
9 #include <openssl/evp.h> 9 #include <openssl/evp.h>
10 #include <openssl/hmac.h> 10 #include <openssl/hmac.h>
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 blink::WebCryptoKeyTypeSecret, 293 blink::WebCryptoKeyTypeSecret,
294 extractable, 294 extractable,
295 key_algorithm, 295 key_algorithm,
296 usage_mask); 296 usage_mask);
297 297
298 return Status::Success(); 298 return Status::Success();
299 } 299 }
300 300
301 Status GenerateRsaKeyPair(const blink::WebCryptoAlgorithm& algorithm, 301 Status GenerateRsaKeyPair(const blink::WebCryptoAlgorithm& algorithm,
302 bool extractable, 302 bool extractable,
303 blink::WebCryptoKeyUsageMask usage_mask, 303 blink::WebCryptoKeyUsageMask public_key_usage_mask,
304 blink::WebCryptoKeyUsageMask private_key_usage_mask,
304 unsigned int modulus_length_bits, 305 unsigned int modulus_length_bits,
305 const CryptoData& public_exponent, 306 const CryptoData& public_exponent,
306 blink::WebCryptoKey* public_key, 307 blink::WebCryptoKey* public_key,
307 blink::WebCryptoKey* private_key) { 308 blink::WebCryptoKey* private_key) {
308 // TODO(padolph): Placeholder for OpenSSL implementation. 309 // TODO(padolph): Placeholder for OpenSSL implementation.
309 // Issue http://crbug.com/267888. 310 // Issue http://crbug.com/267888.
310 return Status::ErrorUnsupported(); 311 return Status::ErrorUnsupported();
311 } 312 }
312 313
313 Status ImportKeyRaw(const blink::WebCryptoAlgorithm& algorithm, 314 Status ImportKeyRaw(const blink::WebCryptoAlgorithm& algorithm,
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 blink::WebCryptoKey* key) { 527 blink::WebCryptoKey* key) {
527 // TODO(eroman): http://crbug.com/267888 528 // TODO(eroman): http://crbug.com/267888
528 return false; 529 return false;
529 } 530 }
530 531
531 } // namespace platform 532 } // namespace platform
532 533
533 } // namespace webcrypto 534 } // namespace webcrypto
534 535
535 } // namespace content 536 } // namespace content
OLDNEW
« no previous file with comments | « content/child/webcrypto/platform_crypto_nss.cc ('k') | content/child/webcrypto/shared_crypto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698