OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef NET_ANDROID_NETWORK_LIBRARY_H_ | 5 #ifndef NET_ANDROID_NETWORK_LIBRARY_H_ |
6 #define NET_ANDROID_NETWORK_LIBRARY_H_ | 6 #define NET_ANDROID_NETWORK_LIBRARY_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 // Helper for the <keygen> handler. Passes the DER-encoded key pair via JNI to | 39 // Helper for the <keygen> handler. Passes the DER-encoded key pair via JNI to |
40 // the Credentials store. The public key should be a DER-encoded | 40 // the Credentials store. The public key should be a DER-encoded |
41 // SubjectPublicKeyInfo (X.509) and the private key a DER-encode PrivateKeyInfo | 41 // SubjectPublicKeyInfo (X.509) and the private key a DER-encode PrivateKeyInfo |
42 // (PKCS#8). | 42 // (PKCS#8). |
43 bool StoreKeyPair(const uint8_t* public_key, | 43 bool StoreKeyPair(const uint8_t* public_key, |
44 size_t public_len, | 44 size_t public_len, |
45 const uint8_t* private_key, | 45 const uint8_t* private_key, |
46 size_t private_len); | 46 size_t private_len); |
47 | 47 |
48 // Helper used to pass the DER-encoded bytes of an X.509 certificate or | |
49 // a PKCS#12 archive holding a private key to the CertInstaller activity. | |
50 NET_EXPORT void StoreCertificate(CertificateMimeType cert_type, | |
51 const void* data, | |
52 size_t data_len); | |
53 | |
54 // Returns true if it can determine that only loopback addresses are configured. | 48 // Returns true if it can determine that only loopback addresses are configured. |
55 // i.e. if only 127.0.0.1 and ::1 are routable. | 49 // i.e. if only 127.0.0.1 and ::1 are routable. |
56 // Also returns false if it cannot determine this. | 50 // Also returns false if it cannot determine this. |
57 bool HaveOnlyLoopbackAddresses(); | 51 bool HaveOnlyLoopbackAddresses(); |
58 | 52 |
59 // Get the mime type (if any) that is associated with the file extension. | 53 // Get the mime type (if any) that is associated with the file extension. |
60 // Returns true if a corresponding mime type exists. | 54 // Returns true if a corresponding mime type exists. |
61 bool GetMimeTypeFromExtension(const std::string& extension, | 55 bool GetMimeTypeFromExtension(const std::string& extension, |
62 std::string* result); | 56 std::string* result); |
63 | 57 |
(...skipping 14 matching lines...) Expand all Loading... |
78 NET_EXPORT bool GetIsRoaming(); | 72 NET_EXPORT bool GetIsRoaming(); |
79 | 73 |
80 // Gets the SSID of the currently associated WiFi access point if there is one. | 74 // Gets the SSID of the currently associated WiFi access point if there is one. |
81 // Otherwise, returns empty string. | 75 // Otherwise, returns empty string. |
82 NET_EXPORT_PRIVATE std::string GetWifiSSID(); | 76 NET_EXPORT_PRIVATE std::string GetWifiSSID(); |
83 | 77 |
84 } // namespace android | 78 } // namespace android |
85 } // namespace net | 79 } // namespace net |
86 | 80 |
87 #endif // NET_ANDROID_NETWORK_LIBRARY_H_ | 81 #endif // NET_ANDROID_NETWORK_LIBRARY_H_ |
OLD | NEW |