jdk/src/share/classes/sun/security/ssl/krb5/KerberosPreMasterSecret.java
author ohair
Tue, 25 May 2010 15:58:33 -0700
changeset 5506 202f599c92aa
parent 4236 02f52c723b79
child 5975 076cd013e5e4
permissions -rw-r--r--
6943119: Rebrand source copyright notices Reviewed-by: darcy, weijun
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4236
diff changeset
     2
 * Copyright (c) 2003, 2009, 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: 4236
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: 4236
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: 4236
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4236
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4236
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
4236
02f52c723b79 6894643: Separate out dependency on Kerberos
vinnie
parents: 2
diff changeset
    26
package sun.security.ssl.krb5;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.io.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.security.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import java.security.interfaces.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import javax.net.ssl.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
import sun.security.krb5.EncryptionKey;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
import sun.security.krb5.EncryptedData;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import sun.security.krb5.KrbException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
import sun.security.krb5.internal.crypto.KeyUsage;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
4236
02f52c723b79 6894643: Separate out dependency on Kerberos
vinnie
parents: 2
diff changeset
    39
import sun.security.ssl.Debug;
02f52c723b79 6894643: Separate out dependency on Kerberos
vinnie
parents: 2
diff changeset
    40
import sun.security.ssl.HandshakeInStream;
02f52c723b79 6894643: Separate out dependency on Kerberos
vinnie
parents: 2
diff changeset
    41
import sun.security.ssl.HandshakeMessage;
02f52c723b79 6894643: Separate out dependency on Kerberos
vinnie
parents: 2
diff changeset
    42
import sun.security.ssl.ProtocolVersion;
02f52c723b79 6894643: Separate out dependency on Kerberos
vinnie
parents: 2
diff changeset
    43
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * This is the Kerberos premaster secret in the Kerberos client key
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * exchange message (CLIENT --> SERVER); it holds the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * Kerberos-encrypted pre-master secret. The secret is encrypted using the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * Kerberos session key.  The padding and size of the resulting message
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * depends on the session key type, but the pre-master secret is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * always exactly 48 bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
final class KerberosPreMasterSecret {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    private ProtocolVersion protocolVersion; // preMaster [0,1]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    private byte preMaster[];           // 48 bytes
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    private byte encrypted[];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
     * Constructor used by client to generate premaster secret.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
     * Client randomly creates a pre-master secret and encrypts it
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
     * using the Kerberos session key; only the server can decrypt
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
     * it, using the session key available in the service ticket.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     * @param protocolVersion used to set preMaster[0,1]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
     * @param generator random number generator for generating premaster secret
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
     * @param sessionKey Kerberos session key for encrypting premaster secret
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    KerberosPreMasterSecret(ProtocolVersion protocolVersion,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        SecureRandom generator, EncryptionKey sessionKey) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
        if (sessionKey.getEType() ==
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
            EncryptedData.ETYPE_DES3_CBC_HMAC_SHA1_KD) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
            throw new IOException(
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
               "session keys with des3-cbc-hmac-sha1-kd encryption type " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
               "are not supported for TLS Kerberos cipher suites");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        this.protocolVersion = protocolVersion;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        preMaster = generatePreMaster(generator, protocolVersion);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
        // Encrypt premaster secret
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
            EncryptedData eData = new EncryptedData(sessionKey, preMaster,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
                KeyUsage.KU_UNKNOWN);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
            encrypted = eData.getBytes();  // not ASN.1 encoded.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        } catch (KrbException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
            throw (SSLKeyException)new SSLKeyException
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
                ("Kerberos premaster secret error").initCause(e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     * Constructor used by server to decrypt encrypted premaster secret.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
     * The protocol version in preMaster[0,1] must match either currentVersion
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
     * or clientVersion, otherwise, the premaster secret is set to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
     * a random one to foil possible attack.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
     * @param currentVersion version of protocol being used
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
     * @param clientVersion version requested by client
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     * @param generator random number generator used to generate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     *        bogus premaster secret if premaster secret verification fails
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
     * @param input input stream from which to read the encrypted
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
     *        premaster secret
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
     * @param sessionKey Kerberos session key to be used for decryption
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
    KerberosPreMasterSecret(ProtocolVersion currentVersion,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        ProtocolVersion clientVersion,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        SecureRandom generator, HandshakeInStream input,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        EncryptionKey sessionKey) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
         // Extract encrypted premaster secret from message
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
         encrypted = input.getBytes16();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
         if (HandshakeMessage.debug != null && Debug.isOn("handshake")) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
            if (encrypted != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
                Debug.println(System.out,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
                     "encrypted premaster secret", encrypted);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
         }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
        if (sessionKey.getEType() ==
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
            EncryptedData.ETYPE_DES3_CBC_HMAC_SHA1_KD) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
            throw new IOException(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
               "session keys with des3-cbc-hmac-sha1-kd encryption type " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
               "are not supported for TLS Kerberos cipher suites");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
         // Decrypt premaster secret
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
         try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
            EncryptedData data = new EncryptedData(sessionKey.getEType(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
                        null /* optional kvno */, encrypted);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
            byte[] temp = data.decrypt(sessionKey, KeyUsage.KU_UNKNOWN);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            if (HandshakeMessage.debug != null && Debug.isOn("handshake")) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
                 if (encrypted != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
                     Debug.println(System.out,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
                         "decrypted premaster secret", temp);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
                 }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
            // Reset data stream after decryption, remove redundant bytes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
            preMaster =  data.reset(temp, false);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
            protocolVersion = ProtocolVersion.valueOf(preMaster[0],
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
                 preMaster[1]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
            if (HandshakeMessage.debug != null && Debug.isOn("handshake")) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
                 System.out.println("Kerberos PreMasterSecret version: "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
                        + protocolVersion);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        } catch (Exception e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
            // catch exception & process below
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
            preMaster = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
            protocolVersion = currentVersion;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        // check if the premaster secret version is ok
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        // the specification says that it must be the maximum version supported
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
        // by the client from its ClientHello message. However, many
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        // implementations send the negotiated version, so accept both
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
        // NOTE that we may be comparing two unsupported version numbers in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
        // the second case, which is why we cannot use object references
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        // equality in this special case
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        boolean versionMismatch = (protocolVersion != currentVersion) &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
                                  (protocolVersion.v != clientVersion.v);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
         * Bogus decrypted ClientKeyExchange? If so, conjure a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
         * a random preMaster secret that will fail later during
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
         * Finished message processing. This is a countermeasure against
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
         * the "interactive RSA PKCS#1 encryption envelop attack" reported
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
         * in June 1998. Preserving the executation path will
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
         * mitigate timing attacks and force consistent error handling
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
         * that will prevent an attacking client from differentiating
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
         * different kinds of decrypted ClientKeyExchange bogosities.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
         if ((preMaster == null) || (preMaster.length != 48)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
                || versionMismatch) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
            if (HandshakeMessage.debug != null && Debug.isOn("handshake")) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
                System.out.println("Kerberos PreMasterSecret error, "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
                                   + "generating random secret");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
                if (preMaster != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
                    Debug.println(System.out, "Invalid secret", preMaster);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
            preMaster = generatePreMaster(generator, currentVersion);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
            protocolVersion = currentVersion;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
     * Used by server to generate premaster secret in case of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
     * problem decoding ticket.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
     * @param protocolVersion used for preMaster[0,1]
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
     * @param generator random number generator to use for generating secret.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
    KerberosPreMasterSecret(ProtocolVersion protocolVersion,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
        SecureRandom generator) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
        this.protocolVersion = protocolVersion;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
        preMaster = generatePreMaster(generator, protocolVersion);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    private static byte[] generatePreMaster(SecureRandom rand,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
        ProtocolVersion ver) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
        byte[] pm = new byte[48];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
        rand.nextBytes(pm);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
        pm[0] = ver.major;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
        pm[1] = ver.minor;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        return pm;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
4236
02f52c723b79 6894643: Separate out dependency on Kerberos
vinnie
parents: 2
diff changeset
   219
    // Clone not needed; internal use only
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    byte[] getUnencrypted() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
        return preMaster;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
4236
02f52c723b79 6894643: Separate out dependency on Kerberos
vinnie
parents: 2
diff changeset
   224
    // Clone not needed; internal use only
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    byte[] getEncrypted() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
        return encrypted;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
}