10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 7158329
27 * @bug 8001208
28 * @summary NPE in sun.security.krb5.Credentials.acquireDefaultCreds()
29 * @library ../../../../java/security/testlibrary/
30 * @modules java.security.jgss/sun.security.krb5
31 * java.security.jgss/sun.security.krb5.internal.ccache
32 * @compile -XDignore.symbol.file EmptyCC.java
33 * @run main EmptyCC tmpcc
34 * @run main EmptyCC FILE:tmpcc
35 */
36 import java.io.File;
37 import sun.security.krb5.Credentials;
38 import sun.security.krb5.PrincipalName;
39 import sun.security.krb5.internal.ccache.CredentialsCache;
40
41 public class EmptyCC {
42 public static void main(String[] args) throws Exception {
43 final PrincipalName pn = new PrincipalName("dummy@FOO.COM");
44 final String ccache = args[0];
45
46 if (args.length == 1) {
47 // Main process, write the ccache and launch sub process
48 CredentialsCache cache = CredentialsCache.create(pn, ccache);
49 cache.save();
50 Proc p = Proc.create("EmptyCC").args(ccache, "readcc")
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 7158329
27 * @bug 8001208
28 * @summary NPE in sun.security.krb5.Credentials.acquireDefaultCreds()
29 * @library ../../../../java/security/testlibrary/
30 * @modules java.base/jdk.internal.misc
31 * java.security.jgss/sun.security.krb5
32 * java.security.jgss/sun.security.krb5.internal.ccache
33 * @compile -XDignore.symbol.file EmptyCC.java
34 * @run main EmptyCC tmpcc
35 * @run main EmptyCC FILE:tmpcc
36 */
37 import java.io.File;
38 import sun.security.krb5.Credentials;
39 import sun.security.krb5.PrincipalName;
40 import sun.security.krb5.internal.ccache.CredentialsCache;
41
42 public class EmptyCC {
43 public static void main(String[] args) throws Exception {
44 final PrincipalName pn = new PrincipalName("dummy@FOO.COM");
45 final String ccache = args[0];
46
47 if (args.length == 1) {
48 // Main process, write the ccache and launch sub process
49 CredentialsCache cache = CredentialsCache.create(pn, ccache);
50 cache.save();
51 Proc p = Proc.create("EmptyCC").args(ccache, "readcc")
|