jdk/src/share/classes/sun/security/krb5/KrbAsRep.java
changeset 10432 ef33e56c55a9
parent 9499 f3115698a012
child 13247 74902cfeb9c6
equal deleted inserted replaced
10431:448fc54a8e23 10432:ef33e56c55a9
   129      */
   129      */
   130     void decryptUsingPassword(char[] password,
   130     void decryptUsingPassword(char[] password,
   131             KrbAsReq asReq, PrincipalName cname)
   131             KrbAsReq asReq, PrincipalName cname)
   132             throws KrbException, Asn1Exception, IOException {
   132             throws KrbException, Asn1Exception, IOException {
   133         int encPartKeyType = rep.encPart.getEType();
   133         int encPartKeyType = rep.encPart.getEType();
   134         PAData.SaltAndParams snp =
   134         EncryptionKey dkey = EncryptionKey.acquireSecretKey(
   135                 PAData.getSaltAndParams(encPartKeyType, rep.pAData);
   135                 cname,
   136         EncryptionKey dkey = null;
   136                 password,
   137         dkey = EncryptionKey.acquireSecretKey(password,
       
   138                 snp.salt == null ? cname.getSalt() : snp.salt,
       
   139                 encPartKeyType,
   137                 encPartKeyType,
   140                 snp.params);
   138                 PAData.getSaltAndParams(encPartKeyType, rep.pAData));
   141         decrypt(dkey, asReq);
   139         decrypt(dkey, asReq);
   142     }
   140     }
   143 
   141 
   144     /**
   142     /**
   145      * Decrypts encrypted content inside AS-REP. Called by initiator.
   143      * Decrypts encrypted content inside AS-REP. Called by initiator.