OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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 |
| 5 package org.chromium.net; |
| 6 |
| 7 import org.chromium.base.CalledByNative; |
| 8 import org.chromium.base.JNINamespace; |
| 9 |
| 10 /** |
| 11 * Static wrapper for JNI functions that are needed for using a Java private key
in the C++ OpenSSL |
| 12 * Engine. |
| 13 */ |
| 14 @JNINamespace("net::android") |
| 15 public class AndroidKeyStoreBridge { |
| 16 @CalledByNative |
| 17 public static byte[] getRSAKeyModulus(AndroidPrivateKey key) { |
| 18 return key.getKeyStore().getRSAKeyModulus(key); |
| 19 } |
| 20 |
| 21 @CalledByNative |
| 22 public static byte[] getDSAKeyParamQ(AndroidPrivateKey key) { |
| 23 return key.getKeyStore().getDSAKeyParamQ(key); |
| 24 } |
| 25 |
| 26 @CalledByNative |
| 27 public static byte[] getECKeyOrder(AndroidPrivateKey key) { |
| 28 return key.getKeyStore().getECKeyOrder(key); |
| 29 } |
| 30 |
| 31 @CalledByNative |
| 32 public static byte[] getPrivateKeyEncodedBytes(AndroidPrivateKey key) { |
| 33 return key.getKeyStore().getPrivateKeyEncodedBytes(key); |
| 34 } |
| 35 |
| 36 @CalledByNative |
| 37 public static byte[] rawSignDigestWithPrivateKey(AndroidPrivateKey key, byte
[] message) { |
| 38 return key.getKeyStore().rawSignDigestWithPrivateKey(key, message); |
| 39 } |
| 40 |
| 41 @CalledByNative |
| 42 public static int getPrivateKeyType(AndroidPrivateKey key) { |
| 43 return key.getKeyStore().getPrivateKeyType(key); |
| 44 } |
| 45 |
| 46 @CalledByNative |
| 47 public static int getOpenSSLHandleForPrivateKey(AndroidPrivateKey key) { |
| 48 return key.getKeyStore().getOpenSSLHandleForPrivateKey(key); |
| 49 } |
| 50 } |
OLD | NEW |