ssl_platform_key_android.h 817 B

12345678910111213141516171819202122232425262728
  1. // Copyright 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef NET_SSL_SSL_PLATFORM_KEY_ANDROID_H_
  5. #define NET_SSL_SSL_PLATFORM_KEY_ANDROID_H_
  6. #include <jni.h>
  7. #include "base/android/scoped_java_ref.h"
  8. #include "base/memory/ref_counted.h"
  9. #include "net/base/net_export.h"
  10. namespace net {
  11. class SSLPrivateKey;
  12. class X509Certificate;
  13. // Returns a new SSLPrivateKey for |cert| which uses |key| for signing
  14. // operations or nullptr on error. |key| must be a java.security.PrivateKey
  15. // object.
  16. NET_EXPORT scoped_refptr<SSLPrivateKey> WrapJavaPrivateKey(
  17. const X509Certificate* cert,
  18. const base::android::JavaRef<jobject>& key);
  19. } // namespace net
  20. #endif // NET_SSL_SSL_PLATFORM_KEY_ANDROID_H_