src/java.security.jgss/share/classes/sun/security/krb5/KrbAsRep.java
author chegar
Thu, 17 Oct 2019 20:54:25 +0100
branchdatagramsocketimpl-branch
changeset 58679 9c3209ff7550
parent 58678 9cf78a70fa4f
parent 57487 643978a35f6e
permissions -rw-r--r--
datagramsocketimpl-branch: merge with default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
55258
d65d3c37232c 8215032: Support Kerberos cross-realm referrals (RFC 6806)
mbalao
parents: 47216
diff changeset
     2
 * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 *  (C) Copyright IBM Corp. 1999 All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 *  Copyright 1997 The Open Group Research Institute.  All rights reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
package sun.security.krb5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
import sun.security.krb5.internal.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
import sun.security.krb5.internal.crypto.KeyUsage;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import sun.security.krb5.internal.crypto.EType;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
import sun.security.util.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
import java.io.IOException;
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    39
import java.util.Objects;
9499
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
    40
import javax.security.auth.kerberos.KeyTab;
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
    41
import sun.security.jgss.krb5.Krb5Util;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * This class encapsulates a AS-REP message that the KDC sends to the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * client.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 */
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    47
class KrbAsRep extends KrbKdcRep {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    49
    private ASRep rep;  // The AS-REP message
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    50
    private Credentials creds;  // The Credentials provide by the AS-REP
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    51
                                // message, created by initiator after calling
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    52
                                // the decrypt() method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    private boolean DEBUG = Krb5.DEBUG;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    56
    KrbAsRep(byte[] ibuf) throws
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    57
            KrbException, Asn1Exception, IOException {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
        DerValue encoding = new DerValue(ibuf);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
            rep = new ASRep(encoding);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
        } catch (Asn1Exception e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
            rep = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
            KRBError err = new KRBError(encoding);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
            String errStr = err.getErrorString();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
            String eText = null; // pick up text sent by the server (if any)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
            if (errStr != null && errStr.length() > 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
                if (errStr.charAt(errStr.length() - 1) == 0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
                    eText = errStr.substring(0, errStr.length() - 1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
                else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
                    eText = errStr;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
            KrbException ke;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
            if (eText == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
                // no text sent from server
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
                ke = new KrbException(err);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
            } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
                if (DEBUG) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
                    System.out.println("KRBError received: " + eText);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
                // override default text with server text
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
                ke = new KrbException(err, eText);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
            ke.initCause(e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
            throw ke;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
        }
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    87
    }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    89
    // KrbAsReqBuilder need to read back the PA for key generation
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    90
    PAData[] getPA() {
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    91
        return rep.pAData;
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    92
    }
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    93
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    94
    /**
9499
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
    95
     * Called by KrbAsReqBuilder to resolve a AS-REP message using a keytab.
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
    96
     * @param ktab the keytab, not null
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    97
     * @param asReq the original AS-REQ sent, used to validate AS-REP
9499
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
    98
     * @param cname the user principal name, used to locate keys in ktab
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
    99
     */
9499
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   100
    void decryptUsingKeyTab(KeyTab ktab, KrbAsReq asReq, PrincipalName cname)
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   101
            throws KrbException, Asn1Exception, IOException {
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   102
        EncryptionKey dkey = null;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
        int encPartKeyType = rep.encPart.getEType();
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   104
        Integer encPartKvno = rep.encPart.kvno;
9499
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   105
            try {
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   106
                dkey = EncryptionKey.findKey(encPartKeyType, encPartKvno,
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   107
                        Krb5Util.keysFromJavaxKeyTab(ktab, cname));
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   108
            } catch (KrbException ke) {
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   109
                if (ke.returnCode() == Krb5.KRB_AP_ERR_BADKEYVER) {
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   110
                    // Fallback to no kvno. In some cases, keytab is generated
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   111
                    // not by sysadmin but Java's ktab command
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   112
                    dkey = EncryptionKey.findKey(encPartKeyType,
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   113
                            Krb5Util.keysFromJavaxKeyTab(ktab, cname));
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   114
                }
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   115
            }
9499
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   116
            if (dkey == null) {
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   117
                throw new KrbException(Krb5.API_INVALID_ARG,
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   118
                    "Cannot find key for type/kvno to decrypt AS REP - " +
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   119
                    EType.toString(encPartKeyType) + "/" + encPartKvno);
f3115698a012 6894072: always refresh keytab
weijun
parents: 9035
diff changeset
   120
            }
57487
643978a35f6e 8227437: S4U2proxy cannot continue because server's TGT cannot be found
mbalao
parents: 55258
diff changeset
   121
        decrypt(dkey, asReq, cname);
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   122
    }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   124
    /**
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   125
     * Called by KrbAsReqBuilder to resolve a AS-REP message using a password.
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   126
     * @param password user provided password. not null
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   127
     * @param asReq the original AS-REQ sent, used to validate AS-REP
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   128
     * @param cname the user principal name, used to provide salt
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   129
     */
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   130
    void decryptUsingPassword(char[] password,
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   131
            KrbAsReq asReq, PrincipalName cname)
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   132
            throws KrbException, Asn1Exception, IOException {
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   133
        int encPartKeyType = rep.encPart.getEType();
10432
ef33e56c55a9 7067974: multiple ETYPE-INFO-ENTRY with same etype and different salt
weijun
parents: 9499
diff changeset
   134
        EncryptionKey dkey = EncryptionKey.acquireSecretKey(
ef33e56c55a9 7067974: multiple ETYPE-INFO-ENTRY with same etype and different salt
weijun
parents: 9499
diff changeset
   135
                cname,
ef33e56c55a9 7067974: multiple ETYPE-INFO-ENTRY with same etype and different salt
weijun
parents: 9499
diff changeset
   136
                password,
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   137
                encPartKeyType,
10432
ef33e56c55a9 7067974: multiple ETYPE-INFO-ENTRY with same etype and different salt
weijun
parents: 9499
diff changeset
   138
                PAData.getSaltAndParams(encPartKeyType, rep.pAData));
57487
643978a35f6e 8227437: S4U2proxy cannot continue because server's TGT cannot be found
mbalao
parents: 55258
diff changeset
   139
        decrypt(dkey, asReq, cname);
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   140
    }
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   141
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   142
    /**
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   143
     * Decrypts encrypted content inside AS-REP. Called by initiator.
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   144
     * @param dkey the decryption key to use
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   145
     * @param asReq the original AS-REQ sent, used to validate AS-REP
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   146
     */
57487
643978a35f6e 8227437: S4U2proxy cannot continue because server's TGT cannot be found
mbalao
parents: 55258
diff changeset
   147
    private void decrypt(EncryptionKey dkey, KrbAsReq asReq,
643978a35f6e 8227437: S4U2proxy cannot continue because server's TGT cannot be found
mbalao
parents: 55258
diff changeset
   148
            PrincipalName cname)
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   149
            throws KrbException, Asn1Exception, IOException {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        byte[] enc_as_rep_bytes = rep.encPart.decrypt(dkey,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
            KeyUsage.KU_ENC_AS_REP_PART);
5975
076cd013e5e4 6946669: SSL/Krb5 should not call EncryptedData.reset(data, false)
weijun
parents: 5506
diff changeset
   152
        byte[] enc_as_rep_part = rep.encPart.reset(enc_as_rep_bytes);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   154
        DerValue encoding = new DerValue(enc_as_rep_part);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
        EncASRepPart enc_part = new EncASRepPart(encoding);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        rep.encKDCRepPart = enc_part;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   158
        ASReq req = asReq.getMessage();
55258
d65d3c37232c 8215032: Support Kerberos cross-realm referrals (RFC 6806)
mbalao
parents: 47216
diff changeset
   159
        check(true, req, rep, dkey);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
57487
643978a35f6e 8227437: S4U2proxy cannot continue because server's TGT cannot be found
mbalao
parents: 55258
diff changeset
   161
        PrincipalName clientAlias = cname;
643978a35f6e 8227437: S4U2proxy cannot continue because server's TGT cannot be found
mbalao
parents: 55258
diff changeset
   162
        if (clientAlias.equals(rep.cname))
643978a35f6e 8227437: S4U2proxy cannot continue because server's TGT cannot be found
mbalao
parents: 55258
diff changeset
   163
            clientAlias = null;
643978a35f6e 8227437: S4U2proxy cannot continue because server's TGT cannot be found
mbalao
parents: 55258
diff changeset
   164
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        creds = new Credentials(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
                                rep.ticket,
55258
d65d3c37232c 8215032: Support Kerberos cross-realm referrals (RFC 6806)
mbalao
parents: 47216
diff changeset
   167
                                rep.cname,
57487
643978a35f6e 8227437: S4U2proxy cannot continue because server's TGT cannot be found
mbalao
parents: 55258
diff changeset
   168
                                clientAlias,
45276
633535faf95d 8178794: krb5 client should ignore sname in incoming tickets
weijun
parents: 25859
diff changeset
   169
                                enc_part.sname,
57487
643978a35f6e 8227437: S4U2proxy cannot continue because server's TGT cannot be found
mbalao
parents: 55258
diff changeset
   170
                                null, // No server alias expected in a TGT
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
                                enc_part.key,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
                                enc_part.flags,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
                                enc_part.authtime,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
                                enc_part.starttime,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
                                enc_part.endtime,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
                                enc_part.renewTill,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
                                enc_part.caddr);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
        if (DEBUG) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
            System.out.println(">>> KrbAsRep cons in KrbAsReq.getReply " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
                               req.reqBody.cname.getNameString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   184
    Credentials getCreds() {
8166
13423c0952ad 7012540: java.util.Objects.nonNull() incorrectly named
briangoetz
parents: 7183
diff changeset
   185
        return Objects.requireNonNull(creds, "Creds not available yet.");
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
7183
d8ccc1c73358 6960894: Better AS-REQ creation and processing
weijun
parents: 5975
diff changeset
   188
    sun.security.krb5.internal.ccache.Credentials getCCreds() {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        return new sun.security.krb5.internal.ccache.Credentials(rep);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
}