< prev index next >

test/sun/security/krb5/ccache/EmptyCC.java

Print this page




  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  * @compile -XDignore.symbol.file EmptyCC.java
  31  * @run main EmptyCC tmpcc
  32  * @run main EmptyCC FILE:tmpcc
  33  */
  34 import java.io.File;
  35 import sun.security.krb5.Credentials;
  36 import sun.security.krb5.PrincipalName;
  37 import sun.security.krb5.internal.ccache.CredentialsCache;
  38 
  39 public class EmptyCC {
  40     public static void main(String[] args) throws Exception {
  41         final PrincipalName pn = new PrincipalName("dummy@FOO.COM");
  42         final String ccache = args[0];
  43 
  44         if (args.length == 1) {
  45             // Main process, write the ccache and launch sub process
  46             CredentialsCache cache = CredentialsCache.create(pn, ccache);
  47             cache.save();
  48             Proc p = Proc.create("EmptyCC").args(ccache, "readcc")
  49                     .env("KRB5CCNAME", ccache).start();


  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")
  51                     .env("KRB5CCNAME", ccache).start();
< prev index next >