OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 // <p> | 5 // <p> |
6 // The <code>chrome.networking.onc</code> API is used for configuring | 6 // The <code>chrome.networking.onc</code> API is used for configuring |
7 // network connections (Cellular, Ethernet, VPN, WiFi or WiMAX). | 7 // network connections (Cellular, Ethernet, VPN, WiFi or WiMAX). |
8 // This API is available in Chrome OS kiosk sessions. | 8 // This API is available in Chrome OS kiosk sessions. |
9 // </p> | 9 // </p> |
10 // <p> | 10 // <p> |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // List of certificate issuer CA certificates. A certificate must be signed | 252 // List of certificate issuer CA certificates. A certificate must be signed |
253 // by one of them in order to match this pattern. | 253 // by one of them in order to match this pattern. |
254 DOMString[]? IssuerCARef; | 254 DOMString[]? IssuerCARef; |
255 // If set, pattern against which X.509 subject settings should be matched. | 255 // If set, pattern against which X.509 subject settings should be matched. |
256 IssuerSubjectPattern? Subject; | 256 IssuerSubjectPattern? Subject; |
257 }; | 257 }; |
258 | 258 |
259 dictionary EAPProperties { | 259 dictionary EAPProperties { |
260 DOMString? AnonymousIdentity; | 260 DOMString? AnonymousIdentity; |
261 CertificatePattern? ClientCertPattern; | 261 CertificatePattern? ClientCertPattern; |
| 262 DOMString? ClientCertPKCS11Id; |
262 DOMString? ClientCertRef; | 263 DOMString? ClientCertRef; |
263 ClientCertificateType ClientCertType; | 264 ClientCertificateType ClientCertType; |
264 DOMString? Identity; | 265 DOMString? Identity; |
265 DOMString? Inner; | 266 DOMString? Inner; |
266 // The outer EAP type. Required by ONC, but may not be provided when | 267 // The outer EAP type. Required by ONC, but may not be provided when |
267 // translating from Shill. | 268 // translating from Shill. |
268 DOMString? Outer; | 269 DOMString? Outer; |
269 DOMString? Password; | 270 DOMString? Password; |
270 boolean? SaveCredentials; | 271 boolean? SaveCredentials; |
271 DOMString[]? ServerCAPEMs; | 272 DOMString[]? ServerCAPEMs; |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 | 847 |
847 dictionary GlobalPolicy { | 848 dictionary GlobalPolicy { |
848 // If true, only policy networks may auto connect. Defaults to false. | 849 // If true, only policy networks may auto connect. Defaults to false. |
849 boolean? AllowOnlyPolicyNetworksToAutoconnect; | 850 boolean? AllowOnlyPolicyNetworksToAutoconnect; |
850 | 851 |
851 // If true, only policy networks may be connected to and no new networks may | 852 // If true, only policy networks may be connected to and no new networks may |
852 // be added or configured. Defaults to false. | 853 // be added or configured. Defaults to false. |
853 boolean? AllowOnlyPolicyNetworksToConnect; | 854 boolean? AllowOnlyPolicyNetworksToConnect; |
854 }; | 855 }; |
855 | 856 |
| 857 dictionary Certificate { |
| 858 // Unique hash for the certificate. |
| 859 DOMString hash; |
| 860 |
| 861 // Certificate issuer common name. |
| 862 DOMString issuedBy; |
| 863 |
| 864 // Certificate name or nickname. |
| 865 DOMString issuedTo; |
| 866 |
| 867 // PEM for server ca certificatess. |
| 868 DOMString? pem; |
| 869 |
| 870 // PKCS#11 id for user certificates. |
| 871 DOMString? PKCS11Id; |
| 872 |
| 873 // Whether or not the certificate is hardware backed. |
| 874 boolean hardwareBacked; |
| 875 }; |
| 876 |
| 877 dictionary CertificateLists { |
| 878 // Certificates available for the ServerCA property. |
| 879 Certificate[] server_ca_certificates; |
| 880 |
| 881 // Certificates available for the UserCert property. |
| 882 Certificate[] user_certificates; |
| 883 }; |
| 884 |
856 callback VoidCallback = void(); | 885 callback VoidCallback = void(); |
857 callback BooleanCallback = void(boolean result); | 886 callback BooleanCallback = void(boolean result); |
858 callback StringCallback = void(DOMString result); | 887 callback StringCallback = void(DOMString result); |
859 callback GetPropertiesCallback = void(NetworkProperties result); | 888 callback GetPropertiesCallback = void(NetworkProperties result); |
860 callback GetManagedPropertiesCallback = void(ManagedProperties result); | 889 callback GetManagedPropertiesCallback = void(ManagedProperties result); |
861 callback GetStatePropertiesCallback = void(NetworkStateProperties result); | 890 callback GetStatePropertiesCallback = void(NetworkStateProperties result); |
862 callback GetNetworksCallback = void(NetworkStateProperties[] result); | 891 callback GetNetworksCallback = void(NetworkStateProperties[] result); |
863 callback GetDeviceStatesCallback = void(DeviceStateProperties[] result); | 892 callback GetDeviceStatesCallback = void(DeviceStateProperties[] result); |
864 callback GetEnabledNetworkTypesCallback = void(NetworkType[] result); | 893 callback GetEnabledNetworkTypesCallback = void(NetworkType[] result); |
865 callback CaptivePortalStatusCallback = void(CaptivePortalStatus result); | 894 callback CaptivePortalStatusCallback = void(CaptivePortalStatus result); |
866 callback GetGlobalPolicyCallback = void(GlobalPolicy result); | 895 callback GetGlobalPolicyCallback = void(GlobalPolicy result); |
| 896 callback GetCertificateListsCallback = void(CertificateLists result); |
867 | 897 |
868 interface Functions { | 898 interface Functions { |
869 // Gets all the properties of the network with id networkGuid. Includes all | 899 // Gets all the properties of the network with id networkGuid. Includes all |
870 // properties of the network (read-only and read/write values). | 900 // properties of the network (read-only and read/write values). |
871 // |networkGuid|: The GUID of the network to get properties for. | 901 // |networkGuid|: The GUID of the network to get properties for. |
872 // |callback|: Called with the network properties when received. | 902 // |callback|: Called with the network properties when received. |
873 static void getProperties(DOMString networkGuid, | 903 static void getProperties(DOMString networkGuid, |
874 GetPropertiesCallback callback); | 904 GetPropertiesCallback callback); |
875 | 905 |
876 // Gets the merged properties of the network with id networkGuid from the | 906 // Gets the merged properties of the network with id networkGuid from the |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 // Returns captive portal status for the network matching 'networkGuid'. | 1018 // Returns captive portal status for the network matching 'networkGuid'. |
989 // |networkGuid|: The GUID of the network to get captive portal status for. | 1019 // |networkGuid|: The GUID of the network to get captive portal status for. |
990 // |callback|: A callback function that returns the results of the query for | 1020 // |callback|: A callback function that returns the results of the query for |
991 // network captive portal status. | 1021 // network captive portal status. |
992 static void getCaptivePortalStatus(DOMString networkGuid, | 1022 static void getCaptivePortalStatus(DOMString networkGuid, |
993 CaptivePortalStatusCallback callback); | 1023 CaptivePortalStatusCallback callback); |
994 | 1024 |
995 // Gets the global policy properties. These properties are not expected to | 1025 // Gets the global policy properties. These properties are not expected to |
996 // change during a session. | 1026 // change during a session. |
997 static void getGlobalPolicy(GetGlobalPolicyCallback callback); | 1027 static void getGlobalPolicy(GetGlobalPolicyCallback callback); |
| 1028 |
| 1029 // Gets the lists of certificates available for network configuration. |
| 1030 static void getCertificateLists(GetCertificateListsCallback callback); |
998 }; | 1031 }; |
999 | 1032 |
1000 interface Events { | 1033 interface Events { |
1001 // Fired when the properties change on any of the networks. Sends a list of | 1034 // Fired when the properties change on any of the networks. Sends a list of |
1002 // GUIDs for networks whose properties have changed. | 1035 // GUIDs for networks whose properties have changed. |
1003 static void onNetworksChanged(DOMString[] changes); | 1036 static void onNetworksChanged(DOMString[] changes); |
1004 | 1037 |
1005 // Fired when the list of networks has changed. Sends a complete list of | 1038 // Fired when the list of networks has changed. Sends a complete list of |
1006 // GUIDs for all the current networks. | 1039 // GUIDs for all the current networks. |
1007 static void onNetworkListChanged(DOMString[] changes); | 1040 static void onNetworkListChanged(DOMString[] changes); |
1008 | 1041 |
1009 // Fired when the list of devices has changed or any device state properties | 1042 // Fired when the list of devices has changed or any device state properties |
1010 // have changed. | 1043 // have changed. |
1011 static void onDeviceStateListChanged(); | 1044 static void onDeviceStateListChanged(); |
1012 | 1045 |
1013 // Fired when a portal detection for a network completes. Sends the GUID of | 1046 // Fired when a portal detection for a network completes. Sends the GUID of |
1014 // the network and the corresponding captive portal status. | 1047 // the network and the corresponding captive portal status. |
1015 static void onPortalDetectionCompleted(DOMString networkGuid, | 1048 static void onPortalDetectionCompleted(DOMString networkGuid, |
1016 CaptivePortalStatus status); | 1049 CaptivePortalStatus status); |
| 1050 |
| 1051 // Fired when any certificate list has changed. |
| 1052 static void onCertificateListsChanged(); |
1017 }; | 1053 }; |
1018 }; | 1054 }; |
OLD | NEW |