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 #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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 std::vector<uint8>* private_exponent, | 487 std::vector<uint8>* private_exponent, |
488 std::vector<uint8>* prime1, | 488 std::vector<uint8>* prime1, |
489 std::vector<uint8>* prime2, | 489 std::vector<uint8>* prime2, |
490 std::vector<uint8>* exponent1, | 490 std::vector<uint8>* exponent1, |
491 std::vector<uint8>* exponent2, | 491 std::vector<uint8>* exponent2, |
492 std::vector<uint8>* coefficient) { | 492 std::vector<uint8>* coefficient) { |
493 // TODO(eroman): http://crbug.com/267888 | 493 // TODO(eroman): http://crbug.com/267888 |
494 return Status::ErrorUnsupported(); | 494 return Status::ErrorUnsupported(); |
495 } | 495 } |
496 | 496 |
497 Status WrapSymKeyAesKw(SymKey* key, | 497 Status EncryptDecryptAesKw(EncryptOrDecrypt mode, |
498 SymKey* wrapping_key, | 498 SymKey* key, |
499 std::vector<uint8>* buffer) { | 499 const CryptoData& data, |
| 500 std::vector<uint8>* buffer) { |
500 // TODO(eroman): http://crbug.com/267888 | 501 // TODO(eroman): http://crbug.com/267888 |
501 return Status::ErrorUnsupported(); | 502 return Status::ErrorUnsupported(); |
502 } | 503 } |
503 | |
504 Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data, | |
505 SymKey* wrapping_key, | |
506 const blink::WebCryptoAlgorithm& algorithm, | |
507 bool extractable, | |
508 blink::WebCryptoKeyUsageMask usage_mask, | |
509 blink::WebCryptoKey* key) { | |
510 // TODO(eroman): http://crbug.com/267888 | |
511 return Status::ErrorUnsupported(); | |
512 } | |
513 | |
514 Status DecryptAesKw(SymKey* key, | |
515 const CryptoData& data, | |
516 std::vector<uint8>* buffer) { | |
517 // TODO(eroman): http://crbug.com/267888 | |
518 return Status::ErrorUnsupported(); | |
519 } | |
520 | 504 |
521 bool ThreadSafeDeserializeKeyForClone( | 505 bool ThreadSafeDeserializeKeyForClone( |
522 const blink::WebCryptoKeyAlgorithm& algorithm, | 506 const blink::WebCryptoKeyAlgorithm& algorithm, |
523 blink::WebCryptoKeyType type, | 507 blink::WebCryptoKeyType type, |
524 bool extractable, | 508 bool extractable, |
525 blink::WebCryptoKeyUsageMask usages, | 509 blink::WebCryptoKeyUsageMask usages, |
526 const CryptoData& key_data, | 510 const CryptoData& key_data, |
527 blink::WebCryptoKey* key) { | 511 blink::WebCryptoKey* key) { |
528 // TODO(eroman): http://crbug.com/267888 | 512 // TODO(eroman): http://crbug.com/267888 |
529 return false; | 513 return false; |
530 } | 514 } |
531 | 515 |
532 } // namespace platform | 516 } // namespace platform |
533 | 517 |
534 } // namespace webcrypto | 518 } // namespace webcrypto |
535 | 519 |
536 } // namespace content | 520 } // namespace content |
OLD | NEW |