| 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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 return Status::ErrorUnsupported(); | 455 return Status::ErrorUnsupported(); |
| 456 } | 456 } |
| 457 | 457 |
| 458 Status ExportRsaPublicKey(PublicKey* key, | 458 Status ExportRsaPublicKey(PublicKey* key, |
| 459 std::vector<uint8>* modulus, | 459 std::vector<uint8>* modulus, |
| 460 std::vector<uint8>* public_exponent) { | 460 std::vector<uint8>* public_exponent) { |
| 461 // TODO(eroman): http://crbug.com/267888 | 461 // TODO(eroman): http://crbug.com/267888 |
| 462 return Status::ErrorUnsupported(); | 462 return Status::ErrorUnsupported(); |
| 463 } | 463 } |
| 464 | 464 |
| 465 Status WrapSymKeyAesKw(SymKey* wrapping_key, | 465 Status WrapSymKeyAesKw(SymKey* key, |
| 466 SymKey* key, | 466 SymKey* wrapping_key, |
| 467 std::vector<uint8>* buffer) { | 467 std::vector<uint8>* buffer) { |
| 468 // TODO(eroman): http://crbug.com/267888 | 468 // TODO(eroman): http://crbug.com/267888 |
| 469 return Status::ErrorUnsupported(); | 469 return Status::ErrorUnsupported(); |
| 470 } | 470 } |
| 471 | 471 |
| 472 Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data, | 472 Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data, |
| 473 SymKey* wrapping_key, | 473 SymKey* wrapping_key, |
| 474 const blink::WebCryptoAlgorithm& algorithm, | 474 const blink::WebCryptoAlgorithm& algorithm, |
| 475 bool extractable, | 475 bool extractable, |
| 476 blink::WebCryptoKeyUsageMask usage_mask, | 476 blink::WebCryptoKeyUsageMask usage_mask, |
| 477 blink::WebCryptoKey* key) { | 477 blink::WebCryptoKey* key) { |
| 478 // TODO(eroman): http://crbug.com/267888 | 478 // TODO(eroman): http://crbug.com/267888 |
| 479 return Status::ErrorUnsupported(); | 479 return Status::ErrorUnsupported(); |
| 480 } | 480 } |
| 481 | 481 |
| 482 Status DecryptAesKw(SymKey* key, | 482 Status DecryptAesKw(SymKey* key, |
| 483 const CryptoData& data, | 483 const CryptoData& data, |
| 484 std::vector<uint8>* buffer) { | 484 std::vector<uint8>* buffer) { |
| 485 // TODO(eroman): http://crbug.com/267888 | 485 // TODO(eroman): http://crbug.com/267888 |
| 486 return Status::ErrorUnsupported(); | 486 return Status::ErrorUnsupported(); |
| 487 } | 487 } |
| 488 | 488 |
| 489 Status WrapSymKeyRsaEs(PublicKey* wrapping_key, | 489 Status WrapSymKeyRsaEs(SymKey* key, |
| 490 SymKey* key, | 490 PublicKey* wrapping_key, |
| 491 std::vector<uint8>* buffer) { | 491 std::vector<uint8>* buffer) { |
| 492 // TODO(eroman): http://crbug.com/267888 | 492 // TODO(eroman): http://crbug.com/267888 |
| 493 return Status::ErrorUnsupported(); | 493 return Status::ErrorUnsupported(); |
| 494 } | 494 } |
| 495 | 495 |
| 496 Status UnwrapSymKeyRsaEs(const CryptoData& wrapped_key_data, | 496 Status UnwrapSymKeyRsaEs(const CryptoData& wrapped_key_data, |
| 497 PrivateKey* wrapping_key, | 497 PrivateKey* wrapping_key, |
| 498 const blink::WebCryptoAlgorithm& algorithm, | 498 const blink::WebCryptoAlgorithm& algorithm, |
| 499 bool extractable, | 499 bool extractable, |
| 500 blink::WebCryptoKeyUsageMask usage_mask, | 500 blink::WebCryptoKeyUsageMask usage_mask, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 512 blink::WebCryptoKey* key) { | 512 blink::WebCryptoKey* key) { |
| 513 // TODO(eroman): http://crbug.com/267888 | 513 // TODO(eroman): http://crbug.com/267888 |
| 514 return false; | 514 return false; |
| 515 } | 515 } |
| 516 | 516 |
| 517 } // namespace platform | 517 } // namespace platform |
| 518 | 518 |
| 519 } // namespace webcrypto | 519 } // namespace webcrypto |
| 520 | 520 |
| 521 } // namespace content | 521 } // namespace content |
| OLD | NEW |