author | weijun |
Wed, 10 Jul 2013 15:11:32 +0800 | |
changeset 18793 | 4d9455e24050 |
parent 17209 | 6f556e154816 |
child 30820 | 0d4717a011d3 |
permissions | -rw-r--r-- |
17209
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
1 |
/* |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
2 |
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
4 |
* |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
8 |
* |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
13 |
* accompanied this code). |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
14 |
* |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
18 |
* |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
21 |
* questions. |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
22 |
*/ |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
23 |
|
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
24 |
/* |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
25 |
* @test |
18793
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
26 |
* @bug 8012082 8019267 |
17209
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
27 |
* @summary SASL: auth-conf negotiated, but unencrypted data is accepted, |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
28 |
* reset to unencrypt |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
29 |
* @compile -XDignore.symbol.file SaslGSS.java |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
30 |
* @run main/othervm SaslGSS |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
31 |
*/ |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
32 |
|
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
33 |
import javax.security.auth.callback.Callback; |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
34 |
import javax.security.auth.callback.CallbackHandler; |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
35 |
import javax.security.auth.callback.UnsupportedCallbackException; |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
36 |
import javax.security.sasl.AuthorizeCallback; |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
37 |
import javax.security.sasl.RealmCallback; |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
38 |
import javax.security.sasl.Sasl; |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
39 |
import javax.security.sasl.SaslServer; |
18793
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
40 |
import java.io.ByteArrayOutputStream; |
17209
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
41 |
import java.io.IOException; |
18793
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
42 |
import java.io.PrintStream; |
17209
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
43 |
import java.util.HashMap; |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
44 |
import java.util.Locale; |
18793
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
45 |
import java.util.logging.ConsoleHandler; |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
46 |
import java.util.logging.Handler; |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
47 |
import java.util.logging.Level; |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
48 |
import java.util.logging.Logger; |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
49 |
|
17209
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
50 |
import org.ietf.jgss.*; |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
51 |
import sun.security.jgss.GSSUtil; |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
52 |
|
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
53 |
public class SaslGSS { |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
54 |
|
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
55 |
public static void main(String[] args) throws Exception { |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
56 |
|
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
57 |
String name = "host." + OneKDC.REALM.toLowerCase(Locale.US); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
58 |
|
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
59 |
new OneKDC(null).writeJAASConf(); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
60 |
System.setProperty("javax.security.auth.useSubjectCredsOnly", "false"); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
61 |
|
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
62 |
// Client in JGSS so that it can control wrap privacy mode |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
63 |
GSSManager m = GSSManager.getInstance(); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
64 |
GSSContext sc = m.createContext( |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
65 |
m.createName(OneKDC.SERVER, GSSUtil.NT_GSS_KRB5_PRINCIPAL), |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
66 |
GSSUtil.GSS_KRB5_MECH_OID, |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
67 |
null, |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
68 |
GSSContext.DEFAULT_LIFETIME); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
69 |
sc.requestMutualAuth(false); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
70 |
|
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
71 |
// Server in SASL |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
72 |
final HashMap props = new HashMap(); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
73 |
props.put(Sasl.QOP, "auth-conf"); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
74 |
SaslServer ss = Sasl.createSaslServer("GSSAPI", "server", |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
75 |
name, props, |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
76 |
new CallbackHandler() { |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
77 |
public void handle(Callback[] callbacks) |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
78 |
throws IOException, UnsupportedCallbackException { |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
79 |
for (Callback cb : callbacks) { |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
80 |
if (cb instanceof RealmCallback) { |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
81 |
((RealmCallback) cb).setText(OneKDC.REALM); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
82 |
} else if (cb instanceof AuthorizeCallback) { |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
83 |
((AuthorizeCallback) cb).setAuthorized(true); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
84 |
} |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
85 |
} |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
86 |
} |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
87 |
}); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
88 |
|
18793
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
89 |
ByteArrayOutputStream bout = new ByteArrayOutputStream(); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
90 |
PrintStream oldErr = System.err; |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
91 |
System.setErr(new PrintStream(bout)); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
92 |
|
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
93 |
Logger.getLogger("javax.security.sasl").setLevel(Level.ALL); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
94 |
Handler h = new ConsoleHandler(); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
95 |
h.setLevel(Level.ALL); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
96 |
Logger.getLogger("javax.security.sasl").addHandler(h); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
97 |
|
17209
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
98 |
byte[] token = new byte[0]; |
18793
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
99 |
|
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
100 |
try { |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
101 |
// Handshake |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
102 |
token = sc.initSecContext(token, 0, token.length); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
103 |
token = ss.evaluateResponse(token); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
104 |
token = sc.unwrap(token, 0, token.length, new MessageProp(0, false)); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
105 |
token[0] = (byte)(((token[0] & 4) != 0) ? 4 : 2); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
106 |
token = sc.wrap(token, 0, token.length, new MessageProp(0, false)); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
107 |
ss.evaluateResponse(token); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
108 |
} finally { |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
109 |
System.setErr(oldErr); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
110 |
} |
17209
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
111 |
|
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
112 |
// Talk |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
113 |
// 1. Client sends a auth-int message |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
114 |
byte[] hello = "hello".getBytes(); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
115 |
MessageProp qop = new MessageProp(0, false); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
116 |
token = sc.wrap(hello, 0, hello.length, qop); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
117 |
// 2. Server accepts it anyway |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
118 |
ss.unwrap(token, 0, token.length); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
119 |
// 3. Server sends a message |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
120 |
token = ss.wrap(hello, 0, hello.length); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
121 |
// 4. Client accepts, should be auth-conf |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
122 |
sc.unwrap(token, 0, token.length, qop); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
123 |
if (!qop.getPrivacy()) { |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
124 |
throw new Exception(); |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
125 |
} |
18793
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
126 |
|
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
127 |
for (String s: bout.toString().split("\\n")) { |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
128 |
if (s.contains("KRB5SRV04") && s.contains("NULL")) { |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
129 |
return; |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
130 |
} |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
131 |
} |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
132 |
System.out.println("======================="); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
133 |
System.out.println(bout.toString()); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
134 |
System.out.println("======================="); |
4d9455e24050
8019267: NPE in AbstractSaslImpl when trace level >= FINER in KRB5
weijun
parents:
17209
diff
changeset
|
135 |
throw new Exception("Haven't seen KRB5SRV04 with NULL"); |
17209
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
136 |
} |
6f556e154816
8012082: SASL: auth-conf negotiated, but unencrypted data is accepted, reset to unencrypt
weijun
parents:
diff
changeset
|
137 |
} |