author | erikj |
Tue, 12 Sep 2017 19:03:39 +0200 | |
changeset 47216 | 71c04702a3d5 |
parent 43248 | jdk/test/sun/security/pkcs11/tls/TestLeadingZeroesP11.java@5e15de85a1a0 |
child 51460 | 97e361fe3433 |
permissions | -rw-r--r-- |
17916
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
1 |
/* |
43248
5e15de85a1a0
8172527: Rename jdk.crypto.token to jdk.crypto.cryptoki
ascarpino
parents:
42693
diff
changeset
|
2 |
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. |
17916
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
4 |
* |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
8 |
* |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
13 |
* accompanied this code). |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
14 |
* |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
18 |
* |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
21 |
* questions. |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
22 |
*/ |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
23 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
24 |
/* |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
25 |
* @test |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
26 |
* @bug 8014618 |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
27 |
* @summary Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
28 |
* @library .. |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
29 |
* @author Pasi Eronen |
43248
5e15de85a1a0
8172527: Rename jdk.crypto.token to jdk.crypto.cryptoki
ascarpino
parents:
42693
diff
changeset
|
30 |
* @modules jdk.crypto.cryptoki |
35379
1e8e336ef66b
8144539: Update PKCS11 tests to run with security manager
asmotrak
parents:
17916
diff
changeset
|
31 |
* @run main/othervm TestLeadingZeroesP11 |
1e8e336ef66b
8144539: Update PKCS11 tests to run with security manager
asmotrak
parents:
17916
diff
changeset
|
32 |
* @run main/othervm TestLeadingZeroesP11 sm |
17916
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
33 |
*/ |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
34 |
|
35379
1e8e336ef66b
8144539: Update PKCS11 tests to run with security manager
asmotrak
parents:
17916
diff
changeset
|
35 |
|
1e8e336ef66b
8144539: Update PKCS11 tests to run with security manager
asmotrak
parents:
17916
diff
changeset
|
36 |
import java.security.KeyFactory; |
1e8e336ef66b
8144539: Update PKCS11 tests to run with security manager
asmotrak
parents:
17916
diff
changeset
|
37 |
import java.security.PrivateKey; |
1e8e336ef66b
8144539: Update PKCS11 tests to run with security manager
asmotrak
parents:
17916
diff
changeset
|
38 |
import java.security.Provider; |
1e8e336ef66b
8144539: Update PKCS11 tests to run with security manager
asmotrak
parents:
17916
diff
changeset
|
39 |
import java.security.PublicKey; |
1e8e336ef66b
8144539: Update PKCS11 tests to run with security manager
asmotrak
parents:
17916
diff
changeset
|
40 |
import java.security.spec.PKCS8EncodedKeySpec; |
1e8e336ef66b
8144539: Update PKCS11 tests to run with security manager
asmotrak
parents:
17916
diff
changeset
|
41 |
import java.security.spec.X509EncodedKeySpec; |
1e8e336ef66b
8144539: Update PKCS11 tests to run with security manager
asmotrak
parents:
17916
diff
changeset
|
42 |
import javax.crypto.KeyAgreement; |
17916
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
43 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
44 |
/** |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
45 |
* Test that leading zeroes are stripped in TlsPremasterSecret case, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
46 |
* but are left as-is in other cases. |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
47 |
* |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
48 |
* We use pre-generated keypairs, since with randomly generated keypairs, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
49 |
* a leading zero happens only (roughly) 1 out of 256 cases. |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
50 |
*/ |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
51 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
52 |
public class TestLeadingZeroesP11 extends PKCS11Test { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
53 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
54 |
public static void main(String[] args) throws Exception { |
35379
1e8e336ef66b
8144539: Update PKCS11 tests to run with security manager
asmotrak
parents:
17916
diff
changeset
|
55 |
main(new TestLeadingZeroesP11(), args); |
17916
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
56 |
} |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
57 |
|
35379
1e8e336ef66b
8144539: Update PKCS11 tests to run with security manager
asmotrak
parents:
17916
diff
changeset
|
58 |
@Override |
17916
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
59 |
public void main(Provider p) throws Exception { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
60 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
61 |
// decode pre-generated keypairs |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
62 |
KeyFactory kfac = KeyFactory.getInstance("DH", p); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
63 |
PublicKey alicePubKey = |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
64 |
kfac.generatePublic(new X509EncodedKeySpec(alicePubKeyEnc)); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
65 |
PublicKey bobPubKey = |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
66 |
kfac.generatePublic(new X509EncodedKeySpec(bobPubKeyEnc)); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
67 |
PrivateKey alicePrivKey = |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
68 |
kfac.generatePrivate(new PKCS8EncodedKeySpec(alicePrivKeyEnc)); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
69 |
PrivateKey bobPrivKey = |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
70 |
kfac.generatePrivate(new PKCS8EncodedKeySpec(bobPrivKeyEnc)); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
71 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
72 |
// generate normal shared secret |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
73 |
KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH", p); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
74 |
aliceKeyAgree.init(alicePrivKey); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
75 |
aliceKeyAgree.doPhase(bobPubKey, true); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
76 |
byte[] sharedSecret = aliceKeyAgree.generateSecret(); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
77 |
System.out.println("shared secret:\n" + toHexString(sharedSecret)); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
78 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
79 |
// verify that leading zero is present |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
80 |
if (sharedSecret.length != 128) { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
81 |
throw new Exception("Unexpected shared secret length"); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
82 |
} |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
83 |
if (sharedSecret[0] != 0) { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
84 |
throw new Exception("First byte is not zero as expected"); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
85 |
} |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
86 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
87 |
// now, test TLS premaster secret |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
88 |
aliceKeyAgree.init(alicePrivKey); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
89 |
aliceKeyAgree.doPhase(bobPubKey, true); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
90 |
byte[] tlsPremasterSecret = |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
91 |
aliceKeyAgree.generateSecret("TlsPremasterSecret").getEncoded(); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
92 |
System.out.println( |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
93 |
"tls premaster secret:\n" + toHexString(tlsPremasterSecret)); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
94 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
95 |
// check that leading zero has been stripped |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
96 |
if (tlsPremasterSecret.length != 127) { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
97 |
throw new Exception("Unexpected TLS premaster secret length"); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
98 |
} |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
99 |
if (tlsPremasterSecret[0] == 0) { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
100 |
throw new Exception("First byte is zero"); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
101 |
} |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
102 |
for (int i = 0; i < tlsPremasterSecret.length; i++) { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
103 |
if (tlsPremasterSecret[i] != sharedSecret[i+1]) { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
104 |
throw new Exception("Shared secrets differ"); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
105 |
} |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
106 |
} |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
107 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
108 |
} |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
109 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
110 |
/* |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
111 |
* Converts a byte to hex digit and writes to the supplied buffer |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
112 |
*/ |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
113 |
private void byte2hex(byte b, StringBuffer buf) { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
114 |
char[] hexChars = { '0', '1', '2', '3', '4', '5', '6', '7', '8', |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
115 |
'9', 'A', 'B', 'C', 'D', 'E', 'F' }; |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
116 |
int high = ((b & 0xf0) >> 4); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
117 |
int low = (b & 0x0f); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
118 |
buf.append(hexChars[high]); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
119 |
buf.append(hexChars[low]); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
120 |
} |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
121 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
122 |
/* |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
123 |
* Converts a byte array to hex string |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
124 |
*/ |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
125 |
private String toHexString(byte[] block) { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
126 |
StringBuffer buf = new StringBuffer(); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
127 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
128 |
int len = block.length; |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
129 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
130 |
for (int i = 0; i < len; i++) { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
131 |
byte2hex(block[i], buf); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
132 |
if (i < len-1) { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
133 |
buf.append(":"); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
134 |
} |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
135 |
} |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
136 |
return buf.toString(); |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
137 |
} |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
138 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
139 |
private static final byte alicePubKeyEnc[] = { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
140 |
(byte)0x30, (byte)0x82, (byte)0x01, (byte)0x24, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
141 |
(byte)0x30, (byte)0x81, (byte)0x99, (byte)0x06, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
142 |
(byte)0x09, (byte)0x2A, (byte)0x86, (byte)0x48, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
143 |
(byte)0x86, (byte)0xF7, (byte)0x0D, (byte)0x01, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
144 |
(byte)0x03, (byte)0x01, (byte)0x30, (byte)0x81, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
145 |
(byte)0x8B, (byte)0x02, (byte)0x81, (byte)0x81, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
146 |
(byte)0x00, (byte)0xF4, (byte)0x88, (byte)0xFD, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
147 |
(byte)0x58, (byte)0x4E, (byte)0x49, (byte)0xDB, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
148 |
(byte)0xCD, (byte)0x20, (byte)0xB4, (byte)0x9D, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
149 |
(byte)0xE4, (byte)0x91, (byte)0x07, (byte)0x36, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
150 |
(byte)0x6B, (byte)0x33, (byte)0x6C, (byte)0x38, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
151 |
(byte)0x0D, (byte)0x45, (byte)0x1D, (byte)0x0F, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
152 |
(byte)0x7C, (byte)0x88, (byte)0xB3, (byte)0x1C, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
153 |
(byte)0x7C, (byte)0x5B, (byte)0x2D, (byte)0x8E, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
154 |
(byte)0xF6, (byte)0xF3, (byte)0xC9, (byte)0x23, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
155 |
(byte)0xC0, (byte)0x43, (byte)0xF0, (byte)0xA5, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
156 |
(byte)0x5B, (byte)0x18, (byte)0x8D, (byte)0x8E, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
157 |
(byte)0xBB, (byte)0x55, (byte)0x8C, (byte)0xB8, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
158 |
(byte)0x5D, (byte)0x38, (byte)0xD3, (byte)0x34, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
159 |
(byte)0xFD, (byte)0x7C, (byte)0x17, (byte)0x57, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
160 |
(byte)0x43, (byte)0xA3, (byte)0x1D, (byte)0x18, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
161 |
(byte)0x6C, (byte)0xDE, (byte)0x33, (byte)0x21, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
162 |
(byte)0x2C, (byte)0xB5, (byte)0x2A, (byte)0xFF, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
163 |
(byte)0x3C, (byte)0xE1, (byte)0xB1, (byte)0x29, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
164 |
(byte)0x40, (byte)0x18, (byte)0x11, (byte)0x8D, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
165 |
(byte)0x7C, (byte)0x84, (byte)0xA7, (byte)0x0A, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
166 |
(byte)0x72, (byte)0xD6, (byte)0x86, (byte)0xC4, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
167 |
(byte)0x03, (byte)0x19, (byte)0xC8, (byte)0x07, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
168 |
(byte)0x29, (byte)0x7A, (byte)0xCA, (byte)0x95, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
169 |
(byte)0x0C, (byte)0xD9, (byte)0x96, (byte)0x9F, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
170 |
(byte)0xAB, (byte)0xD0, (byte)0x0A, (byte)0x50, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
171 |
(byte)0x9B, (byte)0x02, (byte)0x46, (byte)0xD3, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
172 |
(byte)0x08, (byte)0x3D, (byte)0x66, (byte)0xA4, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
173 |
(byte)0x5D, (byte)0x41, (byte)0x9F, (byte)0x9C, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
174 |
(byte)0x7C, (byte)0xBD, (byte)0x89, (byte)0x4B, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
175 |
(byte)0x22, (byte)0x19, (byte)0x26, (byte)0xBA, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
176 |
(byte)0xAB, (byte)0xA2, (byte)0x5E, (byte)0xC3, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
177 |
(byte)0x55, (byte)0xE9, (byte)0x2F, (byte)0x78, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
178 |
(byte)0xC7, (byte)0x02, (byte)0x01, (byte)0x02, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
179 |
(byte)0x02, (byte)0x02, (byte)0x02, (byte)0x00, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
180 |
(byte)0x03, (byte)0x81, (byte)0x85, (byte)0x00, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
181 |
(byte)0x02, (byte)0x81, (byte)0x81, (byte)0x00, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
182 |
(byte)0xEE, (byte)0xD6, (byte)0xB1, (byte)0xA3, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
183 |
(byte)0xB4, (byte)0x78, (byte)0x2B, (byte)0x35, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
184 |
(byte)0xEF, (byte)0xCD, (byte)0x17, (byte)0x86, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
185 |
(byte)0x63, (byte)0x2B, (byte)0x97, (byte)0x0E, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
186 |
(byte)0x7A, (byte)0xD1, (byte)0xFF, (byte)0x7A, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
187 |
(byte)0xEB, (byte)0x57, (byte)0x61, (byte)0xA1, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
188 |
(byte)0xF7, (byte)0x90, (byte)0x11, (byte)0xA7, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
189 |
(byte)0x79, (byte)0x28, (byte)0x69, (byte)0xBA, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
190 |
(byte)0xA7, (byte)0xB2, (byte)0x37, (byte)0x17, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
191 |
(byte)0xAE, (byte)0x3C, (byte)0x92, (byte)0x89, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
192 |
(byte)0x88, (byte)0xE5, (byte)0x7E, (byte)0x8E, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
193 |
(byte)0xF0, (byte)0x24, (byte)0xD0, (byte)0xE1, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
194 |
(byte)0xC4, (byte)0xB0, (byte)0x26, (byte)0x5A, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
195 |
(byte)0x1E, (byte)0xBD, (byte)0xA0, (byte)0xCF, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
196 |
(byte)0x3E, (byte)0x97, (byte)0x2A, (byte)0x13, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
197 |
(byte)0x92, (byte)0x3B, (byte)0x39, (byte)0xD0, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
198 |
(byte)0x1D, (byte)0xA3, (byte)0x6B, (byte)0x3E, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
199 |
(byte)0xC2, (byte)0xBB, (byte)0x14, (byte)0xB6, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
200 |
(byte)0xE2, (byte)0x4C, (byte)0x0E, (byte)0x5B, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
201 |
(byte)0x4B, (byte)0xA4, (byte)0x9D, (byte)0xA6, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
202 |
(byte)0x21, (byte)0xB0, (byte)0xF9, (byte)0xDE, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
203 |
(byte)0x55, (byte)0xAE, (byte)0x5C, (byte)0x29, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
204 |
(byte)0x0E, (byte)0xC1, (byte)0xFC, (byte)0xBA, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
205 |
(byte)0x51, (byte)0xD3, (byte)0xB6, (byte)0x6D, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
206 |
(byte)0x75, (byte)0x72, (byte)0xDF, (byte)0x43, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
207 |
(byte)0xAB, (byte)0x94, (byte)0x21, (byte)0x6E, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
208 |
(byte)0x0C, (byte)0xD1, (byte)0x93, (byte)0x54, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
209 |
(byte)0x56, (byte)0x7D, (byte)0x4B, (byte)0x90, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
210 |
(byte)0xF1, (byte)0x94, (byte)0x45, (byte)0xD4, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
211 |
(byte)0x2A, (byte)0x71, (byte)0xA1, (byte)0xB8, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
212 |
(byte)0xDD, (byte)0xAA, (byte)0x05, (byte)0xF0, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
213 |
(byte)0x27, (byte)0x37, (byte)0xBD, (byte)0x44 |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
214 |
}; |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
215 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
216 |
private static final byte alicePrivKeyEnc[] = { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
217 |
(byte)0x30, (byte)0x81, (byte)0xE3, (byte)0x02, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
218 |
(byte)0x01, (byte)0x00, (byte)0x30, (byte)0x81, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
219 |
(byte)0x99, (byte)0x06, (byte)0x09, (byte)0x2A, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
220 |
(byte)0x86, (byte)0x48, (byte)0x86, (byte)0xF7, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
221 |
(byte)0x0D, (byte)0x01, (byte)0x03, (byte)0x01, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
222 |
(byte)0x30, (byte)0x81, (byte)0x8B, (byte)0x02, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
223 |
(byte)0x81, (byte)0x81, (byte)0x00, (byte)0xF4, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
224 |
(byte)0x88, (byte)0xFD, (byte)0x58, (byte)0x4E, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
225 |
(byte)0x49, (byte)0xDB, (byte)0xCD, (byte)0x20, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
226 |
(byte)0xB4, (byte)0x9D, (byte)0xE4, (byte)0x91, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
227 |
(byte)0x07, (byte)0x36, (byte)0x6B, (byte)0x33, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
228 |
(byte)0x6C, (byte)0x38, (byte)0x0D, (byte)0x45, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
229 |
(byte)0x1D, (byte)0x0F, (byte)0x7C, (byte)0x88, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
230 |
(byte)0xB3, (byte)0x1C, (byte)0x7C, (byte)0x5B, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
231 |
(byte)0x2D, (byte)0x8E, (byte)0xF6, (byte)0xF3, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
232 |
(byte)0xC9, (byte)0x23, (byte)0xC0, (byte)0x43, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
233 |
(byte)0xF0, (byte)0xA5, (byte)0x5B, (byte)0x18, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
234 |
(byte)0x8D, (byte)0x8E, (byte)0xBB, (byte)0x55, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
235 |
(byte)0x8C, (byte)0xB8, (byte)0x5D, (byte)0x38, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
236 |
(byte)0xD3, (byte)0x34, (byte)0xFD, (byte)0x7C, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
237 |
(byte)0x17, (byte)0x57, (byte)0x43, (byte)0xA3, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
238 |
(byte)0x1D, (byte)0x18, (byte)0x6C, (byte)0xDE, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
239 |
(byte)0x33, (byte)0x21, (byte)0x2C, (byte)0xB5, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
240 |
(byte)0x2A, (byte)0xFF, (byte)0x3C, (byte)0xE1, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
241 |
(byte)0xB1, (byte)0x29, (byte)0x40, (byte)0x18, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
242 |
(byte)0x11, (byte)0x8D, (byte)0x7C, (byte)0x84, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
243 |
(byte)0xA7, (byte)0x0A, (byte)0x72, (byte)0xD6, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
244 |
(byte)0x86, (byte)0xC4, (byte)0x03, (byte)0x19, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
245 |
(byte)0xC8, (byte)0x07, (byte)0x29, (byte)0x7A, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
246 |
(byte)0xCA, (byte)0x95, (byte)0x0C, (byte)0xD9, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
247 |
(byte)0x96, (byte)0x9F, (byte)0xAB, (byte)0xD0, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
248 |
(byte)0x0A, (byte)0x50, (byte)0x9B, (byte)0x02, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
249 |
(byte)0x46, (byte)0xD3, (byte)0x08, (byte)0x3D, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
250 |
(byte)0x66, (byte)0xA4, (byte)0x5D, (byte)0x41, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
251 |
(byte)0x9F, (byte)0x9C, (byte)0x7C, (byte)0xBD, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
252 |
(byte)0x89, (byte)0x4B, (byte)0x22, (byte)0x19, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
253 |
(byte)0x26, (byte)0xBA, (byte)0xAB, (byte)0xA2, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
254 |
(byte)0x5E, (byte)0xC3, (byte)0x55, (byte)0xE9, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
255 |
(byte)0x2F, (byte)0x78, (byte)0xC7, (byte)0x02, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
256 |
(byte)0x01, (byte)0x02, (byte)0x02, (byte)0x02, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
257 |
(byte)0x02, (byte)0x00, (byte)0x04, (byte)0x42, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
258 |
(byte)0x02, (byte)0x40, (byte)0x36, (byte)0x4D, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
259 |
(byte)0xD0, (byte)0x58, (byte)0x64, (byte)0x91, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
260 |
(byte)0x78, (byte)0xA2, (byte)0x4B, (byte)0x79, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
261 |
(byte)0x46, (byte)0xFE, (byte)0xC9, (byte)0xD9, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
262 |
(byte)0xCA, (byte)0x5C, (byte)0xF9, (byte)0xFD, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
263 |
(byte)0x6C, (byte)0x5D, (byte)0x76, (byte)0x3A, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
264 |
(byte)0x41, (byte)0x6D, (byte)0x44, (byte)0x62, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
265 |
(byte)0x75, (byte)0x93, (byte)0x81, (byte)0x93, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
266 |
(byte)0x00, (byte)0x4C, (byte)0xB1, (byte)0xD8, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
267 |
(byte)0x7D, (byte)0x9D, (byte)0xF3, (byte)0x16, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
268 |
(byte)0x2C, (byte)0x6C, (byte)0x9F, (byte)0x7A, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
269 |
(byte)0x84, (byte)0xA3, (byte)0x7A, (byte)0xC1, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
270 |
(byte)0x4F, (byte)0x60, (byte)0xE3, (byte)0xB5, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
271 |
(byte)0x86, (byte)0x28, (byte)0x08, (byte)0x4D, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
272 |
(byte)0x94, (byte)0xB6, (byte)0x04, (byte)0x0D, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
273 |
(byte)0xAC, (byte)0xBD, (byte)0x1F, (byte)0x42, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
274 |
(byte)0x8F, (byte)0x1B |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
275 |
}; |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
276 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
277 |
private static final byte bobPubKeyEnc[] = { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
278 |
(byte)0x30, (byte)0x82, (byte)0x01, (byte)0x23, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
279 |
(byte)0x30, (byte)0x81, (byte)0x99, (byte)0x06, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
280 |
(byte)0x09, (byte)0x2A, (byte)0x86, (byte)0x48, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
281 |
(byte)0x86, (byte)0xF7, (byte)0x0D, (byte)0x01, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
282 |
(byte)0x03, (byte)0x01, (byte)0x30, (byte)0x81, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
283 |
(byte)0x8B, (byte)0x02, (byte)0x81, (byte)0x81, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
284 |
(byte)0x00, (byte)0xF4, (byte)0x88, (byte)0xFD, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
285 |
(byte)0x58, (byte)0x4E, (byte)0x49, (byte)0xDB, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
286 |
(byte)0xCD, (byte)0x20, (byte)0xB4, (byte)0x9D, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
287 |
(byte)0xE4, (byte)0x91, (byte)0x07, (byte)0x36, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
288 |
(byte)0x6B, (byte)0x33, (byte)0x6C, (byte)0x38, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
289 |
(byte)0x0D, (byte)0x45, (byte)0x1D, (byte)0x0F, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
290 |
(byte)0x7C, (byte)0x88, (byte)0xB3, (byte)0x1C, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
291 |
(byte)0x7C, (byte)0x5B, (byte)0x2D, (byte)0x8E, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
292 |
(byte)0xF6, (byte)0xF3, (byte)0xC9, (byte)0x23, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
293 |
(byte)0xC0, (byte)0x43, (byte)0xF0, (byte)0xA5, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
294 |
(byte)0x5B, (byte)0x18, (byte)0x8D, (byte)0x8E, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
295 |
(byte)0xBB, (byte)0x55, (byte)0x8C, (byte)0xB8, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
296 |
(byte)0x5D, (byte)0x38, (byte)0xD3, (byte)0x34, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
297 |
(byte)0xFD, (byte)0x7C, (byte)0x17, (byte)0x57, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
298 |
(byte)0x43, (byte)0xA3, (byte)0x1D, (byte)0x18, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
299 |
(byte)0x6C, (byte)0xDE, (byte)0x33, (byte)0x21, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
300 |
(byte)0x2C, (byte)0xB5, (byte)0x2A, (byte)0xFF, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
301 |
(byte)0x3C, (byte)0xE1, (byte)0xB1, (byte)0x29, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
302 |
(byte)0x40, (byte)0x18, (byte)0x11, (byte)0x8D, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
303 |
(byte)0x7C, (byte)0x84, (byte)0xA7, (byte)0x0A, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
304 |
(byte)0x72, (byte)0xD6, (byte)0x86, (byte)0xC4, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
305 |
(byte)0x03, (byte)0x19, (byte)0xC8, (byte)0x07, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
306 |
(byte)0x29, (byte)0x7A, (byte)0xCA, (byte)0x95, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
307 |
(byte)0x0C, (byte)0xD9, (byte)0x96, (byte)0x9F, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
308 |
(byte)0xAB, (byte)0xD0, (byte)0x0A, (byte)0x50, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
309 |
(byte)0x9B, (byte)0x02, (byte)0x46, (byte)0xD3, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
310 |
(byte)0x08, (byte)0x3D, (byte)0x66, (byte)0xA4, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
311 |
(byte)0x5D, (byte)0x41, (byte)0x9F, (byte)0x9C, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
312 |
(byte)0x7C, (byte)0xBD, (byte)0x89, (byte)0x4B, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
313 |
(byte)0x22, (byte)0x19, (byte)0x26, (byte)0xBA, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
314 |
(byte)0xAB, (byte)0xA2, (byte)0x5E, (byte)0xC3, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
315 |
(byte)0x55, (byte)0xE9, (byte)0x2F, (byte)0x78, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
316 |
(byte)0xC7, (byte)0x02, (byte)0x01, (byte)0x02, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
317 |
(byte)0x02, (byte)0x02, (byte)0x02, (byte)0x00, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
318 |
(byte)0x03, (byte)0x81, (byte)0x84, (byte)0x00, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
319 |
(byte)0x02, (byte)0x81, (byte)0x80, (byte)0x2C, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
320 |
(byte)0x40, (byte)0xFA, (byte)0xF6, (byte)0xA6, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
321 |
(byte)0xF8, (byte)0xAC, (byte)0xC2, (byte)0x4F, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
322 |
(byte)0xCD, (byte)0xC7, (byte)0x37, (byte)0x93, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
323 |
(byte)0xE5, (byte)0xE4, (byte)0x5E, (byte)0x18, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
324 |
(byte)0x14, (byte)0xE6, (byte)0x50, (byte)0xDA, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
325 |
(byte)0x55, (byte)0x38, (byte)0x5D, (byte)0x24, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
326 |
(byte)0xF5, (byte)0x42, (byte)0x68, (byte)0x5F, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
327 |
(byte)0xF5, (byte)0x15, (byte)0xC8, (byte)0x9B, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
328 |
(byte)0x5D, (byte)0x06, (byte)0x3D, (byte)0xE1, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
329 |
(byte)0x52, (byte)0x2F, (byte)0x98, (byte)0xFF, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
330 |
(byte)0x37, (byte)0xBB, (byte)0x75, (byte)0x48, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
331 |
(byte)0x48, (byte)0xE9, (byte)0x65, (byte)0x84, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
332 |
(byte)0x37, (byte)0xBB, (byte)0xB3, (byte)0xE9, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
333 |
(byte)0x36, (byte)0x01, (byte)0xB4, (byte)0x6A, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
334 |
(byte)0x1C, (byte)0xB2, (byte)0x11, (byte)0x82, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
335 |
(byte)0xCE, (byte)0x3D, (byte)0x65, (byte)0xE5, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
336 |
(byte)0x3C, (byte)0x89, (byte)0xE9, (byte)0x52, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
337 |
(byte)0x19, (byte)0xBD, (byte)0x58, (byte)0xF6, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
338 |
(byte)0xA2, (byte)0x03, (byte)0xA8, (byte)0xB2, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
339 |
(byte)0xA5, (byte)0xDB, (byte)0xEB, (byte)0xF5, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
340 |
(byte)0x94, (byte)0xF9, (byte)0x46, (byte)0xBE, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
341 |
(byte)0x45, (byte)0x4C, (byte)0x65, (byte)0xD2, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
342 |
(byte)0xD1, (byte)0xCF, (byte)0xFF, (byte)0xFF, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
343 |
(byte)0xFA, (byte)0x38, (byte)0xF1, (byte)0x72, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
344 |
(byte)0xAB, (byte)0xB9, (byte)0x14, (byte)0x4E, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
345 |
(byte)0xF5, (byte)0xF0, (byte)0x7A, (byte)0x8E, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
346 |
(byte)0x45, (byte)0xFD, (byte)0x5B, (byte)0xF9, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
347 |
(byte)0xA2, (byte)0x97, (byte)0x1B, (byte)0xAE, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
348 |
(byte)0x2C, (byte)0x7B, (byte)0x6B, (byte)0x7C, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
349 |
(byte)0x98, (byte)0xFE, (byte)0x58, (byte)0xDD, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
350 |
(byte)0xBE, (byte)0xF6, (byte)0x1C, (byte)0x8E, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
351 |
(byte)0xD0, (byte)0xA1, (byte)0x72 |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
352 |
}; |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
353 |
|
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
354 |
private static final byte bobPrivKeyEnc[] = { |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
355 |
(byte)0x30, (byte)0x81, (byte)0xE4, (byte)0x02, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
356 |
(byte)0x01, (byte)0x00, (byte)0x30, (byte)0x81, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
357 |
(byte)0x99, (byte)0x06, (byte)0x09, (byte)0x2A, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
358 |
(byte)0x86, (byte)0x48, (byte)0x86, (byte)0xF7, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
359 |
(byte)0x0D, (byte)0x01, (byte)0x03, (byte)0x01, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
360 |
(byte)0x30, (byte)0x81, (byte)0x8B, (byte)0x02, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
361 |
(byte)0x81, (byte)0x81, (byte)0x00, (byte)0xF4, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
362 |
(byte)0x88, (byte)0xFD, (byte)0x58, (byte)0x4E, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
363 |
(byte)0x49, (byte)0xDB, (byte)0xCD, (byte)0x20, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
364 |
(byte)0xB4, (byte)0x9D, (byte)0xE4, (byte)0x91, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
365 |
(byte)0x07, (byte)0x36, (byte)0x6B, (byte)0x33, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
366 |
(byte)0x6C, (byte)0x38, (byte)0x0D, (byte)0x45, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
367 |
(byte)0x1D, (byte)0x0F, (byte)0x7C, (byte)0x88, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
368 |
(byte)0xB3, (byte)0x1C, (byte)0x7C, (byte)0x5B, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
369 |
(byte)0x2D, (byte)0x8E, (byte)0xF6, (byte)0xF3, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
370 |
(byte)0xC9, (byte)0x23, (byte)0xC0, (byte)0x43, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
371 |
(byte)0xF0, (byte)0xA5, (byte)0x5B, (byte)0x18, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
372 |
(byte)0x8D, (byte)0x8E, (byte)0xBB, (byte)0x55, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
373 |
(byte)0x8C, (byte)0xB8, (byte)0x5D, (byte)0x38, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
374 |
(byte)0xD3, (byte)0x34, (byte)0xFD, (byte)0x7C, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
375 |
(byte)0x17, (byte)0x57, (byte)0x43, (byte)0xA3, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
376 |
(byte)0x1D, (byte)0x18, (byte)0x6C, (byte)0xDE, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
377 |
(byte)0x33, (byte)0x21, (byte)0x2C, (byte)0xB5, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
378 |
(byte)0x2A, (byte)0xFF, (byte)0x3C, (byte)0xE1, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
379 |
(byte)0xB1, (byte)0x29, (byte)0x40, (byte)0x18, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
380 |
(byte)0x11, (byte)0x8D, (byte)0x7C, (byte)0x84, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
381 |
(byte)0xA7, (byte)0x0A, (byte)0x72, (byte)0xD6, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
382 |
(byte)0x86, (byte)0xC4, (byte)0x03, (byte)0x19, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
383 |
(byte)0xC8, (byte)0x07, (byte)0x29, (byte)0x7A, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
384 |
(byte)0xCA, (byte)0x95, (byte)0x0C, (byte)0xD9, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
385 |
(byte)0x96, (byte)0x9F, (byte)0xAB, (byte)0xD0, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
386 |
(byte)0x0A, (byte)0x50, (byte)0x9B, (byte)0x02, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
387 |
(byte)0x46, (byte)0xD3, (byte)0x08, (byte)0x3D, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
388 |
(byte)0x66, (byte)0xA4, (byte)0x5D, (byte)0x41, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
389 |
(byte)0x9F, (byte)0x9C, (byte)0x7C, (byte)0xBD, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
390 |
(byte)0x89, (byte)0x4B, (byte)0x22, (byte)0x19, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
391 |
(byte)0x26, (byte)0xBA, (byte)0xAB, (byte)0xA2, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
392 |
(byte)0x5E, (byte)0xC3, (byte)0x55, (byte)0xE9, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
393 |
(byte)0x2F, (byte)0x78, (byte)0xC7, (byte)0x02, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
394 |
(byte)0x01, (byte)0x02, (byte)0x02, (byte)0x02, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
395 |
(byte)0x02, (byte)0x00, (byte)0x04, (byte)0x43, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
396 |
(byte)0x02, (byte)0x41, (byte)0x00, (byte)0xE0, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
397 |
(byte)0x31, (byte)0xE7, (byte)0x77, (byte)0xB8, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
398 |
(byte)0xD0, (byte)0x7E, (byte)0x0A, (byte)0x9B, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
399 |
(byte)0x94, (byte)0xD5, (byte)0x3D, (byte)0x33, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
400 |
(byte)0x62, (byte)0x32, (byte)0x51, (byte)0xCE, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
401 |
(byte)0x74, (byte)0x5C, (byte)0xA5, (byte)0x72, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
402 |
(byte)0xD9, (byte)0x36, (byte)0xF3, (byte)0x8A, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
403 |
(byte)0x3F, (byte)0x8B, (byte)0xC6, (byte)0xFE, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
404 |
(byte)0xEF, (byte)0x94, (byte)0x8B, (byte)0x50, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
405 |
(byte)0x41, (byte)0x9B, (byte)0x14, (byte)0xC8, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
406 |
(byte)0xE9, (byte)0x1F, (byte)0x24, (byte)0x1F, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
407 |
(byte)0x65, (byte)0x8E, (byte)0xD3, (byte)0x85, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
408 |
(byte)0xD0, (byte)0x68, (byte)0x6C, (byte)0xF1, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
409 |
(byte)0x79, (byte)0x45, (byte)0xD0, (byte)0x06, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
410 |
(byte)0xA4, (byte)0xB8, (byte)0xE0, (byte)0x64, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
411 |
(byte)0xF5, (byte)0x38, (byte)0x72, (byte)0x97, |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
412 |
(byte)0x00, (byte)0x23, (byte)0x5F |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
413 |
}; |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
414 |
} |
e02ddef88f77
8014618: Need to strip leading zeros in TlsPremasterSecret of DHKeyAgreement
xuelei
parents:
diff
changeset
|
415 |