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