src/share/classes/sun/security/krb5/KrbApReq.java

Print this page
rev 7199 : 8014310: JAAS/Krb5LoginModule using des encytypes failure with NPE after JDK-8012679


 491             new Authenticator(cname,
 492                               cksum,
 493                               ctime.getMicroSeconds(),
 494                               ctime,
 495                               subKey,
 496                               seqno,
 497                               authorizationData);
 498 
 499         byte[] temp = authenticator.asn1Encode();
 500 
 501         EncryptedData encAuthenticator =
 502             new EncryptedData(key, temp, usage);
 503 
 504         apReqMessg =
 505             new APReq(apOptions, ticket, encAuthenticator);
 506     }
 507 
 508      // Check that key is one of the permitted types
 509      private static void checkPermittedEType(int target) throws KrbException {
 510         int[] etypes = EType.getDefaults("permitted_enctypes");
 511         if (etypes == null) {
 512             throw new KrbException(
 513                 "No supported encryption types listed in permitted_enctypes");
 514         }
 515         if (!EType.isSupported(target, etypes)) {
 516             throw new KrbException(EType.toString(target) +
 517                 " encryption type not in permitted_enctypes list");
 518         }
 519      }
 520 }


 491             new Authenticator(cname,
 492                               cksum,
 493                               ctime.getMicroSeconds(),
 494                               ctime,
 495                               subKey,
 496                               seqno,
 497                               authorizationData);
 498 
 499         byte[] temp = authenticator.asn1Encode();
 500 
 501         EncryptedData encAuthenticator =
 502             new EncryptedData(key, temp, usage);
 503 
 504         apReqMessg =
 505             new APReq(apOptions, ticket, encAuthenticator);
 506     }
 507 
 508      // Check that key is one of the permitted types
 509      private static void checkPermittedEType(int target) throws KrbException {
 510         int[] etypes = EType.getDefaults("permitted_enctypes");




 511         if (!EType.isSupported(target, etypes)) {
 512             throw new KrbException(EType.toString(target) +
 513                 " encryption type not in permitted_enctypes list");
 514         }
 515      }
 516 }