1102N/A/*
3882N/A * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
1102N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1102N/A *
1102N/A * This code is free software; you can redistribute it and/or modify it
1102N/A * under the terms of the GNU General Public License version 2 only, as
1102N/A * published by the Free Software Foundation.
1102N/A *
1102N/A * This code is distributed in the hope that it will be useful, but WITHOUT
1102N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1102N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1102N/A * version 2 for more details (a copy is included in the LICENSE file that
1102N/A * accompanied this code).
1102N/A *
1102N/A * You should have received a copy of the GNU General Public License version
1102N/A * 2 along with this work; if not, write to the Free Software Foundation,
1102N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1102N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
1102N/A */
1102N/A/*
1102N/A * @test
1102N/A * @bug 6714845
3882N/A * @run main/othervm ConfigWithQuotations
1102N/A * @summary Quotes in Kerberos configuration file are included in the values
1102N/A */
1102N/A
1102N/Aimport sun.security.krb5.Config;
1102N/A
1102N/Apublic class ConfigWithQuotations {
1102N/A public static void main(String[] args) throws Exception {
1102N/A // This config file is generated using Kerberos.app on a Mac
1102N/A System.setProperty("java.security.krb5.conf",
1102N/A System.getProperty("test.src", ".") +"/edu.mit.Kerberos");
1102N/A Config config = Config.getInstance();
1102N/A
1102N/A System.out.println(config);
1102N/A
1102N/A if (!config.getDefaultRealm().equals("MAC.LOCAL")) {
1102N/A throw new Exception("Realm error");
1102N/A }
1102N/A if (!config.getKDCList("MAC.LOCAL").equals("kdc.mac.local:88")) {
1102N/A throw new Exception("KDC error");
1102N/A }
1102N/A }
1102N/A}