src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/CCacheInputStream.java

Print this page




  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  */
  24 
  25 /*
  26  *
  27  *  (C) Copyright IBM Corp. 1999 All Rights Reserved.
  28  *  Copyright 1997 The Open Group Research Institute.  All rights reserved.
  29  */
  30 
  31 package sun.security.krb5.internal.ccache;
  32 
  33 import java.io.IOException;
  34 import java.io.InputStream;
  35 import java.util.ArrayList;
  36 import java.util.List;
  37 import java.util.StringTokenizer;
  38 
  39 import sun.misc.IOUtils;
  40 import sun.security.krb5.*;
  41 import sun.security.krb5.internal.*;
  42 import sun.security.krb5.internal.util.KrbDataInputStream;

  43 
  44 /**
  45  * This class extends KrbDataInputStream. It is used for parsing FCC-format
  46  * data from file to memory.
  47  *
  48  * @author Yanni Zhang
  49  *
  50  */
  51 public class CCacheInputStream extends KrbDataInputStream implements FileCCacheConstants {
  52 
  53     /*
  54      * FCC version 2 contains type information for principals.  FCC
  55      * version 1 does not.
  56      *
  57      * FCC version 3 contains keyblock encryption type information, and is
  58      * architecture independent.  Previous versions are not.
  59      *
  60      * The code will accept version 1, 2, and 3 ccaches, and depending
  61      * what KRB5_FCC_DEFAULT_FVNO is set to, it will create version 1, 2,
  62      * or 3 FCC caches.




  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  */
  24 
  25 /*
  26  *
  27  *  (C) Copyright IBM Corp. 1999 All Rights Reserved.
  28  *  Copyright 1997 The Open Group Research Institute.  All rights reserved.
  29  */
  30 
  31 package sun.security.krb5.internal.ccache;
  32 
  33 import java.io.IOException;
  34 import java.io.InputStream;
  35 import java.util.ArrayList;
  36 import java.util.List;
  37 import java.util.StringTokenizer;
  38 

  39 import sun.security.krb5.*;
  40 import sun.security.krb5.internal.*;
  41 import sun.security.krb5.internal.util.KrbDataInputStream;
  42 import sun.security.util.IOUtils;
  43 
  44 /**
  45  * This class extends KrbDataInputStream. It is used for parsing FCC-format
  46  * data from file to memory.
  47  *
  48  * @author Yanni Zhang
  49  *
  50  */
  51 public class CCacheInputStream extends KrbDataInputStream implements FileCCacheConstants {
  52 
  53     /*
  54      * FCC version 2 contains type information for principals.  FCC
  55      * version 1 does not.
  56      *
  57      * FCC version 3 contains keyblock encryption type information, and is
  58      * architecture independent.  Previous versions are not.
  59      *
  60      * The code will accept version 1, 2, and 3 ccaches, and depending
  61      * what KRB5_FCC_DEFAULT_FVNO is set to, it will create version 1, 2,
  62      * or 3 FCC caches.