// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NET_SSL_SSL_PLATFORM_KEY_ANDROID_H_ #define NET_SSL_SSL_PLATFORM_KEY_ANDROID_H_ #include #include #include #include "base/android/scoped_java_ref.h" #include "base/containers/span.h" #include "base/memory/scoped_refptr.h" #include "net/base/net_export.h" namespace net { class SSLPrivateKey; class X509Certificate; // Returns a new SSLPrivateKey for `cert` which uses `key` for signing // operations or nullptr on error. `key` must be a java.security.PrivateKey // object. NET_EXPORT scoped_refptr WrapJavaPrivateKey( const X509Certificate* cert, const base::android::JavaRef& key); // Converts `algorithms` to a list of strings containing Java key types, // suitable for use with android.security.KeyChain.choosePrivateKeyAlias. NET_EXPORT std::vector SignatureAlgorithmsToJavaKeyTypes( base::span algorithms); } // namespace net #endif // NET_SSL_SSL_PLATFORM_KEY_ANDROID_H_