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

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: 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
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 const blink::WebCryptoAlgorithm& hash, 307 const blink::WebCryptoAlgorithm& hash,
307 blink::WebCryptoKey* public_key, 308 blink::WebCryptoKey* public_key,
308 blink::WebCryptoKey* private_key) { 309 blink::WebCryptoKey* private_key) {
309 // TODO(padolph): Placeholder for OpenSSL implementation. 310 // TODO(padolph): Placeholder for OpenSSL implementation.
310 // Issue http://crbug.com/267888. 311 // Issue http://crbug.com/267888.
311 return Status::ErrorUnsupported(); 312 return Status::ErrorUnsupported();
312 } 313 }
313 314
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 blink::WebCryptoKey* key) { 513 blink::WebCryptoKey* key) {
513 // TODO(eroman): http://crbug.com/267888 514 // TODO(eroman): http://crbug.com/267888
514 return false; 515 return false;
515 } 516 }
516 517
517 } // namespace platform 518 } // namespace platform
518 519
519 } // namespace webcrypto 520 } // namespace webcrypto
520 521
521 } // namespace content 522 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698