19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.security.krb5;
27
28 import java.io.IOException;
29 import java.util.Collection;
30 import java.util.Hashtable;
31 import java.util.Vector;
32
33
34 public class SCDynamicStoreConfig {
35 private static native void installNotificationCallback();
36 private static native Hashtable<String, Object> getKerberosConfig();
37
38 static {
39 java.security.AccessController.doPrivileged(new sun.security.action.LoadLibraryAction("osx"));
40 installNotificationCallback();
41 }
42
43 private static Vector<String> unwrapHost(Collection<Hashtable<String, String>> c) {
44 Vector<String> vector = new Vector<String>();
45 for (Hashtable<String, String> m : c) {
46 vector.add(m.get("host"));
47 }
48 return vector;
49 }
50
51 /**
52 * convertRealmConfigs: Maps the Object graph that we get from JNI to the
53 * object graph that Config expects. Also the items inside the kdc array
54 * are wrapped inside Hashtables
55 */
56 @SuppressWarnings("unchecked")
57 private static Hashtable<String, Object> convertRealmConfigs(Hashtable<String, ?> configs) {
58 Hashtable<String, Object> realmsTable = new Hashtable<String, Object>();
59
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.security.krb5;
27
28 import java.io.IOException;
29 import java.util.Collection;
30 import java.util.Hashtable;
31 import java.util.Vector;
32
33
34 public class SCDynamicStoreConfig {
35 private static native void installNotificationCallback();
36 private static native Hashtable<String, Object> getKerberosConfig();
37
38 static {
39 java.security.AccessController.doPrivileged(
40 new java.security.PrivilegedAction<Void>() {
41 public Void run() {
42 System.loadLibrary("osx");
43 return null;
44 }
45 });
46 installNotificationCallback();
47 }
48
49 private static Vector<String> unwrapHost(Collection<Hashtable<String, String>> c) {
50 Vector<String> vector = new Vector<String>();
51 for (Hashtable<String, String> m : c) {
52 vector.add(m.get("host"));
53 }
54 return vector;
55 }
56
57 /**
58 * convertRealmConfigs: Maps the Object graph that we get from JNI to the
59 * object graph that Config expects. Also the items inside the kdc array
60 * are wrapped inside Hashtables
61 */
62 @SuppressWarnings("unchecked")
63 private static Hashtable<String, Object> convertRealmConfigs(Hashtable<String, ?> configs) {
64 Hashtable<String, Object> realmsTable = new Hashtable<String, Object>();
65
|